Permalink
Browse files

Prioritise item conversion for anvils

  • Loading branch information...
PseudoKnight committed Aug 11, 2018
1 parent 1a6b478 commit ea2d406d29b5bbc61a07690acbecdd6526f7cacc
@@ -515,6 +515,10 @@ public static Material getMaterial(Material legacymat, int data) {
return null;
}
if(legacymat.getMaxDurability() == 0) {
if(legacymat.equals(Material.LEGACY_ANVIL)) {
// special cases where we prioritize item conversion
return Bukkit.getUnsafe().fromLegacy(new MaterialData(legacymat, (byte) data), true);
}
return Bukkit.getUnsafe().fromLegacy(new MaterialData(legacymat, (byte) data));
} else {
// ignore data when it's actually durability

0 comments on commit ea2d406

Please sign in to comment.