Adds "and"
condition, the condition that is met only if all of its sub-conditions are met
list of sub-conditions, create it using LootModule.createConditionsList
reference to itself to be used in sequential calls
Adds condition registered using LootModule.registerCustomLootCondition or LootModule.registerCustomLootConditionJS.
You don't need to specify condition's name in "condition"
param of JSON description, it's internally put there.
In fact, you can use this method not only with KEX-registered conditions, but also, for example, with vanilla ones that are currently not supported by LootConditions.
condition's JSON description as an org.json.JSONObject
reference to itself to be used in sequential calls
Adds condition registered using LootModule.registerCustomLootCondition or LootModule.registerCustomLootConditionJS.
You don't need to specify condition's name in "condition"
param of JSON description, it's internally put there.
In fact, you can use this method not only with KEX-registered conditions, but also, for example, with vanilla ones that are currently not supported by LootConditions.
condition's JSON description as a JS object
reference to itself to be used in sequential calls
Adds a condition checking if the killed entity was on fire (or not if onFire
parameter is set to false).
reference to itself to be used in sequential calls
Adds a condition checking if the killed entity was on ground (or not if onGround
parameter is set to false).
reference to itself to be used in sequential calls
Adds a condition checking the killed entity being on fire and on ground at the moment of its death.
reference to itself to be used in sequential calls
Adds a condition checking if the entity was killed by a player.
reference to itself to be used in sequential calls
Adds a condition checking if the entity was killed by a player or one of their pets.
reference to itself to be used in sequential calls
Adds a condition checking the killed entity for a specific mark variant.
Mark variant is a value used to be bound to some entity's visual properties or addon-defined component groups. In vanilla it's used, for example, in villagers' clothes depending on their biome, type of flower that was given to mooshroom, tropical fish skin pattern etc.
reference to itself to be used in sequential calls
Adds "not"
condition, the condition that is met only if its sub-condition is not met
the sub-condition. Use LootModule.createConditionsList to create this object.
If you specify more than one condition to this list, the "not(conditions[0])"
structure
will be automatically replaced with "not(and(...conditions))"
reference to itself to be used in sequential calls
Adds "or"
condition, the condition that is met if any of its sub-conditions is met
list of sub-conditions, create it using LootModule.createConditionsList
reference to itself to be used in sequential calls
Adds a condition that passes only with the given chance. The chance can be specified with one fixed or two minimum and maximum values. Values must be between 0.0 (0%) and 1.0 (100%).
reference to itself to be used in sequential calls
Adds a condition that passes only with the given chance plus additional chance got from looting enchantment. Values must be between 0.0 (0%) and 1.0 (100%).
base chance of condition passing
value that will be added to the chance for each looting level
reference to itself to be used in sequential calls
Adds a condition that passes only with one of given chances depending on the game difficulty. Values must be between 0.0 (0%) and 1.0 (100%).
mandatory value that is used when some of the chance values for specific difficulty is not specified
chance of condition passing on easy game difficulty
chance of condition passing on normal game difficulty
chance of condition passing on hard game difficulty
chance of condition passing on peaceful game difficulty
reference to itself to be used in sequential calls
Adds a condition that passes only with the given chance multiplied by level's current special modifier, which formula is not known at the moment. The chance's value must be between 0.0 (0%) and 1.0 (100%).
reference to itself to be used in sequential calls
LootPool that owns the following LootConditions. Use this in sequential call when you finish describing loot pool tiers.
Generated using TypeDoc
Object representing the list of conditions of a loot pool. They are used when generating a list of randomly chosen items: the items will be chosen only if all the conditions pass. Returned by LootPool.beginConditions.
1.0