Преглед на файлове

Fixed bug with Tree Feller changing durability too soon.

GJ преди 13 години
родител
ревизия
dda8c0c9e0
променени са 2 файла, в които са добавени 5 реда и са изтрити 4 реда
  1. 2 1
      Changelog.txt
  2. 3 3
      src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java

+ 2 - 1
Changelog.txt

@@ -14,7 +14,8 @@ Version 1.3.09
  = Fixed bug with duping blocks via piston pushing
  = Fixed bug with falling sand/gravel not being tracked
  = Fixed bug with Tree Feller not working with custom axes
- = Fixed bug with locale strings when trying to teleport to a non-existent player.
+ = Fixed bug with locale strings when trying to teleport to a non-existent player
+ = Fixed bug with Tree Feller changing durability before checking for axe splintering
  ! Changed Spout settings to be in their own config file (spout.yml)
 
 Version 1.3.08

+ 3 - 3
src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java

@@ -67,9 +67,6 @@ public class WoodCutting {
         int xp = 0;
         ItemStack inHand = player.getItemInHand();
 
-        /* Damage the tool */
-        inHand.setDurability((short) (inHand.getDurability() + durabilityLoss));
-
         /* This is to prevent using wood axes everytime you tree fell */
         if (ModChecks.isCustomTool(inHand)) {
             if (inHand.getDurability() + durabilityLoss >= ModChecks.getToolFromItemStack(inHand).getDurability()) {
@@ -94,6 +91,9 @@ public class WoodCutting {
             return;
         }
 
+        /* Damage the tool */
+        inHand.setDurability((short) (inHand.getDurability() + durabilityLoss));
+
         //Prepare ItemStacks
         ItemStack item = null;
         ItemStack oak = new ItemStack(Material.LOG, 1, (short) 0, TreeSpecies.GENERIC.getData());