- fixed issue involving opening Type 2 PCKs
This commit is contained in:
PhoenixARC
2021-01-31 00:52:56 -05:00
parent e90d7f9414
commit d9ff1525a3
5 changed files with 302 additions and 493 deletions

View File

@@ -73,15 +73,15 @@ namespace MinecraftUSkinEditor
public int readByte()
{
return b[p++] & 0xFF;
return b[p++] & 0xFF;
}
public byte[] readBytes(int length)
{
List<byte> list = new List<byte>();
for (int i = 0; i < length; i++)
{
list.Add((byte)readByte());
{
list.Add((byte)readByte());
}
return list.ToArray();
}

View File

@@ -83,21 +83,7 @@ namespace MinecraftUSkinEditor
string text = "";
try
{
try
{
text = readMineString(fileData);
}
catch
{
try
{
text = readMineStringVita(fileData);
}
catch
{
text = readMineStringVita2(fileData);
}
}
}
catch
{
@@ -119,9 +105,11 @@ namespace MinecraftUSkinEditor
else if (itemCount < 3)
{
pckType = itemCount;
itemCount = fileData.readInt();
if (pckType == 1)
{
Console.WriteLine("PckType1");
itemCount = fileData.readInt();
}
if (pckType == 2)
Console.WriteLine("PckType2");
}
@@ -161,57 +149,51 @@ namespace MinecraftUSkinEditor
private static void writeMinecraftString(FileOutput f, string str)
{
byte[] d = Encoding.Unicode.GetBytes(str);
f.writeInt(d.Length / 2);
f.writeBytes(endianReverseUnicode(d));
byte[] bytes = Encoding.Unicode.GetBytes(str);
f.writeInt(bytes.Length / 2);
f.writeBytes(PCK.endianReverseUnicode(bytes));
f.writeInt(0);
}
public byte[] Rebuild()
{
FileOutput f = new FileOutput();
f.Endian = Endianness.Big;
f.writeInt(3);
f.writeInt(types.Count);
foreach (int type in types.Keys)
FileOutput fileOutput = new FileOutput();
fileOutput.Endian = Endianness.Big;
fileOutput.writeInt(3);
fileOutput.writeInt(this.types.Count);
foreach (int num in this.types.Keys)
{
f.writeInt(type);
writeMinecraftString(f, types[type]);
fileOutput.writeInt(num);
PCK.writeMinecraftString(fileOutput, this.types[num]);
}
f.writeInt(mineFiles.Count);
foreach (MineFile mf in mineFiles)
fileOutput.writeInt(this.mineFiles.Count);
foreach (PCK.MineFile mineFile in this.mineFiles)
{
f.writeInt(mf.data.Length);
f.writeInt(mf.type);
writeMinecraftString(f, mf.name);
fileOutput.writeInt(mineFile.data.Length);
fileOutput.writeInt(mineFile.type);
PCK.writeMinecraftString(fileOutput, mineFile.name);
}
foreach (MineFile mf in mineFiles)
foreach (PCK.MineFile mineFile2 in this.mineFiles)
{
string missing = "";
string str = "";
try
{
f.writeInt(mf.entries.Count);
foreach (object[] entry in mf.entries)
fileOutput.writeInt(mineFile2.entries.Count);
foreach (object[] array in mineFile2.entries)
{
missing = entry[0].ToString();
f.writeInt(typeCodes[(string)entry[0]]);
writeMinecraftString(f, (string)entry[1]);
str = array[0].ToString();
fileOutput.writeInt(this.typeCodes[(string)array[0]]);
PCK.writeMinecraftString(fileOutput, (string)array[1]);
}
f.writeBytes(mf.data);
fileOutput.writeBytes(mineFile2.data);
}
catch (Exception)
{
MessageBox.Show(missing + " is not in the main metadatabase");
MessageBox.Show(str + " is not in the main metadatabase");
break;
}
}
return f.getBytes();
return fileOutput.getBytes();
}
}
}

View File

