From a8a90ee815adc808f9ce7b232ef2ee7ff01d077c Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Sat, 10 Nov 2012 12:43:08 -0800 Subject: [PATCH] Fixing excessive null chunk before earning Woodcutting experience. --- .../gmail/nossr50/skills/gathering/WoodCutting.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java b/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java index 60148c5b9..1bec35c07 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java @@ -424,7 +424,15 @@ public class WoodCutting { xp = ModChecks.getCustomBlock(block).getXpGain(); } else { - TreeSpecies species = TreeSpecies.getByData(block.getData()); + byte type = block.getData(); + + if((type & 0x4) == 0x4) + type ^= 0x4; + + if((type & 0x8) == 0x8) + type ^= 0x8; + + TreeSpecies species = TreeSpecies.getByData(type); //Apparently species can be null in certain cases (custom server mods?) //https://github.com/mcMMO-Dev/mcMMO/issues/229