-
Notifications
You must be signed in to change notification settings - Fork 0
Variant Conditions
This is a list of conditions that your variant can use. Conditions are handled only on the server and are used to define when a variant should be sent to the client.
Conditions are defined in the conditions array in the variant json. They will look something like this:
{
"type": <condition id>,
... condition args
}
-
type: The id of the condition. -
exclusive: Boolean. Defaultfalse. If this is true and the condition passes, then the API will skip random selection and this will be the only variant. Good for breeding.
ID: variantapi:biome_condition
Args:
-
biome(Identifier): Can be the raw biome or biome tag
Defines which biomes a variant can spawn in.
ID: variantapi:structure_condition
Args:
-
strucure(Identifier): Can be raw structure or structure tag
Defines structures that the variant should spawn in
ID: variantapi:breeding_condition
Args:
-
father(Identifier): 1st Variant id to require -
mother(Identifier): 2nd Variant id to require
Father and Mother are simply for name-sake, this condition will pass as long as the two parents have these variants.
ID: l2hostility:l2hostility_level_condition
Args:
-
min(Integer): The mob level at which this variant will start showing
This condition is only used if you have the L2 Hostility Mod installed.
ID: variantapi:moon_phase_condition
Args:
-
size(Float 0-1): The minimum moon size for this variant
This condition will pass if the worlds moon size is bigger than the size specified. The worlds moon sizes are as follows:
{1.0F, 0.75F, 0.5F, 0.25F, 0.0F, 0.25F, 0.5F, 0.75F}
ID: variantapi:name_condition
Args:
-
name(String): The custom name of the mob to match (case-sensitive)
This condition will pass if a mob is given a nametag matching its name
ID: variantapi:predicate_condition
Args:
-
predicate(Identifier): The predicate to test for
ID: variantapi:any_of
You can nest other conditions inside of this one, and if any of them pass, this condition will pass.