From d6214b1988f3815e323c1c32c6885468ce21905e Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 24 Jul 2018 10:49:18 +1000 Subject: SPIGOT-4128: Greatly improve spawn egg deserialization --- src/main/java/org/bukkit/entity/EntityType.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java index 636bae8b..b17f2b74 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java @@ -293,6 +293,20 @@ public enum EntityType { ID_MAP.put(type.typeId, type); } } + + // Add legacy names + NAME_MAP.put("xp_orb", EXPERIENCE_ORB); + NAME_MAP.put("eye_of_ender_signal", ENDER_SIGNAL); + NAME_MAP.put("xp_bottle", THROWN_EXP_BOTTLE); + NAME_MAP.put("fireworks_rocket", FIREWORK); + NAME_MAP.put("evocation_fangs", EVOKER_FANGS); + NAME_MAP.put("evocation_illager", EVOKER); + NAME_MAP.put("vindication_illager", VINDICATOR); + NAME_MAP.put("illusion_illager", ILLUSIONER); + NAME_MAP.put("commandblock_minecart", MINECART_COMMAND); + NAME_MAP.put("snowman", SNOWMAN); + NAME_MAP.put("villager_golem", IRON_GOLEM); + NAME_MAP.put("ender_crystal", ENDER_CRYSTAL); } private EntityType(String name, Class clazz, int typeId) { -- cgit v1.2.3