From d48702aad69523ef580d0133eead374d39a4a2a0 Mon Sep 17 00:00:00 2001 From: wizjany Date: Sun, 28 Apr 2019 10:56:21 -0400 Subject: [PATCH] Fix schematic id conversion for entities with multiple renames. --- .../clipboard/io/MCEditSchematicReader.java | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/MCEditSchematicReader.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/MCEditSchematicReader.java index 53ec62dae..71005ad00 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/MCEditSchematicReader.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/MCEditSchematicReader.java @@ -287,13 +287,10 @@ public class MCEditSchematicReader extends NBTSchematicReader { case "ArmorStand": return "armor_stand"; case "CaveSpider": return "cave_spider"; case "MinecartChest": return "chest_minecart"; - case "MinecartCommandBlock": return "commandblock_minecart"; case "DragonFireball": return "dragon_fireball"; case "ThrownEgg": return "egg"; - case "EnderCrystal": return "ender_crystal"; case "EnderDragon": return "ender_dragon"; case "ThrownEnderpearl": return "ender_pearl"; - case "EyeOfEnderSignal": return "eye_of_ender_signal"; case "FallingSand": return "falling_block"; case "FireworksRocketEntity": return "fireworks_rocket"; case "MinecartFurnace": return "furnace_minecart"; @@ -317,15 +314,23 @@ public class MCEditSchematicReader extends NBTSchematicReader { case "VillagerGolem": return "villager_golem"; case "WitherBoss": return "wither"; case "WitherSkull": return "wither_skull"; - case "ThrownExpBottle": return "xp_bottle"; - case "XPOrb": return "xp_orb"; case "PigZombie": return "zombie_pigman"; - case "xp_orb": return "experience_orb"; - case "xp_bottle": return "experience_bottle"; - case "eye_of_ender_signal": return "eye_of_ender"; - case "ender_crystal": return "end_crystal"; + case "XPOrb": + case "xp_orb": + return "experience_orb"; + case "ThrownExpBottle": + case "xp_bottle": + return "experience_bottle"; + case "EyeOfEnderSignal": + case "eye_of_ender_signal": + return "eye_of_ender"; + case "EnderCrystal": + case "ender_crystal": + return "end_crystal"; case "fireworks_rocket": return "firework_rocket"; - case "commandblock_minecart": return "command_block_minecart"; + case "MinecartCommandBlock": + case "commandblock_minecart": + return "command_block_minecart"; case "snowman": return "snow_golem"; case "villager_golem": return "iron_golem"; case "evocation_fangs": return "evoker_fangs";