Hello,
There's a very nasty bug that appear if you try this kind of code that replace a block by another one (it also happens if you only replace the model of the block by another one) :
@EventBusSubscriber(modid = ModBug.MODID, bus = Bus.MOD)
public class BlockBug
{
@SubscribeEvent
public static void registerBlocks(RegistryEvent.Register<Block> event)
{
event.getRegistry().register(new Block(Block.Properties.from(Blocks.DIRT).lightValue(15)).setRegistryName(Blocks.DIRT.getRegistryName()));
}
@SubscribeEvent
public static void registerItems(RegistryEvent.Register<Item> event)
{
event.getRegistry().register(new BlockItem(Blocks.DIRT, new Item.Properties().group(ItemGroup.BUILDING_BLOCKS)).setRegistryName(Blocks.DIRT.getRegistryName()));
}
}
So the item was correctly replaced and the block is placed correctly, but the world generation is broken.
You'll surely not be able to destroy nor walk inside those broken "ghost" blocks.
When you disconnect then reconnect from the game the ghost block disappear.
Of course, this doesn't happen only for dirt if you try to replace other blocks, it will also happen for them.