How are silverfish monster eggs generated? All I know is that they are found in strongholds and igloos, but what determines which part they spawn in? (As in, is it totally random, or does it look for a certain structure/pattern etc…) The MC wiki only says:
"found in Strongholds and igloo basements, occasionally in place of normal stone bricks. "
Minecraft Java Edition – Silverfish Stone/Egg Placement
minecraft-java-edition
Related Topic
- Minecraft – How to prevent Silverfish from melding into blocks
- Minecraft – More silverfish appearing? How to stop this
- Minecraft – Ender Dragon spawn egg
- Minecraft – How many stone blocks can you mine with 36 stone pickaxes
- Minecraft Commands – How to Make a Beacon Ride an Invisible Silverfish in Minecraft
- Minecraft Java Edition – How to Safely Destroy Silverfish Blocks
- Minecraft Java Edition – Iron Farm Door Placement Guide
- Minecraft Data Packs – Changing Events When a Specific Block Is Broken in Minecraft Java Edition
Best Answer
Strongholds
As noted by Minecraft Wiki - Stronghold:
When selecting blocks to fill in with, the following function is called:
The monster egg block is selected at random from a list of other valid blocks, with the stated 5% chance of being selected in comparison.
Wherever this function is used is where monster egg blocks will be created in a stronghold. The only room in a stronghold that does not contain silverfish blocks is the "corridor" room, which connects other room types together (typically being very small).
Image example, replacing all stone bricks with lapis blocks to show what the corridor encompasses (which is where no monster egg blocks will spawn):
Igloos
Igloos make use of the new structure template system implemented in 1.9 (where structures are data-driven rather than hard-coded). The monster egg blocks are not randomly generated, but will instead appear at the same location every time as defined by the structure file.
For example, in this image, the lapis blocks represent where monster egg blocks will always be placed:
Here is the structure data being used, where
state
is the blockstate (which points to normal stone brick monster eggs) andpos
is the position relative to the corner of the structure, showing that the block is not randomly placed: