I'm trying to deny all mobs except Enderman from spawning in the Warped Forest biome. This is my config:
rules:
- name: Allow Enderman in Warped Forest
what: ALLOW_SPAWN
when:
entityId : ['minecraft:enderman']
biomeId : ['minecraft:warped_forest']
- name: Deny all other mobs in Warped Forest
what: DISALLOW_SPAWN
when:
spawnGroup: [MONSTER, CREATURE, WATER_CREATURE, AMBIENT, MISC, WATER_AMBIENT]
biomeId : ['minecraft:warped_forest']
And this is what appears in the server log when using TRACE level logging:
[21:59:14] [Server thread/TRACE]: [MobFilter] IS_SPAWN_ALLOWED SpawnRequest[serverWorld=ServerLevel[world], spawnGroup=MONSTER, structureAccessor=net.minecraft.class_5138@2cef6179, chunkGenerator=net.minecraft.class_3754@749112d5, spawnEntry=doom:chaingunner*(1-4):14, blockPos=class_2339{x=-291, y=49, z=-776}, squaredDistance=2351.2637847793617, logger=net.pcal.mobfilter.MFService:TRACE in 12843fce]
[21:59:14] [Server thread/TRACE]: [MobFilter] RULE 'Allow Enderman in Warped Forest'
[21:59:14] [Server thread/TRACE]: [MobFilter] EntityNameCheck doom:chaingunner in [minecraft:enderman] false
[21:59:14] [Server thread/TRACE]: [MobFilter] RULE 'Deny all other mobs in Warped Forest'
[21:59:14] [Server thread/TRACE]: [MobFilter] SpawnGroupCheck: [MONSTER, CREATURE, AMBIENT, WATER_CREATURE, WATER_AMBIENT, MISC] MONSTER true true
[21:59:14] [Server thread/TRACE]: [MobFilter] BiomeCheck null in [minecraft:warped_forest] false
[21:59:14] [Server thread/TRACE]: [MobFilter] RETURN true (no rules matched)
[21:59:14] [Server thread/TRACE]: [MobFilter] ALLOW doom:chaingunner at [-291, 49, -776]
[21:59:14] [Server thread/TRACE]: [MobFilter] IS_SPAWN_ALLOWED SpawnRequest[serverWorld=ServerLevel[world], spawnGroup=MONSTER, structureAccessor=net.minecraft.class_5138@2cef6179, chunkGenerator=net.minecraft.class_3754@749112d5, spawnEntry=minecraft:magma_cube*(4-4):40, blockPos=class_2339{x=-232, y=72, z=-816}, squaredDistance=2499.48104878852, logger=net.pcal.mobfilter.MFService:TRACE in 12843fce]
[21:59:14] [Server thread/TRACE]: [MobFilter] RULE 'Allow Enderman in Warped Forest'
[21:59:14] [Server thread/TRACE]: [MobFilter] EntityNameCheck minecraft:magma_cube in [minecraft:enderman] false
[21:59:14] [Server thread/TRACE]: [MobFilter] RULE 'Deny all other mobs in Warped Forest'
[21:59:14] [Server thread/TRACE]: [MobFilter] SpawnGroupCheck: [MONSTER, CREATURE, AMBIENT, WATER_CREATURE, WATER_AMBIENT, MISC] MONSTER true true
[21:59:14] [Server thread/TRACE]: [MobFilter] BiomeCheck null in [minecraft:warped_forest] false
[21:59:14] [Server thread/TRACE]: [MobFilter] RETURN true (no rules matched)
[21:59:14] [Server thread/TRACE]: [MobFilter] ALLOW minecraft:magma_cube at [-232, 72, -816]
It seems the problem is that the biome check always fails, always allowing the spawn to happen.
I added this mod to the AQM2 modpack, so there are other mods loaded.
I'm trying to deny all mobs except Enderman from spawning in the Warped Forest biome. This is my config:
And this is what appears in the server log when using TRACE level logging:
It seems the problem is that the biome check always fails, always allowing the spawn to happen. I added this mod to the AQM2 modpack, so there are other mods loaded.