diff --git a/MinecraftUSkinEditor/Forms/Form1.cs b/MinecraftUSkinEditor/Forms/Form1.cs index 4a176cb2..0c74355e 100644 --- a/MinecraftUSkinEditor/Forms/Form1.cs +++ b/MinecraftUSkinEditor/Forms/Form1.cs @@ -862,7 +862,7 @@ namespace PckStudio mf.name = Path.GetDirectoryName(mfO.name).Replace("\\", "/") + "/" + Path.GetFileNameWithoutExtension(mfO.name) + "_clone" + mfCO.Extension;//sets minfile name to file name if (treeViewMain.SelectedNode.Parent == null && mf.name.StartsWith("/")) mf.name = mf.name.Remove(0, 1); mf.entries = mfO.entries; - mf.type = 0;//sets minefile type to default + mf.type = mfO.type;//sets minefile type to default TreeNode add = new TreeNode(Path.GetFileName(mf.name)) { Tag = mf };//creates node for minefile //Gets proper file icon for minefile diff --git a/MinecraftUSkinEditor/Forms/Utilities/Animation/AnimationEditor.cs b/MinecraftUSkinEditor/Forms/Utilities/Animation/AnimationEditor.cs index cf475b02..334ba90d 100644 --- a/MinecraftUSkinEditor/Forms/Utilities/Animation/AnimationEditor.cs +++ b/MinecraftUSkinEditor/Forms/Utilities/Animation/AnimationEditor.cs @@ -56,6 +56,7 @@ namespace PckStudio diag.ShowDialog(this); Console.WriteLine(diag.SelectedTile); newTileName = diag.SelectedTile; + if (newTileName == "") this.Close(); isItem = diag.IsItem; diag.Dispose(); } @@ -698,7 +699,7 @@ namespace PckStudio private void changeTileToolStripMenuItem_Click(object sender, EventArgs e) { - PckStudio.Forms.Utilities.AnimationEditor.ChangeTile diag = new Forms.Utilities.AnimationEditor.ChangeTile(); + PckStudio.Forms.Utilities.AnimationEditor.ChangeTile diag = new Forms.Utilities.AnimationEditor.ChangeTile(newTileName); diag.ShowDialog(this); Console.WriteLine(diag.SelectedTile); newTileName = diag.SelectedTile; diff --git a/MinecraftUSkinEditor/Forms/Utilities/Animation/ChangeTile.cs b/MinecraftUSkinEditor/Forms/Utilities/Animation/ChangeTile.cs index 01166a25..7f6a88a7 100644 --- a/MinecraftUSkinEditor/Forms/Utilities/Animation/ChangeTile.cs +++ b/MinecraftUSkinEditor/Forms/Utilities/Animation/ChangeTile.cs @@ -15,6 +15,7 @@ namespace PckStudio.Forms.Utilities.AnimationEditor public partial class ChangeTile : MetroForm { string selectedTile = ""; + string oldTileName = ""; public string SelectedTile { get { return selectedTile; } @@ -41,8 +42,9 @@ namespace PckStudio.Forms.Utilities.AnimationEditor if (e.Node.TreeView == treeView2) isItem = true; } - public ChangeTile() + public ChangeTile(string oldName = "") { + oldTileName = oldName; InitializeComponent(); ImageList tiles = new ImageList(); @@ -99,7 +101,7 @@ namespace PckStudio.Forms.Utilities.AnimationEditor { foreach (Newtonsoft.Json.Linq.JProperty prop in content.Properties()) { - if (!prop.Name.Contains("UNUSED") && !prop.Name.Contains("PART")) + if (!String.IsNullOrEmpty((string)prop.Value)) { TreeNode tileNode = new TreeNode(); tileNode.Text = (string)prop.Value; @@ -120,7 +122,7 @@ namespace PckStudio.Forms.Utilities.AnimationEditor { foreach (Newtonsoft.Json.Linq.JProperty prop in content.Properties()) { - if (!prop.Name.Contains("UNUSED") && !prop.Name.Contains("PART")) + if (!String.IsNullOrEmpty((string)prop.Value)) { TreeNode tileNode = new TreeNode(); tileNode.Text = (string)prop.Value; @@ -193,6 +195,7 @@ namespace PckStudio.Forms.Utilities.AnimationEditor private void button2_Click(object sender, EventArgs e) { + selectedTile = oldTileName; Close(); } diff --git a/MinecraftUSkinEditor/Resources/tileData.json b/MinecraftUSkinEditor/Resources/tileData.json index 9ef8d7a0..38b6d900 100644 --- a/MinecraftUSkinEditor/Resources/tileData.json +++ b/MinecraftUSkinEditor/Resources/tileData.json @@ -61,8 +61,8 @@ { "fern": "Fern" }, { "daylight_detector_top": "Daylight Sensor (Top)" }, { "daylight_detector_side": "Daylight Sensor (Side)" }, - { "workbench_front": "Crafting Table (Front)" }, { "workbench_side": "Crafting Table (Side)" }, + { "workbench_front": "Crafting Table (Front)" }, { "furnace_front_lit": "Furnace (Lit) (Front)" }, { "furnace_top": "Furnace (Top)" }, { "sapling_spruce": "Spruce Sapling" }, @@ -82,7 +82,7 @@ { "mycel_side": "Mycelium (Side)" }, { "mycel_top": "Mycelium (Top)" }, { "sapling_birch": "Birch Sapling" }, - { "torch": "Torch" }, + { "torch_on": "Torch" }, { "door_wood_upper": "Oak Door (Upper)" }, { "door_iron_upper": "Iron Door (Upper)" }, { "ladder": "Ladder" }, @@ -113,7 +113,7 @@ { "piston_side": "Piston (Side)" }, { "piston_bottom": "Piston (Bottom)" }, { "piston_inner_top": "Piston (Inside)" }, - { "pumpkin_stem": "Stem" }, + { "stem_straight": "Stem" }, { "rail_normal_turned": "Rail (Turned)" }, { "wool_colored_black": "Black Wool" }, { "wool_colored_gray": "Gray Wool" }, @@ -133,10 +133,10 @@ { "rail_normal": "Rail" }, { "wool_colored_red": "Red Wool" }, { "wool_colored_pink": "Pink Wool" }, - { "repeater": "Repeater" }, + { "repeater_off": "Repeater" }, { "leaves_spruce": "Spruce Leaves" }, { "leaves_spruce_opaque": "Spruce Leaves (Opaque)" }, - { "UNUSED_conduit_top": "" }, + { "conduit_top": "Conduit (Break Particles)" }, { "turtle_egg_hatch_0": "Turtle Egg (Stage 1)" }, { "melon_side": "Melon (Side)" }, { "melon_top": "Melon (Top)" }, @@ -151,8 +151,8 @@ { "wool_colored_lime": "Lime Wool" }, { "repeater_on": "Redstone Repeater (On)" }, { "glass_pane_top": "Glass Pane (Top)" }, - { "UNUSED_CHEST_TOP": "" }, - { "UNUSED_ENDER_CHEST_TOP": "" }, + { "chest_top": "Chest (Break Particles)" }, + { "ender_chest_top": "Ender Chest (Break Particles)" }, { "turtle_egg_hatch_1": "Turtle Egg (Stage 2)" }, { "turtle_egg_hatch_2": "Turtle Egg (Stage 3)" }, { "log_jungle": "Jungle Log (Side)" }, @@ -181,7 +181,7 @@ { "sandstone_top": "Sandstone (Top)" }, { "wool_colored_blue": "Blue Wool" }, { "wool_colored_light_blue": "Light Blue Wool" }, - { "powered_rail_on": "Powered Rail (On)" }, + { "rail_golden_powered": "Powered Rail (On)" }, { "redstone_dust_cross_overlay": "Redstone Dust (Cross) (Overlay)" }, { "redstone_dust_line_overlay": "Redstone Dust (Line) (Overlay)" }, { "enchantment_side": "Enchantment Table (Side)" }, @@ -209,7 +209,7 @@ { "slime": "Slime Block" }, { "water": "Water" }, { "water_flow": "Flowing Water" }, - { "water_flow_PART2": "" }, + { "": "" }, { "sandstone_bottom": "Sandstone (Bottom)" }, { "wool_colored_cyan": "Cyan Wool" }, { "wool_colored_orange": "Orange Wool" }, @@ -224,8 +224,8 @@ { "quartz_block_top": "Quartz Block (Top)" }, { "hopper_outside": "Hopper (Side)" }, { "detectorRail_on": "Detector Rail (On)" }, - { "water_flow_PART3": "" }, - { "water_flow_PART4": "" }, + { "": "" }, + { "": "" }, { "nether_brick": "Nether Brick" }, { "wool_colored_silver": "Light Gray Wool" }, { "nether_wart_stage_0": "Nether Wart (Stage 1)" }, @@ -241,7 +241,7 @@ { "hopper_inside": "Hopper (Inside)" }, { "lava": "Lava" }, { "lava_flow": "Flowing Lava" }, - { "lava_flow_PART2": "" }, + { "": "" }, { "destroy_0": "Destroy (Stage 1)" }, { "destroy_1": "Destroy (Stage 2)" }, { "destroy_2": "Destroy (Stage 3)" }, @@ -256,8 +256,8 @@ { "quartz_block_bottom": "Quartz Block (Bottom)" }, { "hopper_top": "Hopper (Top)" }, { "hay_block_top": "Hay Block (Top)" }, - { "lava_flow_PART3": "" }, - { "lava_flow_PART4": "" }, + { "": "" }, + { "": "" }, { "coal_block": "Coal Block" }, { "hardened_clay": "Terracotta" }, { "noteblock": "Note Block" }, @@ -306,22 +306,22 @@ { "glass_silver": "Light Gray Glass" }, { "glass_white": "White Glass" }, { "glass_yellow": "Yellow Glass" }, - { "glass_pane_black": "Black Glass Pane" }, - { "glass_pane_blue": "Blue Glass Pane" }, - { "glass_pane_brown": "Brown Glass Pane" }, - { "glass_pane_cyan": "Cyan Glass Pane" }, - { "glass_pane_gray": "Gray Glass Pane" }, - { "glass_pane_green": "Green Glass Pane" }, - { "glass_pane_light_blue": "Light Blue Glass Pane" }, - { "glass_pane_lime": "Lime Glass Pane" }, - { "glass_pane_magenta": "Magenta Glass Pane" }, - { "glass_pane_orange": "Orange Glass Pane" }, - { "glass_pane_pink": "Pink Glass Pane" }, - { "glass_pane_purple": "Purple Glass Pane" }, - { "glass_pane_red": "Red Glass Pane" }, - { "glass_pane_silver": "Light Gray Glass Pane" }, - { "glass_pane_white": "White Glass Pane" }, - { "glass_pane_yellow": "Yellow Glass Pane" }, + { "glass_pane_top_black": "Black Glass Pane" }, + { "glass_pane_top_blue": "Blue Glass Pane" }, + { "glass_pane_top_brown": "Brown Glass Pane" }, + { "glass_pane_top_cyan": "Cyan Glass Pane" }, + { "glass_pane_top_gray": "Gray Glass Pane" }, + { "glass_pane_top_green": "Green Glass Pane" }, + { "glass_pane_top_light_blue": "Light Blue Glass Pane" }, + { "glass_pane_top_lime": "Lime Glass Pane" }, + { "glass_pane_top_magenta": "Magenta Glass Pane" }, + { "glass_pane_top_orange": "Orange Glass Pane" }, + { "glass_pane_top_pink": "Pink Glass Pane" }, + { "glass_pane_top_purple": "Purple Glass Pane" }, + { "glass_pane_top_red": "Red Glass Pane" }, + { "glass_pane_top_silver": "Light Gray Glass Pane" }, + { "glass_pane_top_white": "White Glass Pane" }, + { "glass_pane_top_yellow": "Yellow Glass Pane" }, { "double_plant_fern_top": "Large Fern (Top)" }, { "double_plant_grass_top": "Double Tall Grass (Top)" }, { "double_plant_paeonia_top": "Peony (Top)" }, @@ -354,7 +354,7 @@ { "prismarine_dark": "Dark Prismarine" }, { "red_sandstone_bottom": "Red Sandstone (Bottom)" }, { "red_sandstone_normal": "Red Sandstone (Side)" }, - { "flower_allium": "Allium" }, + { "flower_alium": "Allium" }, { "flower_blue_orchid": "Blue Orchid" }, { "flower_houstonia": "Azure Bluet" }, { "flower_oxeye_daisy": "Oxeye Daisy" }, @@ -377,7 +377,7 @@ { "door_spruce_upper": "Spruce Door (Upper)" }, { "chorus_flower": "Chorus Flower" }, { "chorus_flower_dead": "Chorus Flower (Dead)" }, - { "chorus_plant": "Chorus Plant" }, + { "chorus_flower_plant": "Chorus Plant" }, { "end_bricks": "End Bricks" }, { "grass_path_side": "Grass Path (Side)" }, { "grass_path_top": "Grass Path (Top)" }, @@ -420,8 +420,8 @@ { "repeating_command_block_side": "Repeating Command Block (Side)" }, { "bone_block_side": "Bone Block (Side)" }, { "bone_block_top": "Bone Block (Top)" }, - { "UNUSED_STEM": "" }, - { "UNUSED_ATTACHED_STEM": "" }, + { "": "" }, + { "": "" }, { "observer_front": "Observer (Front)" }, { "observer_side": "Observer (Side)" }, { "observer_back": "Observer (Back)" }, @@ -483,25 +483,25 @@ { "glazed_terracotta_white": "White Glazed Terracotta" }, { "glazed_terracotta_yellow": "Yellow Glazed Terracotta" }, { "shulker_top": "Shulker (Break Particles)" }, - { "UNUSED_NULL": "" }, + { "": "" }, { "cauldron_water": "Cauldron Water" }, - { "seagrass_doubletall_top_a": "Tall Seagrass (Top)" }, - { "coral_blue": "Tube Coral" }, - { "coral_purple": "Bubble Coral" }, - { "coral_pink": "Brain Coral" }, - { "coral_red": "Fire Coral" }, - { "coral_yellow": "Horn Coral" }, - { "coral_plant_blue": "Tube Coral Plant" }, - { "coral_plant_purple": "Bubble Coral Plant" }, - { "coral_plant_pink": "Brain Coral Plant" }, - { "coral_plant_red": "Fire Coral Plant" }, - { "coral_plant_yellow": "Horn Coral Plant" }, + { "seagrass_doubletall_top": "Double Tall Seagrass (Top)" }, + { "coral_blue": "Tube Coral Block" }, + { "coral_purple": "Bubble Coral Block" }, + { "coral_pink": "Brain Coral Block" }, + { "coral_red": "Fire Coral Block" }, + { "coral_yellow": "Horn Coral Block" }, + { "coral_plant_blue": "Tube Coral" }, + { "coral_plant_purple": "Bubble Coral" }, + { "coral_plant_pink": "Brain Coral" }, + { "coral_plant_red": "Fire Coral" }, + { "coral_plant_yellow": "Horn Coral" }, { "sea_pickle": "Sea Pickle" }, { "blue_ice": "Blue Ice" }, { "dried_kelp_top": "Dried Kelp Block (Top)" }, { "dried_kelp_side": "Dried Kelp Block (Side)" }, { "seagrass_carried": "Seagrass (Item)" }, - { "seagrass_doubletall_bottom_a": "Tall Seagrass (Bottom)" }, + { "seagrass_doubletall_bottom": "Double Tall Seagrass (Bottom)" }, { "coral_blue_dead": "Tube Coral" }, { "coral_purple_dead": "Bubble Coral" }, { "coral_pink_dead": "Brain Coral" }, @@ -515,20 +515,20 @@ { "coral_layered_top_red": "Fire Coral (Overlay)" }, { "coral_layered_top_yellow": "Horn Coral (Overlay)" }, { "kelp_a": "Kelp (Bottom)" }, - { "UNUSED_KELP_PLANT0": "" }, - { "UNUSED_KELP_PLANT1": "" }, - { "UNUSED_KELP_PLANT2": "" }, + { "": "" }, + { "": "" }, + { "": "" }, { "kelp_top_a": "Kelp (Top)" }, - { "UNUSED_KELP0": "" }, - { "UNUSED_KELP1": "" }, - { "UNUSED_KELP2": "" }, + { "": "" }, + { "": "" }, + { "": "" }, { "seagrass": "Seagrass" }, { "coral_fan_blue_dead": "Tube Coral Fan (Dead)" }, { "coral_fan_purple_dead": "Bubble Coral Fan (Dead)" }, { "coral_fan_pink_dead": "Brain Coral Fan (Dead)" }, { "coral_fan_red_dead": "Red Coral Fan (Dead)" }, { "coral_fan_yellow_dead": "Horn Coral Fan (Dead)" }, - { "UNUSED_UNKNOWN2": "" }, + { "": "" }, { "spruce_trapdoor": "Spruce Trapdoor" }, { "stripped_log_oak": "Stripped Oak Log (Side)" }, { "stripped_log_oak_top": "Stripped Oak Log (Top)" }, @@ -602,7 +602,7 @@ { "bootsDiamond": "Diamond Boots" }, { "bootsGold": "Golden Boots" }, { "stick": "Stick" }, - { "UNUSED_compass": "" }, + { "": "" }, { "diamond": "Diamond" }, { "redstone": "Redstone" }, { "clay": "Clay" }, @@ -618,7 +618,7 @@ { "swordDiamond": "Diamond Sword" }, { "swordGold": "Golden Sword" }, { "fishingRod_uncast": "Fishing Rod" }, - { "UNUSED_clock": "" }, + { "": "" }, { "bowl": "Bowl" }, { "mushroomStew": "Mushroom Stew" }, { "yellowDust": "Glowstone Dust" }, @@ -634,7 +634,7 @@ { "shovelDiamond": "Diamond Shovel" }, { "shovelGold": "Golden Shovel" }, { "fishingRod_cast": "Fishing Rod (Cast)" }, - { "repeater": "Redstone Repeater" }, + { "diode": "Redstone Repeater" }, { "porkchopRaw": "Raw Porkchop" }, { "porkchopCooked": "Cooked Porkchop" }, { "fishRaw": "Raw Cod" }, @@ -727,7 +727,7 @@ { "leggingsCloth_overlay": "Leather Leggings (Overlay)" }, { "tipped_arrow_head": "Tipped Arrow (Overlay)" }, { "potion_bottle_lingering": "Lingering Potion" }, - { "barrier": "Barrier" }, + { "": "" }, { "mutton_raw": "Raw Mutton" }, { "rabbit_raw": "Raw Rabbit" }, { "fish_pufferfish_raw": "Pufferfish" }, @@ -736,8 +736,8 @@ { "nether_star": "Nether Star" }, { "emerald": "Emerald" }, { "writingBook": "Book and Quill" }, - { "written_book": "Written Book" }, - { "flower_pot": "Flower Pot" }, + { "writtenBook": "Written Book" }, + { "flowerPot": "Flower Pot" }, { "dyePowder_silver": "Light Gray Dye" }, { "dyePowder_white": "White Dye" }, { "bootsCloth_overlay": "Leather Boots (Overlay)" }, @@ -758,8 +758,8 @@ { "enchantedBook": "Enchanted Book" }, { "door_acacia": "Acacia Door" }, { "door_birch": "Birch Door" }, - { "door_jungle": "Jungle Door" }, { "door_dark_oak": "Dark Oak Door" }, + { "door_jungle": "Jungle Door" }, { "door_spruce": "Spruce Door" }, { "rabbit_stew": "Rabbit Stew" }, { "fish_salmon_cooked": "Cooked Salmon" }, @@ -779,14 +779,14 @@ { "iron_nugget": "Iron Nugget" }, { "rabbit_foot": "Rabbit Foot" }, { "rabbit_hide": "Rabbit Hide" }, - { "UNUSED_COMPASS_P0": "" }, - { "UNUSED_COMPASS_P1": "" }, - { "UNUSED_COMPASS_P2": "" }, - { "UNUSED_COMPASS_P3": "" }, - { "UNUSED_CLOCK_P0": "" }, - { "UNUSED_CLOCK_P1": "" }, - { "UNUSED_CLOCK_P2": "" }, - { "UNUSED_CLOCK_P3": "" }, + { "compassP0": "" }, + { "compassP1": "" }, + { "compassP2": "" }, + { "compassP3": "" }, + { "clockP0": "" }, + { "clockP1": "" }, + { "clockP2": "" }, + { "clockP3": "" }, { "dragonFireball": "Dragon Fireball" }, { "record_13": "Music Disc (C418 - 13)" }, { "record_cat": "Music Disc (C418 - cat)" }, @@ -805,12 +805,12 @@ { "bucketPuffer": "Bucket of Pufferfish" }, { "bucketTropical": "Bucket of Tropical Fish" }, { "leather_horse_armor_detail": "Leather Horse Armor (Overlay)" }, - { "UNUSED1": "" }, - { "UNUSED2": "" }, - { "UNUSED3": "" }, - { "UNUSED4": "" }, - { "UNUSED5": "" }, - { "UNUSED6": "" }, + { "": "" }, + { "": "" }, + { "": "" }, + { "": "" }, + { "": "" }, + { "": "" }, { "kelp": "Kelp" }, { "dried_kelp": "Dried Kelp" }, { "sea_pickle": "Sea Pickle" },