Fixing excessive null chunk before earning Woodcutting experience.

This commit is contained in:
Glitchfinder 2012-11-10 12:43:08 -08:00
parent 7859660ece
commit a8a90ee815

View File

@ -424,7 +424,15 @@ public class WoodCutting {
xp = ModChecks.getCustomBlock(block).getXpGain(); xp = ModChecks.getCustomBlock(block).getXpGain();
} }
else { 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?) //Apparently species can be null in certain cases (custom server mods?)
//https://github.com/mcMMO-Dev/mcMMO/issues/229 //https://github.com/mcMMO-Dev/mcMMO/issues/229