getAsByte

This commit is contained in:
ALS 2021-02-21 16:59:50 +01:00
parent 12f0190f97
commit fb6c51204b

View File

@ -126,7 +126,7 @@ public final class NBTUtils {
public static void loadDataIntoItem(@NotNull ItemStack item, @NotNull NBTCompound nbt) {
if (nbt.containsKey("Damage")) item.setDamage(nbt.getInt("Damage"));
if (nbt.containsKey("Unbreakable")) item.setUnbreakable(nbt.getNumber("Unbreakable").byteValue() == 1);
if (nbt.containsKey("Unbreakable")) item.setUnbreakable(nbt.getAsByte("Unbreakable") == 1);
if (nbt.containsKey("HideFlags")) item.setHideFlag(nbt.getInt("HideFlags"));
if (nbt.containsKey("display")) {
final NBTCompound display = nbt.getCompound("display");