diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java index d98e0730d5..01ebbbca6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java @@ -20,6 +20,7 @@ import net.minecraft.server.DynamicOpsNBT; import net.minecraft.server.IBlockData; import net.minecraft.server.IBlockState; import net.minecraft.server.Item; +import net.minecraft.server.Items; import net.minecraft.server.MinecraftKey; import net.minecraft.server.NBTBase; import net.minecraft.server.NBTTagCompound; @@ -406,6 +407,10 @@ public class CraftLegacy { // Preconditions.checkState(newId.contains("minecraft:"), "Unknown new material for " + matData); Item newMaterial = Item.REGISTRY.get(new MinecraftKey(newId)); + if (newMaterial == Items.AIR) { + continue; + } + materialToItem.put(matData, newMaterial); if (!itemToMaterial.containsKey(newMaterial)) { itemToMaterial.put(newMaterial, matData);