Skip to content

Commit a847abd

Browse files
committed
fixed axes not breaking leaves
closes #375
1 parent fd52a3a commit a847abd

File tree

1 file changed

+1
-3
lines changed
  • src/main/java/de/ellpeck/naturesaura/items/tools

1 file changed

+1
-3
lines changed

Diff for: src/main/java/de/ellpeck/naturesaura/items/tools/ItemAxe.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@
2121
public class ItemAxe extends AxeItem implements IModItem, ICustomItemModel {
2222

2323
private final String baseName;
24-
private final float defaultSpeed;
2524

2625
public ItemAxe(String baseName, Tier material, float damage, float speed) {
2726
super(material, new Properties().attributes(AxeItem.createAttributes(material, damage, speed)));
2827
this.baseName = baseName;
29-
this.defaultSpeed = speed;
3028
ModRegistry.ALL_ITEMS.add(this);
3129
}
3230

@@ -38,7 +36,7 @@ public String getBaseName() {
3836
@Override
3937
public float getDestroySpeed(ItemStack stack, BlockState state) {
4038
if (state.is(BlockTags.LEAVES)) {
41-
return this.defaultSpeed;
39+
return this.getTier().getSpeed();
4240
} else {
4341
return super.getDestroySpeed(stack, state);
4442
}

0 commit comments

Comments
 (0)