There is no replacement, it's not really deprecated. Mojang seems to be using @Deprecated to mark internal methods of Block that shouldn't be called outside of Block/StateImplementation.
You shouldn't be calling Block#getStateFromMeta under normal circumstances anyway, the whole point of the block state system is that only the block itself cares about how property values are stored in metadata and only when it's being loaded from/saved to the world.
Use Block#getDefaultState to get the Block's default IBlockState (if you don't already have an IBlockState), then chain IBlockState#withProperty calls to get an IBlockState with each property set to the appropriate value.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
There is no replacement, it's not really deprecated. Mojang seems to be using @Deprecated to mark internal methods of Block that shouldn't be called outside of Block/StateImplementation.
You shouldn't be calling Block#getStateFromMeta under normal circumstances anyway, the whole point of the block state system is that only the block itself cares about how property values are stored in metadata and only when it's being loaded from/saved to the world.
Use Block#getDefaultState to get the Block's default IBlockState (if you don't already have an IBlockState), then chain IBlockState#withProperty calls to get an IBlockState with each property set to the appropriate value.
Hello!
As I'm updating my mod, I've noticed that block.getStateFromMeta(int meta) is marked as deprecated... what would I replace this with?
For example, how would I specify what quartz block I want,
or what direction a torch should be placed?
Thank you!
There is no replacement, it's not really deprecated. Mojang seems to be using @Deprecated to mark internal methods of Block that shouldn't be called outside of Block/StateImplementation.
You shouldn't be calling Block#getStateFromMeta under normal circumstances anyway, the whole point of the block state system is that only the block itself cares about how property values are stored in metadata and only when it's being loaded from/saved to the world.
Use Block#getDefaultState to get the Block's default IBlockState (if you don't already have an IBlockState), then chain IBlockState#withProperty calls to get an IBlockState with each property set to the appropriate value.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thank you very much!