I've already made the block, i just want it to be replaced with another block when it touches lava, like how water turns into cobblestone when covered in lava.
You could try overriding updateTick in your custom block's class, checking for lava in in neighbouring BlockPos' then updating the current blockstate to whatever you want.
The BlockMushroom class has enough of the method calls you'll need, I'd suggest looking at that. Note that this is for spreading mushrooms, but it still checks surrounding blocks then changes those blocks, which is close enough to learn!
I've already made the block, i just want it to be replaced with another block when it touches lava, like how water turns into cobblestone when covered in lava.
You could try overriding updateTick in your custom block's class, checking for lava in in neighbouring BlockPos' then updating the current blockstate to whatever you want.
The BlockMushroom class has enough of the method calls you'll need, I'd suggest looking at that. Note that this is for spreading mushrooms, but it still checks surrounding blocks then changes those blocks, which is close enough to learn!
Check out my Youtube channel, where I build a theme park in vanilla Minecraft!
https://www.youtube.com/playlist?list=PLeCiIIOoWhe-mq3nYd_nXXrKw9MkjnUU7