
Spawn Control doesn't seem to honor biome filters
Closed this issue · 3 comments
I tried using the spawning control to limit a Zombie to spawn only in the swamp, but they continue to spawn everywhere. Looking at the MobSpawnEventHandler code it looks like the only check taking place in onCheckSpawn() is whether or not the spawn event is in an allowed dimension. My configuration for the Zombie is below. Am I configuring this wrong?
<entry id="Zombie" mobName="Zombie" rate="50" minGroupSize="1" maxGroupSize="4" remove="true" creatureType="monster">
<biomeFilter type="any">
<biome type="BEACH" exclude="true"/>
<biome type="END" exclude="true"/>
<biome type="FOREST" exclude="true"/>
<biome type="HILLS" exclude="true"/>
<biome type="MESA" exclude="true"/>
<biome type="MOUNTAIN" exclude="true"/>
<biome type="MUSHROOM" exclude="true"/>
<biome type="NETHER" exclude="true"/>
<biome type="OCEAN" exclude="true"/>
<biome type="PLAINS" exclude="true"/>
<biome type="RIVER" exclude="true"/>
<biome type="SANDY" exclude="true"/>
<biome type="SNOWY" exclude="true"/>
<biome type="SWAMP" exclude="false"/>
<biome type="WASTELAND" exclude="true"/>
</biomeFilter>
</entry>
You will need to entries to do this. In the first you will need to set the
remove flag to true. This entry will remove all the existing (ie normal)
spawn rules for zombies. I think there is an example that removes all slime
spawns commented out in the user file.
Following this you will then need to add a second entry that allows them to
spawn in swamps. I think the wither witch entry does this so use that as an
example.
I am on my phone so I can't see what is there ATM. Let me know if you need
more help. If you get it working could you post the entries here? I will
add it as an example.
On 16 May 2015 10:04 am, "Mictali" [email protected] wrote:
I tried using the spawning control to limit a Zombie to spawn only in the
swamp, but they continue to spawn everywhere. Looking at the
MobSpawnEventHandler code it looks like the only check taking place in
onCheckSpawn() is whether or not the spawn event is in an allowed
dimension. My configuration for the Zombie is below. Am I configuring this
wrong?—
Reply to this email directly or view it on GitHub
#90.
I saw the example, didn't realize that just putting "remove=true" on the zombie entry wouldn't remove it from the others. When you add an entry with the remove tag will that only apply to the biomes not excluded in that entry, so that I need to list all biomes that currently allow the zombie to spawn?
To make this easier there is a special tag. As explained, see the example for removing all slime spawns:
<entry id="Slime" mobName="Slime" creatureType="monster" rate="80" remove="true">
<biomeFilter type="any">
<biome type="BASE_LAND_TYPES" />
</biomeFilter>
</entry>
Then add it back to just one biome:
<entry id="Slime" mobName="Slime" creatureType="monster" rate="80">
<biomeFilter type="any">
<biome type="SWAMP" />
</biomeFilter>
</entry>