diff options
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java index 11a8393b..24cc45a3 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CustomItemEffects.java @@ -483,6 +483,7 @@ public class CustomItemEffects { if (!Minecraft.getMinecraft().thePlayer.isSneaking()) matchStack = getFirstItemInRuler(); match = Blocks.dirt.getDefaultState(); if (matchStack == null) return; + if (matchStack.getItem() == null) return; getBuildersRulerCandidates( Minecraft.getMinecraft().thePlayer, @@ -1478,7 +1479,7 @@ public class CustomItemEffects { matchStack = firstItemInRuler; } int itemCount; - if (matchStack != null) { + if (matchStack != null && matchStack.getItem() != null) { if (match.getBlock() == Blocks.dirt && matchStack.getItemDamage() == 0 && hasDirtWand()) { itemCount = candidatesOld.size(); } else { |