mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 00:30:07 +01:00
TreeFeller.dropBlocks cleanup
This commit is contained in:
parent
91010f2958
commit
3cb269de4b
@ -177,33 +177,24 @@ public final class TreeFeller {
|
|||||||
switch (block.getType()) {
|
switch (block.getType()) {
|
||||||
case HUGE_MUSHROOM_1:
|
case HUGE_MUSHROOM_1:
|
||||||
case HUGE_MUSHROOM_2:
|
case HUGE_MUSHROOM_2:
|
||||||
Woodcutting.checkForDoubleDrop(mcMMOPlayer, block);
|
// TODO: checkForDoubleDrop doesn't handle mushrooms, what's intended? Double drop or not?
|
||||||
|
// Woodcutting.checkForDoubleDrop(mcMMOPlayer, block);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
xp += Woodcutting.getExperienceFromLog(block, ExperienceGainMethod.TREE_FELLER);
|
xp += Woodcutting.getExperienceFromLog(block, ExperienceGainMethod.TREE_FELLER);
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException exception) {
|
catch (IllegalArgumentException exception) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Stems have a block data value of 15 and should not drop mushrooms
|
// Stems have a block data value of 15 and should not drop mushrooms
|
||||||
//0-2 mushrooms drop when you break a block
|
// 0-2 mushrooms drop when you break a block
|
||||||
if(block.getData() != (byte) 15) {
|
if (block.getData() == (byte) 15) {
|
||||||
switch(block.getType()) {
|
break;
|
||||||
case HUGE_MUSHROOM_1:
|
}
|
||||||
Misc.randomDropItem(block.getLocation(), new ItemStack(Material.BROWN_MUSHROOM, 1), 50);
|
|
||||||
Misc.randomDropItem(block.getLocation(), new ItemStack(Material.BROWN_MUSHROOM, 1), 50);
|
|
||||||
break;
|
|
||||||
case HUGE_MUSHROOM_2:
|
|
||||||
Misc.randomDropItem(block.getLocation(), new ItemStack(Material.RED_MUSHROOM, 1), 50);
|
|
||||||
Misc.randomDropItem(block.getLocation(), new ItemStack(Material.RED_MUSHROOM, 1), 50);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
Misc.randomDropItems(block.getLocation(), new ItemStack(block.getType(), 1), 50, 2);
|
||||||
|
break;
|
||||||
case LOG:
|
case LOG:
|
||||||
Woodcutting.checkForDoubleDrop(mcMMOPlayer, block);
|
Woodcutting.checkForDoubleDrop(mcMMOPlayer, block);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user