Allow swords to instant break bamboo
Why is this hardcoded in vanilla in such a stupid way? Shears even override their own method for this, why is it defined in the block logic?
@@ -45,9 +45,13 @@ public class SwordTool extends ToolItem {
public float getDestroySpeed(ItemStack stack, BlockState state) {
// webs are slow
float speed = super.getDestroySpeed(stack, state);
- if (state.getMaterial() == Material.WEB) {
+ Material material = state.getMaterial();
+ if (material == Material.WEB) {
speed *= 7.5f;
}
+ if (material == Material.BAMBOO || material == Material.BAMBOO_SAPLING) {
+ speed *= 100;
+ }
return speed;
}
}
