-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
-
CraftBukkit version git-Spigot-94af569-a3fdef8 (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
-
Yes
This issue appears after implementing phantom, patrols and village cats in CustomChunkGenerator (SPIGOT-5072).
If CustomChunkGenerator is used to generate chunks, then it processes phantoms, patrols village cats and sieges in any world environment.
F.e. If someone created a world with a custom chunk generator for nether and the end, then all four spawning processes will be working in them.
There are different ways how to handle it.
The easiest would be to just check if the current world is overworld in the CustomChunkGenerator#doMobSpawning method.
@Override
public void doMobSpawning(WorldServer worldserver, boolean flag, boolean flag1) {
if (this.world.getWorldProvider().isOverworld())
{
this.mobSpawnerPhantom.a(worldserver, flag, flag1);
this.mobSpawnerPatrol.a(worldserver, flag, flag1);
this.mobSpawnerCat.a(worldserver, flag, flag1);
this.villageSiege.a(worldserver, flag, flag1);
}
}
However, a proper fix would be to use 3 different generators (like it was in 1.12 version) and for each dimension, different ChunkGenerator are used.