summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-08-12 08:04:52 +1000
committermd_5 <git@md-5.net>2018-08-12 08:04:52 +1000
commitb47946ff193fc9e97777c8aed2507abce3427724 (patch)
tree025bec3558c332127dc568e162a7ab172b83da04 /src/main/java
parenta0a27e5876c97cc74158e7964d9a89805ac63a52 (diff)
downloadcraftbukkit-b47946ff193fc9e97777c8aed2507abce3427724.tar
craftbukkit-b47946ff193fc9e97777c8aed2507abce3427724.tar.gz
craftbukkit-b47946ff193fc9e97777c8aed2507abce3427724.tar.lz
craftbukkit-b47946ff193fc9e97777c8aed2507abce3427724.tar.xz
craftbukkit-b47946ff193fc9e97777c8aed2507abce3427724.zip
Fix regression in item priority conversion
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/util/CraftLegacy.java
index d98e0730..01ebbbca 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);