Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

World-Gen Whitelist in config file is not preventing biomes/mobs

clubpetey opened this issue ยท 4 comments

commented

Versions

  • Minecraft: 1.12.2
  • Forge: 2795
  • Vampirism: 1.4.9

Issue Description

Seeing Vampire mobs and vampire forest in custom dimensions

Reproduce Steps

  1. Create a dimension with JED (Just Enough Dimension)
  2. Set new dimension as spawn point for new players
  3. Load into server, confirm you are in custom dimension
  4. Move around in dimension, you will see Vampire Forest and lots of vampires/hunters

Additional Information

I could be mis-understanding the purpose of that config setting, but I would expect that if the custom dimension is not in the list, it should not have any vampire biomes or mod-specific mobs in it.

commented

The whitelist option only affects hunter camps, vampire dungeons etc.
The generated biomes are not directly controlled by Vampirism but by the WorldProvider/ChunkGenerator used by the custom dimension.
Same goes for the entity spawns, they are biome specific and therefore do not care about dimensions.

I could look into adding workaround/hacks to prevent that, but I think it is rather JED responsibility to choose which biomes should be generated.

commented

I did a quick glance through the code, so I may have missed something, but it looks like Vampires/Hunters are spawned based on height and temperature, not a specific Biome type. Since they are not registered to a Biome, things like BiomeTweaker don't work to remove them. The only thing that I could think that might work is Custom Mob Spawner, but it has a host of problems with other mods.

I think a config setting in this mob that stopped all activity (structure, mobs, village processing etc.) would be valuable as I see more and more mod-packs trying to create alternate dimensions to explore. I would be happy to create a PR for the feature, if I know it would be included.

commented

Vampire spawns are registered using the Forge Entity Registry

addSpawn(basicVampire, EnumCreatureType.MONSTER, Balance.mobProps.VAMPIRE_SPAWN_CHANCE, 1, 2, biomes);
(addSpawn is defined at the bottom of the file).
These registration takes a list of biomes as an argument (which I create by collecting all registered biomes with Zombie spawns).

Therefore Vampirism does not handle the actual spawning of vampires itself.

About the hunter mobs: They are spawned by a tent tile entity in hunter camps. Therefore disabling the generation of hunter camps also disables the spawning of hunter creatures.

I agree that it would be useful to have a single switch to completely prevent Vampirism from messing with certain dimensions, but I do not see an easy way for that.

  • VampireForest generation is handled by the dimensions world provider
  • Spawns are handled by the dimensions biomes and chunk provider and more
  • Village (generation) processing is configured in an InitMapGenEvent which does not provide any information about the dimension this is used in
commented

Ah. Missed that. This will work, I can use BiomeTweaker to remove the biome from generating. Which means the only "intrusion" will be the occasional Hunter in a Village, but that's ok.