Started by
Educatedconyo
on
Topic category: Help with Minecraft modding (Java Edition)
I am trying to add this block that I made called "Rat Hole" to the world generation. I want it to be an infrequent spawn that has a chance at replacing grass blocks in forests (all forest types) and plains. I have tried a couple things but I just don't think I understand generation enough.
Edited by Educatedconyo on Mon, 11/24/2025 - 23:46
Thee is an element you can create called "Features", This allows you to generate structures or features in the world, you can select the biomes, select what types of blocks to replace. You can also generate the amount and rarity of these features with "generate placement". For your generation stage, you should use surface structures. What you need to do is check if the current block is tagged as a log, or matches a list of blocks you choose, then have a small chance to replace that block with your "Rat Hole" Block.
How do I check if the current block is tagged as a log?
minecraft:logs, or you can create your own tag like such yourmodname:logs(add every vanilla log+ your own)
Alright, how exactly do I get the random chance to replace it with my block tho? I've been looking through the list of things I can do and I'm not seeing anything that directly replaces it
For random chance there is a with 1 in [number/5] chance in the "common placements" tab.
I assume you want this to be a single block to be changed correct? So there there is a feature in "misc features" near the bottom called simple block feature, use that to place the block.
And have it inside of a condition stating that the "block at position xyz is in block list or tag:" then your tag, in "conditional placements" tab
Hope this helps.
Thankyou so much! It works now