Question(s) on mob replacement
Winddbourne opened this issue ยท 1 comments
I'd like to limit the number of different mobs that can spawn in each biome and then change them as the player progresses through the pack . . . I imagine doing this by using mob replacement as follows:
The game rolls a zombie as one of the mobs that can spawn . . . but zombies are blocked because the player has moved on to stage two and so it is replaced by a husk which won't burn up in the daylight . . .
The player moves on to stage three . . . again a zombie is rolled and the game looks to replace it with a husk but now husks are blocked . . . I've set husks to be replaced by Ghouls from another mod so the ghoul spawns instead.
In all of these instances, I've only had one hostile mob spawn rolled for by the game: A zombie. But due to replacement rules as the player advances further and further into the game that zombie keeps getting replaced by other mobs as the previous level locks and the new one opens up.
Is this something that would work?
Also, can you set up several replacement mobs that could validly replace something like a zombie?
For example, what would happen if I wanted to randomly replace zombies with one of several different successor creatures? Would I be able to do that just by writing multiple lines of code like this:
mods.MobStages.addReplacement("minecraft:zombie", "minecraft:bat");
mods.MobStages.addReplacement("minecraft:zombie", "minecraft:skeleton");
Or would only the last replacement be kept?
Mobs can only have one replacement at a time, so it is just overwriting the last one. Replacements are also independent of the stage being set, so you can not change this behavior based on the stages the player has. You should look into mods like InControl which provide more control over the spawning system of the game.