mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Correctly identify tree species. Fixes #2667
This commit is contained in:
parent
a020890244
commit
a5bcc3ce58
@ -80,6 +80,15 @@ public final class Woodcutting {
|
||||
if (blockState.getData() instanceof Tree) {
|
||||
species = ((Tree) blockState.getData()).getSpecies();
|
||||
}
|
||||
if (blockState.getType() == Material.LOG_2) {
|
||||
byte data = blockState.getRawData();
|
||||
if ((data & 1) != 0) {
|
||||
species = TreeSpecies.ACACIA;
|
||||
}
|
||||
if ((data & 2) != 0) {
|
||||
species = TreeSpecies.DARK_OAK;
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.getInstance().getWoodcuttingDoubleDropsEnabled(species)) {
|
||||
Misc.dropItems(blockState.getLocation(), blockState.getBlock().getDrops());
|
||||
|
Loading…
Reference in New Issue
Block a user