
shearampuzzled
Members-
Content Count
1 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout shearampuzzled
-
Rank
Tree Puncher
-
Have a modblock break faster with shears, like wool?
shearampuzzled posted a topic in Modder Support
I found the code to make wool blocks break faster with shears in the ItemShears class: public float getDestroySpeed(ItemStack stack, IBlockState state) { Block block = state.getBlock(); if (block != Blocks.WEB && state.getMaterial() != Material.LEAVES) { return block == Blocks.WOOL ? 5.0F : super.getDestroySpeed(stack, state); } else { return 15.0F; } } It checks specifically against wool, and the superclass method in Item just returns a constant. (As far as I'm aware, I can't override this item method of shears from my mod block class, since the shears handle the speed, not the block.) Is there a way to get a custom block to break faster with shears, like wool?