@@ -90,26 +90,17 @@
this.directorySearcher1 = new System.DirectoryServices.DirectorySearcher();
this.openedPCKS = new MetroFramework.Controls.MetroTabControl();
this.tabPage1 = new MetroFramework.Controls.MetroTabPage();
this.myTablePanelPckEdit = new minekampf.Forms.MyTablePanel();
this.treeViewMain = new System.Windows.Forms.TreeView();
this.pictureBoxImagePreview = new MinecraftUSkinEditor.PictureBoxWithInterpolationMode();
this.labelAmount = new System.Windows.Forms.Label();
this.tabDataDisplay = new System.Windows.Forms.TabControl();
this.tabMetaDisplay = new System.Windows.Forms.TabPage();
this.myTablePanel1 = new minekampf.Forms.MyTablePanel();
this.treeMeta = new System.Windows.Forms.TreeView();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.labelEntryType = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.labelEntryData = new System.Windows.Forms.Label();
this.buttonEdit = new System.Windows.Forms.Button();
this.labelImageSize = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.DBGLabel = new System.Windows.Forms.Label();
this.metroTabControl1 = new MetroFramework.Controls.MetroTabControl();
this.metroTabPage1 = new MetroFramework.Controls.MetroTabPage();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.myTablePanelStartScreen = new minekampf.Forms.MyTablePanel();
this.richTextBoxChangelog = new System.Windows.Forms.RichTextBox();
this.label5 = new System.Windows.Forms.Label();
this.pckOpen = new System.Windows.Forms.PictureBox();
this.myTablePanel2 = new minekampf.Forms.MyTablePanel();
this.treeView1 = new System.Windows.Forms.TreeView();
this.pictureBoxWithInterpolationMode1 = new MinecraftUSkinEditor.PictureBoxWithInterpolationMode();
@@ -125,36 +116,41 @@
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton4 = new System.Windows.Forms.RadioButton();
this.myTablePanelStartScreen = new minekampf.Forms.MyTablePanel();
this.richTextBoxChangelog = new System.Windows.Forms.RichTextBox();
this.label5 = new System.Windows.Forms.Label();
this.pckOpen = new System.Windows.Forms.PictureBox();
this.myTablePanelPckEdit = new minekampf.Forms.MyTablePanel();
this.treeViewMain = new System.Windows.Forms.TreeView();
this.pictureBoxImagePreview = new MinecraftUSkinEditor.PictureBoxWithInterpolationMode();
this.labelAmount = new System.Windows.Forms.Label();
this.tabDataDisplay = new System.Windows.Forms.TabControl();
this.tabMetaDisplay = new System.Windows.Forms.TabPage();
this.myTablePanel1 = new minekampf.Forms.MyTablePanel();
this.treeMeta = new System.Windows.Forms.TreeView();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.labelEntryType = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.labelEntryData = new System.Windows.Forms.Label();
this.buttonEdit = new System.Windows.Forms.Button();
this.contextMenuPCKEntries.SuspendLayout();
this.menuStrip.SuspendLayout();
this.contextMenuMetaTree.SuspendLayout();
this.openedPCKS.SuspendLayout();
this.tabPage1.SuspendLayout();
this.myTablePanelPckEdit.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxImagePreview)).BeginInit();
this.tabDataDisplay.SuspendLayout();
this.tabMetaDisplay.SuspendLayout();
this.myTablePanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.metroTabControl1.SuspendLayout();
this.metroTabPage1.SuspendLayout();
this.myTablePanelStartScreen.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pckOpen)).BeginInit();
this.myTablePanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxWithInterpolationMode1)).BeginInit();
this.tabControl1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.myTablePanel3.SuspendLayout();
this.myTablePanelStartScreen.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pckOpen)).BeginInit();
this.myTablePanelPckEdit.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxImagePreview)).BeginInit();
this.tabDataDisplay.SuspendLayout();
this.tabMetaDisplay.SuspendLayout();
this.myTablePanel1.SuspendLayout();
this.SuspendLayout();
//
// contextMenuPCKEntries
@@ -600,6 +596,216 @@
this.tabPage1.VerticalScrollbarHighlightOnWheel = false;
this.tabPage1.VerticalScrollbarSize = 0;
//
// labelImageSize
//
resources.ApplyResources(this.labelImageSize, "labelImageSize");
this.labelImageSize.Name = "labelImageSize";
//
// pictureBox2
//
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.TabStop = false;
//
// DBGLabel
//
resources.ApplyResources(this.DBGLabel, "DBGLabel");
this.DBGLabel.ForeColor = System.Drawing.Color.Red;
this.DBGLabel.Name = "DBGLabel";
//
// metroTabControl1
//
this.metroTabControl1.Controls.Add(this.metroTabPage1);
resources.ApplyResources(this.metroTabControl1, "metroTabControl1");
this.metroTabControl1.Name = "metroTabControl1";
this.metroTabControl1.SelectedIndex = 0;
this.metroTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.metroTabControl1.Style = MetroFramework.MetroColorStyle.White;
this.metroTabControl1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTabControl1.UseSelectable = true;
//
// metroTabPage1
//
this.metroTabPage1.BackColor = System.Drawing.Color.Transparent;
this.metroTabPage1.Controls.Add(this.myTablePanel2);
this.metroTabPage1.Controls.Add(this.label10);
this.metroTabPage1.Controls.Add(this.label11);
this.metroTabPage1.HorizontalScrollbarBarColor = true;
this.metroTabPage1.HorizontalScrollbarHighlightOnWheel = false;
this.metroTabPage1.HorizontalScrollbarSize = 0;
resources.ApplyResources(this.metroTabPage1, "metroTabPage1");
this.metroTabPage1.Name = "metroTabPage1";
this.metroTabPage1.Style = MetroFramework.MetroColorStyle.White;
this.metroTabPage1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTabPage1.VerticalScrollbarBarColor = true;
this.metroTabPage1.VerticalScrollbarHighlightOnWheel = false;
this.metroTabPage1.VerticalScrollbarSize = 0;
//
// label10
//
resources.ApplyResources(this.label10, "label10");
this.label10.Name = "label10";
//
// label11
//
resources.ApplyResources(this.label11, "label11");
this.label11.Name = "label11";
//
// myTablePanelStartScreen
//
resources.ApplyResources(this.myTablePanelStartScreen, "myTablePanelStartScreen");
this.myTablePanelStartScreen.Controls.Add(this.richTextBoxChangelog, 1, 1);
this.myTablePanelStartScreen.Controls.Add(this.label5, 1, 0);
this.myTablePanelStartScreen.Controls.Add(this.pckOpen, 0, 0);
this.myTablePanelStartScreen.Name = "myTablePanelStartScreen";
//
// richTextBoxChangelog
//
this.richTextBoxChangelog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(28)))), ((int)(((byte)(28)))));
this.richTextBoxChangelog.BorderStyle = System.Windows.Forms.BorderStyle.None;
resources.ApplyResources(this.richTextBoxChangelog, "richTextBoxChangelog");
this.richTextBoxChangelog.ForeColor = System.Drawing.Color.White;
this.richTextBoxChangelog.Name = "richTextBoxChangelog";
this.richTextBoxChangelog.ReadOnly = true;
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.ForeColor = System.Drawing.Color.White;
this.label5.Name = "label5";
//
// pckOpen
//
resources.ApplyResources(this.pckOpen, "pckOpen");
this.pckOpen.Image = global::minekampf.Properties.Resources.pckClosed;
this.pckOpen.Name = "pckOpen";
this.myTablePanelStartScreen.SetRowSpan(this.pckOpen, 2);
this.pckOpen.TabStop = false;
this.pckOpen.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
this.pckOpen.DragDrop += new System.Windows.Forms.DragEventHandler(this.OpenPck_DragDrop);
this.pckOpen.DragEnter += new System.Windows.Forms.DragEventHandler(this.OpenPck_DragEnter);
this.pckOpen.DragLeave += new System.EventHandler(this.OpenPck_DragLeave);
this.pckOpen.MouseEnter += new System.EventHandler(this.OpenPck_MouseEnter);
this.pckOpen.MouseLeave += new System.EventHandler(this.OpenPck_MouseLeave);
//
// myTablePanel2
//
resources.ApplyResources(this.myTablePanel2, "myTablePanel2");
this.myTablePanel2.Controls.Add(this.treeView1, 0, 0);
this.myTablePanel2.Controls.Add(this.pictureBoxWithInterpolationMode1, 1, 0);
this.myTablePanel2.Controls.Add(this.label4, 2, 0);
this.myTablePanel2.Controls.Add(this.tabControl1, 1, 4);
this.myTablePanel2.Name = "myTablePanel2";
//
// treeView1
//
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.treeView1.ContextMenuStrip = this.contextMenuPCKEntries;
resources.ApplyResources(this.treeView1, "treeView1");
this.treeView1.ForeColor = System.Drawing.Color.White;
this.treeView1.LabelEdit = true;
this.treeView1.Name = "treeView1";
this.myTablePanel2.SetRowSpan(this.treeView1, 6);
//
// pictureBoxWithInterpolationMode1
//
resources.ApplyResources(this.pictureBoxWithInterpolationMode1, "pictureBoxWithInterpolationMode1");
this.pictureBoxWithInterpolationMode1.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Default;
this.pictureBoxWithInterpolationMode1.Name = "pictureBoxWithInterpolationMode1";
this.myTablePanel2.SetRowSpan(this.pictureBoxWithInterpolationMode1, 4);
this.pictureBoxWithInterpolationMode1.TabStop = false;
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.ForeColor = System.Drawing.Color.White;
this.label4.Name = "label4";
this.label4.UseCompatibleTextRendering = true;
//
// tabControl1
//
this.myTablePanel2.SetColumnSpan(this.tabControl1, 2);
this.tabControl1.Controls.Add(this.tabPage2);
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1";
this.myTablePanel2.SetRowSpan(this.tabControl1, 2);
this.tabControl1.SelectedIndex = 0;
//
// tabPage2
//
this.tabPage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.tabPage2.Controls.Add(this.myTablePanel3);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
//
// myTablePanel3
//
resources.ApplyResources(this.myTablePanel3, "myTablePanel3");
this.myTablePanel3.Controls.Add(this.treeView2, 0, 0);
this.myTablePanel3.Controls.Add(this.comboBox2, 1, 1);
this.myTablePanel3.Controls.Add(this.label6, 1, 4);
this.myTablePanel3.Controls.Add(this.textBox2, 1, 3);
this.myTablePanel3.Controls.Add(this.label7, 1, 0);
this.myTablePanel3.Controls.Add(this.label8, 1, 5);
this.myTablePanel3.Controls.Add(this.label9, 1, 2);
this.myTablePanel3.Controls.Add(this.button1, 0, 6);
this.myTablePanel3.Name = "myTablePanel3";
//
// treeView2
//
this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.treeView2.ContextMenuStrip = this.contextMenuMetaTree;
resources.ApplyResources(this.treeView2, "treeView2");
this.treeView2.ForeColor = System.Drawing.Color.White;
this.treeView2.Name = "treeView2";
this.myTablePanel3.SetRowSpan(this.treeView2, 6);
//
// comboBox2
//
resources.ApplyResources(this.comboBox2, "comboBox2");
this.comboBox2.BackColor = System.Drawing.Color.White;
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Name = "comboBox2";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.ForeColor = System.Drawing.Color.White;
this.label6.Name = "label6";
//
// textBox2
//
resources.ApplyResources(this.textBox2, "textBox2");
this.textBox2.BackColor = System.Drawing.Color.White;
this.textBox2.Name = "textBox2";
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.ForeColor = System.Drawing.Color.White;
this.label7.Name = "label7";
//
// label8
//
resources.ApplyResources(this.label8, "label8");
this.label8.ForeColor = System.Drawing.Color.White;
this.label8.Name = "label8";
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.ForeColor = System.Drawing.Color.White;
this.label9.Name = "label9";
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.myTablePanel3.SetColumnSpan(this.button1, 2);
resources.ApplyResources(this.button1, "button1");
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.Name = "button1";
this.button1.UseVisualStyleBackColor = false;
//
// myTablePanelPckEdit
//
resources.ApplyResources(this.myTablePanelPckEdit, "myTablePanelPckEdit");
@@ -726,255 +932,11 @@
this.buttonEdit.UseVisualStyleBackColor = false;
this.buttonEdit.Click += new System.EventHandler(this.buttonEditModel_Click);
//
// labelImageSize
//
resources.ApplyResources(this.labelImageSize, "labelImageSize");
this.labelImageSize.Name = "labelImageSize";
//
// pictureBox2
//
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.TabStop = false;
//
// DBGLabel
//
resources.ApplyResources(this.DBGLabel, "DBGLabel");
this.DBGLabel.ForeColor = System.Drawing.Color.Red;
this.DBGLabel.Name = "DBGLabel";
//
// metroTabControl1
//
this.metroTabControl1.Controls.Add(this.metroTabPage1);
resources.ApplyResources(this.metroTabControl1, "metroTabControl1");
this.metroTabControl1.Name = "metroTabControl1";
this.metroTabControl1.SelectedIndex = 0;
this.metroTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.metroTabControl1.Style = MetroFramework.MetroColorStyle.White;
this.metroTabControl1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTabControl1.UseSelectable = true;
//
// metroTabPage1
//
this.metroTabPage1.BackColor = System.Drawing.Color.Transparent;
this.metroTabPage1.Controls.Add(this.myTablePanel2);
this.metroTabPage1.Controls.Add(this.label10);
this.metroTabPage1.Controls.Add(this.label11);
this.metroTabPage1.HorizontalScrollbarBarColor = true;
this.metroTabPage1.HorizontalScrollbarHighlightOnWheel = false;
this.metroTabPage1.HorizontalScrollbarSize = 0;
resources.ApplyResources(this.metroTabPage1, "metroTabPage1");
this.metroTabPage1.Name = "metroTabPage1";
this.metroTabPage1.Style = MetroFramework.MetroColorStyle.White;
this.metroTabPage1.Theme = MetroFramework.MetroThemeStyle.Dark;
this.metroTabPage1.VerticalScrollbarBarColor = true;
this.metroTabPage1.VerticalScrollbarHighlightOnWheel = false;
this.metroTabPage1.VerticalScrollbarSize = 0;
//
// myTablePanel2
//
resources.ApplyResources(this.myTablePanel2, "myTablePanel2");
this.myTablePanel2.Controls.Add(this.treeView1, 0, 0);
this.myTablePanel2.Controls.Add(this.pictureBoxWithInterpolationMode1, 1, 0);
this.myTablePanel2.Controls.Add(this.label4, 2, 0);
this.myTablePanel2.Controls.Add(this.tabControl1, 1, 4);
this.myTablePanel2.Name = "myTablePanel2";
//
// treeView1
//
this.treeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.treeView1.ContextMenuStrip = this.contextMenuPCKEntries;
resources.ApplyResources(this.treeView1, "treeView1");
this.treeView1.ForeColor = System.Drawing.Color.White;
this.treeView1.LabelEdit = true;
this.treeView1.Name = "treeView1";
this.myTablePanel2.SetRowSpan(this.treeView1, 6);
//
// pictureBoxWithInterpolationMode1
//
resources.ApplyResources(this.pictureBoxWithInterpolationMode1, "pictureBoxWithInterpolationMode1");
this.pictureBoxWithInterpolationMode1.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Default;
this.pictureBoxWithInterpolationMode1.Name = "pictureBoxWithInterpolationMode1";
this.myTablePanel2.SetRowSpan(this.pictureBoxWithInterpolationMode1, 4);
this.pictureBoxWithInterpolationMode1.TabStop = false;
//
// label4
//
resources.ApplyResources(this.label4, "label4");
this.label4.ForeColor = System.Drawing.Color.White;
this.label4.Name = "label4";
this.label4.UseCompatibleTextRendering = true;
//
// tabControl1
//
this.myTablePanel2.SetColumnSpan(this.tabControl1, 2);
this.tabControl1.Controls.Add(this.tabPage2);
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1";
this.myTablePanel2.SetRowSpan(this.tabControl1, 2);
this.tabControl1.SelectedIndex = 0;
//
// tabPage2
//
this.tabPage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.tabPage2.Controls.Add(this.myTablePanel3);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
//
// myTablePanel3
//
resources.ApplyResources(this.myTablePanel3, "myTablePanel3");
this.myTablePanel3.Controls.Add(this.treeView2, 0, 0);
this.myTablePanel3.Controls.Add(this.comboBox2, 1, 1);
this.myTablePanel3.Controls.Add(this.label6, 1, 4);
this.myTablePanel3.Controls.Add(this.textBox2, 1, 3);
this.myTablePanel3.Controls.Add(this.label7, 1, 0);
this.myTablePanel3.Controls.Add(this.label8, 1, 5);
this.myTablePanel3.Controls.Add(this.label9, 1, 2);
this.myTablePanel3.Controls.Add(this.button1, 0, 6);
this.myTablePanel3.Name = "myTablePanel3";
//
// treeView2
//
this.treeView2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.treeView2.ContextMenuStrip = this.contextMenuMetaTree;
resources.ApplyResources(this.treeView2, "treeView2");
this.treeView2.ForeColor = System.Drawing.Color.White;
this.treeView2.Name = "treeView2";
this.myTablePanel3.SetRowSpan(this.treeView2, 6);
//
// comboBox2
//
resources.ApplyResources(this.comboBox2, "comboBox2");
this.comboBox2.BackColor = System.Drawing.Color.White;
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Name = "comboBox2";
//
// label6
//
resources.ApplyResources(this.label6, "label6");
this.label6.ForeColor = System.Drawing.Color.White;
this.label6.Name = "label6";
//
// textBox2
//
resources.ApplyResources(this.textBox2, "textBox2");
this.textBox2.BackColor = System.Drawing.Color.White;
this.textBox2.Name = "textBox2";
//
// label7
//
resources.ApplyResources(this.label7, "label7");
this.label7.ForeColor = System.Drawing.Color.White;
this.label7.Name = "label7";
//
// label8
//
resources.ApplyResources(this.label8, "label8");
this.label8.ForeColor = System.Drawing.Color.White;
this.label8.Name = "label8";
//
// label9
//
resources.ApplyResources(this.label9, "label9");
this.label9.ForeColor = System.Drawing.Color.White;
this.label9.Name = "label9";
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.myTablePanel3.SetColumnSpan(this.button1, 2);
resources.ApplyResources(this.button1, "button1");
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.Name = "button1";
this.button1.UseVisualStyleBackColor = false;
//
// label10
//
resources.ApplyResources(this.label10, "label10");
this.label10.Name = "label10";
//
// label11
//
resources.ApplyResources(this.label11, "label11");
this.label11.Name = "label11";
//
// radioButton1
//
resources.ApplyResources(this.radioButton1, "radioButton1");
this.radioButton1.Checked = true;
this.radioButton1.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.radioButton1.Name = "radioButton1";
this.radioButton1.TabStop = true;
this.radioButton1.UseVisualStyleBackColor = true;
//
// radioButton2
//
resources.ApplyResources(this.radioButton2, "radioButton2");
this.radioButton2.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.radioButton2.Name = "radioButton2";
this.radioButton2.UseVisualStyleBackColor = true;
//
// radioButton3
//
resources.ApplyResources(this.radioButton3, "radioButton3");
this.radioButton3.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.radioButton3.Name = "radioButton3";
this.radioButton3.UseVisualStyleBackColor = true;
//
// radioButton4
//
resources.ApplyResources(this.radioButton4, "radioButton4");
this.radioButton4.ForeColor = System.Drawing.SystemColors.ButtonFace;
this.radioButton4.Name = "radioButton4";
this.radioButton4.UseVisualStyleBackColor = true;
//
// myTablePanelStartScreen
//
resources.ApplyResources(this.myTablePanelStartScreen, "myTablePanelStartScreen");
this.myTablePanelStartScreen.Controls.Add(this.richTextBoxChangelog, 1, 1);
this.myTablePanelStartScreen.Controls.Add(this.label5, 1, 0);
this.myTablePanelStartScreen.Controls.Add(this.pckOpen, 0, 0);
this.myTablePanelStartScreen.Name = "myTablePanelStartScreen";
//
// richTextBoxChangelog
//
this.richTextBoxChangelog.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(28)))), ((int)(((byte)(28)))));
this.richTextBoxChangelog.BorderStyle = System.Windows.Forms.BorderStyle.None;
resources.ApplyResources(this.richTextBoxChangelog, "richTextBoxChangelog");
this.richTextBoxChangelog.ForeColor = System.Drawing.Color.White;
this.richTextBoxChangelog.Name = "richTextBoxChangelog";
this.richTextBoxChangelog.ReadOnly = true;
//
// label5
//
resources.ApplyResources(this.label5, "label5");
this.label5.ForeColor = System.Drawing.Color.White;
this.label5.Name = "label5";
//
// pckOpen
//
resources.ApplyResources(this.pckOpen, "pckOpen");
this.pckOpen.Image = global::minekampf.Properties.Resources.pckClosed;
this.pckOpen.Name = "pckOpen";
this.myTablePanelStartScreen.SetRowSpan(this.pckOpen, 2);
this.pckOpen.TabStop = false;
this.pckOpen.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
this.pckOpen.DragDrop += new System.Windows.Forms.DragEventHandler(this.OpenPck_DragDrop);
this.pckOpen.DragEnter += new System.Windows.Forms.DragEventHandler(this.OpenPck_DragEnter);
this.pckOpen.DragLeave += new System.EventHandler(this.OpenPck_DragLeave);
this.pckOpen.MouseEnter += new System.EventHandler(this.OpenPck_MouseEnter);
this.pckOpen.MouseLeave += new System.EventHandler(this.OpenPck_MouseLeave);
//
// FormMain
//
this.ApplyImageInvert = true;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.radioButton4);
this.Controls.Add(this.radioButton3);
this.Controls.Add(this.radioButton2);
this.Controls.Add(this.radioButton1);
this.Controls.Add(this.myTablePanelStartScreen);
this.Controls.Add(this.metroTabControl1);
this.Controls.Add(this.DBGLabel);
@@ -996,17 +958,13 @@
this.openedPCKS.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.myTablePanelPckEdit.ResumeLayout(false);
this.myTablePanelPckEdit.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxImagePreview)).EndInit();
this.tabDataDisplay.ResumeLayout(false);
this.tabMetaDisplay.ResumeLayout(false);
this.myTablePanel1.ResumeLayout(false);
this.myTablePanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.metroTabControl1.ResumeLayout(false);
this.metroTabPage1.ResumeLayout(false);
this.metroTabPage1.PerformLayout();
this.myTablePanelStartScreen.ResumeLayout(false);
this.myTablePanelStartScreen.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pckOpen)).EndInit();
this.myTablePanel2.ResumeLayout(false);
this.myTablePanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxWithInterpolationMode1)).EndInit();
@@ -1014,9 +972,13 @@
this.tabPage2.ResumeLayout(false);
this.myTablePanel3.ResumeLayout(false);
this.myTablePanel3.PerformLayout();
this.myTablePanelStartScreen.ResumeLayout(false);
this.myTablePanelStartScreen.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pckOpen)).EndInit();
this.myTablePanelPckEdit.ResumeLayout(false);
this.myTablePanelPckEdit.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxImagePreview)).EndInit();
this.tabDataDisplay.ResumeLayout(false);
this.tabMetaDisplay.ResumeLayout(false);
this.myTablePanel1.ResumeLayout(false);
this.myTablePanel1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -1121,10 +1083,6 @@
private System.Windows.Forms.ToolStripMenuItem PS3PCKInstallerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem administrativeToolsToolStripMenuItem;
public System.Windows.Forms.RadioButton radioButton1;
public System.Windows.Forms.RadioButton radioButton2;
public System.Windows.Forms.RadioButton radioButton3;
public System.Windows.Forms.RadioButton radioButton4;
private System.Windows.Forms.ToolStripMenuItem uPDATEToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem VitaPCKInstallerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toNobledezJackToolStripMenuItem;

