SPIGOT-5536: Material.values() causes legacy data init

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-01-23 08:53:36 +11:00
parent 8ef307d13e
commit 77bc265e5b
4 changed files with 18 additions and 17 deletions

View File

@@ -248,20 +248,6 @@ public final class CraftLegacy {
return name(material);
}
public static Material[] modern_values() {
Material[] values = Material.values();
return Arrays.copyOfRange(values, 0, Material.LEGACY_AIR.ordinal());
}
public static int modern_ordinal(Material material) {
if (material.isLegacy()) {
// SPIGOT-4002: Fix for eclipse compiler manually compiling in default statements to lookupswitch
throw new NoSuchFieldError("Legacy field ordinal: " + material);
}
return material.ordinal();
}
public static void init() {
//
}