소스 검색

Correctly identify tree species. Fixes #2667

t00thpick1 9 년 전
부모
커밋
a5bcc3ce58
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java

+ 9 - 0
src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java

@@ -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());