grvt
-
Posts
3 -
Joined
-
Last visited
Posts posted by grvt
-
-
If I'm understanding Intellij right it wants an int? It might just be me reading it wrong though.
If I am reading it wrong, what actually is that argument for?
-
I'm attempting to replace grass blocks in a world with a ModBlock I called `scorched_earth`. However, `world.setBlock()` requires a block ID. I've looked for some way to get an ID for the block but can't seem to find any workarounds? Am I just doing it wrong?
Example (incomplete) code:
private void scorch(World worldIn, BlockPos pos, Block block) { BlockState state = worldIn.getBlockState(pos); if(block.isBurning(state, worldIn, pos)) { if(block.is(Blocks.GRASS_BLOCK)) worldIn.setBlock(pos, state, 0, ModBlocks.SCORCHED_EARTH.get()); } }
[1.16.5] world.setBlock with ModBlock
in Modder Support
Posted
I know. My question was what I should be putting there, because I didn't understand the method properly.
Thank you that makes a lot more sense.