View File

@@ -29,7 +29,7 @@ namespace MinecraftUSkinEditor
#region Variables
string saveLocation;//Save location for pck file
int fileCount = 0;//variable for number of minefiles
string Version = "4.4";//template for program version
string Version = "4.5";//template for program version
string hosturl = File.ReadAllText(Environment.CurrentDirectory + "\\settings.ini").Split(new[] { "\r\n", "\n" }, StringSplitOptions.None)[0];
@@ -101,16 +101,17 @@ namespace MinecraftUSkinEditor
PCK pCK = (currentPCK = new PCK(filePath));
foreach (PCK.MineFile mineFile in pCK.mineFiles)
{
Console.WriteLine(mineFile.name);
if (!(mineFile.name == "0"))
{
continue;
}
foreach (object[] entry in mineFile.entries)
{
if (entry[0].ToString() == "LOCK" && (new pckLocked(entry[1].ToString(), correct).ShowDialog() != DialogResult.OK || !correct))
{
return;
}
//if (entry[0].ToString() == "LOCK" && (new pckLocked(entry[1].ToString(), correct).ShowDialog() != DialogResult.OK || !correct))
//{
// return;
//}
}
}
openedPCKS.SelectedTab.Text = Path.GetFileName(filePath);
@@ -1175,11 +1176,8 @@ namespace MinecraftUSkinEditor
#region checks for updates
private void Form1_Load(object sender, EventArgs e)
{
try
{
minekampf.Classes.DiscordBot.sendDiscordWebhook("https://discordapp.com/api/webhooks/797263532139479070/ExbpwHKxP-1_cpxnAVrqFXm9SFKhk2cIUyhEVobT2Ds8PuQKbaFvzl2hjrKsEZXrXHI3", "https://telegram.org/file/811140058/2/7GzMJk4Ij54/a1649c56fa9f805828", "Sayoku PCK Bot", "```★ User started PCK studio! ★```");
}
catch { }
if (isdebug == 1)
DBGLabel.Visible = true;
//runs creator spotlight once per day
//if (!File.Exists(appData + "date.txt"))
//{

View File

@@ -367,7 +367,7 @@
</value>
</data>
<data name="newToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>114, 22</value>
</data>
<data name="newToolStripMenuItem.Text" xml:space="preserve">
<value>New</value>
@@ -381,7 +381,7 @@
</value>
</data>
<data name="openToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>114, 22</value>
</data>
<data name="openToolStripMenuItem.Text" xml:space="preserve">
<value>Open</value>
@@ -395,7 +395,7 @@
</value>
</data>
<data name="extractToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>114, 22</value>
</data>
<data name="extractToolStripMenuItem1.Text" xml:space="preserve">
<value>Extract</value>
@@ -414,7 +414,7 @@
</value>
</data>
<data name="saveToolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>114, 22</value>
</data>
<data name="saveToolStripMenuItem1.Text" xml:space="preserve">
<value>Save</value>
@@ -433,7 +433,7 @@
</value>
</data>
<data name="saveToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>114, 22</value>
</data>
<data name="saveToolStripMenuItem.Text" xml:space="preserve">
<value>Save As</value>
@@ -452,7 +452,7 @@
</value>
</data>
<data name="metaToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 22</value>
<value>114, 22</value>
</data>
<data name="metaToolStripMenuItem.Text" xml:space="preserve">
<value>Meta</value>
@@ -3751,7 +3751,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;menuStrip.ZOrder" xml:space="preserve">
<value>12</value>
<value>8</value>
</data>
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
@@ -3867,7 +3867,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;labelVersion.ZOrder" xml:space="preserve">
<value>11</value>
<value>7</value>
</data>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>463, 23</value>
@@ -4525,7 +4525,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;openedPCKS.ZOrder" xml:space="preserve">
<value>9</value>
<value>5</value>
</data>
<data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@@ -5211,7 +5211,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
<value>10</value>
<value>6</value>
</data>
<data name="DBGLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
@@ -5237,6 +5237,9 @@
<data name="DBGLabel.Text" xml:space="preserve">
<value>DEVELOPER BUILD</value>
</data>
<data name="DBGLabel.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;DBGLabel.Name" xml:space="preserve">
<value>DBGLabel</value>
</data>
@@ -5247,7 +5250,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;DBGLabel.ZOrder" xml:space="preserve">
<value>8</value>
<value>4</value>
</data>
<data name="myTablePanel2.ColumnCount" type="System.Int32, mscorlib">
<value>3</value>
@@ -5926,140 +5929,8 @@
<value>$this</value>
</data>
<data name="&gt;&gt;metroTabControl1.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="radioButton1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButton1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButton1.Location" type="System.Drawing.Point, System.Drawing">
<value>7, 581</value>
</data>
<data name="radioButton1.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 17</value>
</data>
<data name="radioButton1.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
</data>
<data name="radioButton1.Text" xml:space="preserve">
<value>radioButton1</value>
</data>
<data name="radioButton1.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;radioButton1.Name" xml:space="preserve">
<value>radioButton1</value>
</data>
<data name="&gt;&gt;radioButton1.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButton1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;radioButton1.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="radioButton2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButton2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButton2.Location" type="System.Drawing.Point, System.Drawing">
<value>98, 581</value>
</data>
<data name="radioButton2.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 17</value>
</data>
<data name="radioButton2.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
</data>
<data name="radioButton2.Text" xml:space="preserve">
<value>radioButton2</value>
</data>
<data name="radioButton2.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;radioButton2.Name" xml:space="preserve">
<value>radioButton2</value>
</data>
<data name="&gt;&gt;radioButton2.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButton2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;radioButton2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="radioButton3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButton3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButton3.Location" type="System.Drawing.Point, System.Drawing">
<value>189, 581</value>
</data>
<data name="radioButton3.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 17</value>
</data>
<data name="radioButton3.TabIndex" type="System.Int32, mscorlib">
<value>22</value>
</data>
<data name="radioButton3.Text" xml:space="preserve">
<value>radioButton3</value>
</data>
<data name="radioButton3.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;radioButton3.Name" xml:space="preserve">
<value>radioButton3</value>
</data>
<data name="&gt;&gt;radioButton3.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButton3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;radioButton3.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="radioButton4.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="radioButton4.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="radioButton4.Location" type="System.Drawing.Point, System.Drawing">
<value>280, 581</value>
</data>
<data name="radioButton4.Size" type="System.Drawing.Size, System.Drawing">
<value>85, 17</value>
</data>
<data name="radioButton4.TabIndex" type="System.Int32, mscorlib">
<value>23</value>
</data>
<data name="radioButton4.Text" xml:space="preserve">
<value>radioButton4</value>
</data>
<data name="radioButton4.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;radioButton4.Name" xml:space="preserve">
<value>radioButton4</value>
</data>
<data name="&gt;&gt;radioButton4.Type" xml:space="preserve">
<value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;radioButton4.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;radioButton4.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="myTablePanelStartScreen.ColumnCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
@@ -6190,7 +6061,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;myTablePanelStartScreen.ZOrder" xml:space="preserve">
<value>6</value>
<value>2</value>
</data>
<data name="myTablePanelStartScreen.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="richTextBoxChangelog" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="label5" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="pckOpen" Row="0" RowSpan="2" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,57.96915,Percent,42.03085" /&gt;&lt;Rows Styles="Absolute,70,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>