Posted March 12, 20223 yr Hi I have a custom chest that is lockable and unlockable, I have found how to change the explosion resistance depending if its locked or not: @Override public float getExplosionResistance(BlockState state, BlockGetter world, BlockPos pos, Explosion explosion) { return state.getValue(IS_LOCKED) ? 1000000F : super.getExplosionResistance(state, world, pos, explosion); } But can't find a method like there used to be to adjust the block hardness (i believe it was called getBlockHardnessLevel or something) which has obviously been removed in 1.18 Is there anything that has replaced it? Former developer for DivineRPG, Pixelmon and now the maker of Essence of the Gods
March 13, 20223 yr Author Looks like that was the way to go, cheers 👍 Former developer for DivineRPG, Pixelmon and now the maker of Essence of the Gods
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.