Join our discord
In partnership with NodeCraft Logo NodeCraft


You are not logged in! Create an account or login to contribute! Log in here!

Better Spawner/Composite Condition

From Pixelmon Wiki

Composite Conditions are a larger type of condition for spawning. It is made up of two lists of spawn condition, the first called "conditions", and the second called "anticonditions". A composite spawning condition succeeds if at least one of the conditions in the "conditions" list succeeds, and if none in the "anticonditions" list succeeds. For example, consider the following composite condition as it would be named in a SpawnInfo:

"compositeCondition": {
    "conditions": [
	{
	    "minX": 30,
	    "maxX": 70,
	    "minZ": 30,
	    "maxZ": 70
	},
	{
	    "minX": 250,
	    "maxX": 350,
	    "minZ": 30,
	    "maxZ": 30
	}
    ],
    "anticonditions": [
	{
            "tag": "legendary"
	},
	{
	    "stringBiomes": [
		"minecraft:forest_hills"
	    ]
	}
    ]
}

In this example, the entity will only spawn if they are within either of the two sets of x and z coordinates, as well as being neither tagged as a legendary nor in a Forest Hills biome. Having the anticonditions being separate like this is important, because otherwise being tagged as a legendary would not be enough for an anticondition to succeed; it would need to be both tagged as a legendary and be in that biome.

Composite conditions can be used in SpawnInfos or as the "globalCompositeCondition" property in the Better Spawner config.

© 2012 - 2025 Pixelmon Mod