From cedd8da9ba7c6168ae647a7d64a14fbea5f0155e Mon Sep 17 00:00:00 2001 From: bm01 Date: Sat, 16 Feb 2013 23:09:19 +0100 Subject: [PATCH] Fixed Tree Feller dropping mushroom "blocks" instead of "items" --- .../nossr50/skills/woodcutting/TreeFeller.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java b/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java index a16186126..d173b2dc2 100644 --- a/src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java +++ b/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);