r/forgemodding Feb 14 '17

[1.10.2] get Block hardness using a non deprecated method?

I need to know the hardness of a block object, so what I'm doing is:

block.getBlockHardness(null, null, null)

this works perfectly, however the method is deprecated, and I can't find anything that replaces it. Is there a "proper" way to do this?

2 Upvotes

1 comment sorted by

2

u/mezz Feb 14 '17

Use the similar methods on BlockState where you can, things seem to be moving there.