mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 14:46:46 +01:00
Fixed Tree Feller dropping mushroom "blocks" instead of "items"
This commit is contained in:
parent
3cb269de4b
commit
cedd8da9ba
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user