Jump to content

[Solved][1.9.4] Block Hardness and IBlockState


Syndaryl

Recommended Posts

So, while updating for 1.9.4, I noticed Block.getBlockHardness() is deprecated. I assume that this is being phased out in favor of using IBlockState/BlockStateContainer. Unfortunately I know zero about BlockState and Google refuses to cough up anything other than crash logs, or BlockContainers (because Google hates programmers... :P)

 

How do I get Hardness out of a block these days?

Link to comment
Share on other sites

You call

getBlockHardness

on the

IBlockState

, which you get from the world.

 

The irony is that I had the IBlockState already, because getBlockHardness was updated to ask for it. Doesn't do anything with it, but it asks for it.

 

Good enough for me!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.