[Feature Request] Dimension blacklist for Animania spawning
MauveCloud opened this issue ยท 6 comments
Expected Behavior
Animania animals should not spawn in other dimensions by default (especially when stabilized in the overworld so that returning to existing chunks isn't causing new animals to spawn), or at least there should be a way to stop them from doing so without stopping them from spawning in the overworld.
Actual Behavior
I have a farm in the overworld with Animania cows and one with vanilla sheep (I turned off the options to force despawning of vanilla animals), yet after some work on building a grass field in the Nether, I came back to the portal and found that some Animania animals had spawned. See screenshot below.
Steps to Reproduce
- Visit the Nether (being in peaceful mode helps)
- Start building a large grass area (if not in creative mode, a few starter grass blocks can be used with torches to allow the grass to spread)
- Return to the Nether portal.
Version of Minecraft, version of Animania, Single Player or Server
Minecraft 1.12.2
Animania 1.4.8
Single Player
Screenshots encouraged
Hmm, shouldn't this be impossible since the animals are white listed for each biome?
if (AnimaniaConfig.spawn.spawnAnimaniaPigs)
{
EntityRegistry.addSpawn(EntitySowYorkshire.class, AnimaniaConfig.spawn.spawnProbabilityPigs, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.PLAINS));
EntityRegistry.addSpawn(EntitySowOldSpot.class, AnimaniaConfig.spawn.spawnProbabilityPigs, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.FOREST));
EntityRegistry.addSpawn(EntitySowLargeBlack.class, AnimaniaConfig.spawn.spawnProbabilityPigs, 1, maxFam, EnumCreatureType.CREATURE, Biomes.BIRCH_FOREST);
EntityRegistry.addSpawn(EntitySowLargeBlack.class, AnimaniaConfig.spawn.spawnProbabilityPigs, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.SWAMP));
EntityRegistry.addSpawn(EntitySowLargeWhite.class, AnimaniaConfig.spawn.spawnProbabilityPigs, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.FOREST));
EntityRegistry.addSpawn(EntitySowDuroc.class, AnimaniaConfig.spawn.spawnProbabilityPigs, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.JUNGLE));
EntityRegistry.addSpawn(EntitySowHampshire.class, AnimaniaConfig.spawn.spawnProbabilityPigs, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.MOUNTAIN));
EntityRegistry.addSpawn(EntitySowHampshire.class, AnimaniaConfig.spawn.spawnProbabilityPigs, 1, maxFam, EnumCreatureType.CREATURE, Biomes.EXTREME_HILLS, Biomes.EXTREME_HILLS_WITH_TREES);
}
Since the biome "Hell" Isn't one of the biome listed in the spawn probabilities, animals spawning there should not happen. Are you perhaps using a mod that adds more biomes to the nether? Could you open the F3 screen to show what biome this is happening in?
I do have Biomes O' Plenty (the large mushrooms in the backround didn't give that away?), but the biome around the Nether portal is "Hell":
I turned off spawning, and there is a Dynamic Surroundings dust storm going on in that screenshot.
Biomes O Plenty uses a "wrapped" version of the Hell biome, but as far as I can tell, it doesn't change the biome dictionary registration. If you look at https://github.com/MinecraftForge/MinecraftForge/blob/1.12.x/src/main/java/net/minecraftforge/common/BiomeDictionary.java#L417 you can see that Forge registers the biome as Hot, Dry, and Nether.
Looking at your code, it seems there are a few species that spawn in "dry" biomes:
EntityRegistry.addSpawn(EntityHamster.class, AnimaniaConfig.spawn.spawnProbabilityHamsters, 1, 2, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.DRY));
...
RegistryHelper.Entities.addSpawn(EntityDoeNigerianDwarf.class, AnimaniaConfig.spawn.spawnProbabilityGoats, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.DRY));
...
RegistryHelper.Entities.addSpawn(EntityEweMerino.class, AnimaniaConfig.spawn.spawnProbabilitySheep, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.DRY));
...
RegistryHelper.Entities.addSpawn(EntityRabbitDoeJack.class, AnimaniaConfig.spawn.spawnProbabilityRabbits, 1, maxFam, EnumCreatureType.CREATURE, getBiomes(BiomeDictionary.Type.DRY));
Also, I can think of a couple of dimensions added by mods that players might want to blacklist Animania animals from spawning in even though the biomes there are otherwise favorable for them: Mining World (from Aroma1997s Dimensional Worlds) and Twilight Forest.
Galacticraft dimensions would definitely be a bad place for Animania animals to automatically spawn in, but they are registered in a way that would make this possible once grass was imported - e.g. the moon is Cold, Dry, and Dead; Mars is Cold, Dry, Dead, and Sandy; Venus flat biome is Hot, Dry, Dead, and Sandy.
Hmm, well I'll let the devs give their thoughts on this one. I don't think a dimensional blacklist is the way to go as there's mods like RFTools that generate random dimensions with (I believe) random Id's within the dimension registry. That would be impossible to blacklist from animania's end.
Hold for Purp or Tschipp though, as they actually do code and stuff.
Wow @MauveCloud you are right. It's those 'Dry' tagged biome spawn entries. I see a Nigerian Dwarf, Merino Sheep, and a Jack Rabbit. That's hilarious. This is a bug. I know how to to fix it too :)
I would like to +1 this request. I use a mod called JustEnoughDimensions to create just basic worlds for my server's players to travel around and explore, independent of each other. They all have predefined IDs that I am able to specify, of course. Mods that randomly generate dimensions (that therefore have random IDs) of course are hard to account for in any circumstance... But those mods are unique cases. The functionality is still useful for cases like this.
I also make use of this feature to copy in single-player worlds that my friends would like to add in to the mix, and there are some instances where I would just rather leave the vanilla functionality intact on that dimension as much as possible. Most mods do provide blacklisting/whitelisting options to this effect. Animania is a neat mod that I'd love to be able to work with. :)