You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[1.12] Mining Level Suggestion for different stone types #20
net.minecraft.block.Block#getActualState and net.minecraft.block.Block#getHardness both take an IBlockState, a World and a BlockPos - this shows promise, but both are also marked as Deprecated.
Lastly there is net.minecraft.block.Block#onBlockAdded - which has the following comment:
/** * Called after the block is set in the Chunk data, but before the Tile Entity is set */```
Idon't know if this means that it is only called for blocks with TE'sbutitseemslikeitcouldbeusedtosetthehardnessforaspecificblock. IssueisthateachblockisjustanIBlockStatelinkedtoasingleinstanceandthatcouldbeanissue.
Even better is that we can do it in the Block#getBlockHardness and also in the proper place in the block state (people should be doing world.getBlockState(BlockPos).getBlockHardness(world, pos) and not the old "ask the block" version anyway, but...)
Activity
dshadowwolf commentedon Nov 30, 2017
net.minecraft.block.Block#getActualState and net.minecraft.block.Block#getHardness both take an IBlockState, a World and a BlockPos - this shows promise, but both are also marked as Deprecated.
Lastly there is net.minecraft.block.Block#onBlockAdded - which has the following comment:
dshadowwolf commentedon Nov 30, 2017
Even better is that we can do it in the Block#getBlockHardness and also in the proper place in the block state (people should be doing world.getBlockState(BlockPos).getBlockHardness(world, pos) and not the old "ask the block" version anyway, but...)