Skip to content
Permalink
Browse files
Fix legacy material builder on pre-1.16
  • Loading branch information
PseudoKnight committed Jun 28, 2020
1 parent 093c41e commit 6ecc8df6c44fcc8a1e1b8b6d5d7c1f4529f61081
Showing 1 changed file with 4 additions and 3 deletions.
@@ -492,9 +492,7 @@ public enum LegacyMaterialName {
DANDELION_YELLOW(Material.YELLOW_DYE),
ROSE_RED(Material.RED_DYE),
SIGN(Material.OAK_SIGN),
WALL_SIGN(Material.OAK_WALL_SIGN),
// Changed in 1.16
ZOMBIE_PIGMAN_SPAWN_EGG(Material.ZOMBIFIED_PIGLIN_SPAWN_EGG);
WALL_SIGN(Material.OAK_WALL_SIGN);

private final Material mat;

@@ -518,6 +516,9 @@ public static void build() {
for(LegacyMaterialName mat : LegacyMaterialName.values()) {
BY_NAME.put(mat.name(), mat.getNewMaterial());
}
if(Static.getServer().getMinecraftVersion().gte(MCVersion.MC1_16)) {
BY_NAME.put("ZOMBIE_PIGMAN_SPAWN_EGG", Material.ZOMBIFIED_PIGLIN_SPAWN_EGG);
}
}
}

0 comments on commit 6ecc8df

Please sign in to comment.