瀏覽代碼

Fixed Tree Feller dropping mushroom "blocks" instead of "items"

bm01 12 年之前
父節點
當前提交
cedd8da9ba
共有 1 個文件被更改,包括 10 次插入5 次删除
  1. 10 5
      src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java

+ 10 - 5
src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java

@@ -174,12 +174,11 @@ public final class TreeFeller {
                 break; // TODO: Shouldn't we use continue instead?
             }
 
-            switch (block.getType()) {
+            Material material = block.getType();
+
+            switch (material) {
             case HUGE_MUSHROOM_1:
             case HUGE_MUSHROOM_2:
-                // TODO: checkForDoubleDrop doesn't handle mushrooms, what's intended? Double drop or not?
-                // Woodcutting.checkForDoubleDrop(mcMMOPlayer, block);
-
                 try {
                     xp += Woodcutting.getExperienceFromLog(block, ExperienceGainMethod.TREE_FELLER);
                 }
@@ -193,7 +192,13 @@ public final class TreeFeller {
                     break;
                 }
 
-                Misc.randomDropItems(block.getLocation(), new ItemStack(block.getType(), 1), 50, 2);
+                if (material == Material.HUGE_MUSHROOM_1) {
+                    Misc.randomDropItems(block.getLocation(), new ItemStack(Material.BROWN_MUSHROOM), 50, 2);
+                }
+                else {
+                    Misc.randomDropItems(block.getLocation(), new ItemStack(Material.RED_MUSHROOM), 50, 2);
+                }
+
                 break;
             case LOG:
                 Woodcutting.checkForDoubleDrop(mcMMOPlayer, block);