Selaa lähdekoodia

Fix Tree Feller not working but still awarding XP.

GJ 12 vuotta sitten
vanhempi
sitoutus
19068dee03

+ 1 - 1
src/main/java/com/gmail/nossr50/skills/woodcutting/TreeFeller.java

@@ -223,7 +223,7 @@ public final class TreeFeller {
 
             blockState.setRawData((byte) 0x0);
             blockState.setType(Material.AIR);
-            blockState.update();
+            blockState.update(true);
         }
 
         Users.getPlayer(player).beginXpGain(SkillType.WOODCUTTING, xp);

+ 2 - 1
src/main/java/com/gmail/nossr50/skills/woodcutting/Woodcutting.java

@@ -146,7 +146,8 @@ public final class Woodcutting {
         }
         else {
             Location location = blockState.getLocation();
-            ItemStack item = blockState.getData().toItemStack();
+            Tree tree = (Tree) blockState.getData();
+            ItemStack item = new ItemStack(Material.LOG, 1, tree.getSpecies().getData());
 
             switch (((Tree) blockState.getData()).getSpecies()) {
             case GENERIC: