Browse Source

More mod fixes for Woodcutting.

GJ 13 years ago
parent
commit
92acf62884
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java

+ 6 - 3
src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java

@@ -104,10 +104,10 @@ public class WoodCutting {
         for (Block x : toBeFelled) {
             if (Misc.blockBreakSimulate(x, player, true)) {
                 if (Config.getInstance().getBlockModsEnabled()) {
-                    CustomBlock block = ModChecks.getCustomBlock(x);
-                    item = block.getItemDrop();
-
                     if (ModChecks.isCustomLogBlock(x)) {
+                        CustomBlock block = ModChecks.getCustomBlock(x);
+                        item = block.getItemDrop();
+
                         if (!mcMMO.placeStore.isTrue(x)) {
                             WoodCutting.woodCuttingProcCheck(player, x);
                             xp = block.getXpGain();
@@ -120,6 +120,9 @@ public class WoodCutting {
                         Misc.dropItem(x.getLocation(), item);
                     }
                     else if (ModChecks.isCustomLeafBlock(x)) {
+                        CustomBlock block = ModChecks.getCustomBlock(x);
+                        item = block.getItemDrop();
+
                         final int SAPLING_DROP_CHANCE = 10;
 
                         /* Remove the block */