-
Notifications
You must be signed in to change notification settings - Fork 107
Global Loot Modifiers
Global Loot Modifiers are a Forge feature to apply a function to modify the list of drops generated from a loot table. Mantle provides several serializers for global loot modifiers to perform generic operations, which are documented on this page.
Pulls loot from another loot entry and adds it to the loot table. Ideal to add an extra drop to an item or entity. Not ideal for adding loot to chests.
-
type
(String): Alwaysmantle:add_entry
-
conditions
(array): Array of conditions. All must pass for this loot modifier to apply. -
modifier_conditions
(array): Array of modifier conditions for this modifier to apply. All must pass for this loot modifier to apply, if unspecified the it always applies. -
entry
(Loot Entry: Loot entry to sample for loot. -
functions
(array): Array of loot functions to apply to the loot after generating. In some cases this can also be done via the loot entry, but not all loot entries support that.
Replaces all copies of an ingredient with an item. Ideal for replacing bones dropped by a wither skeleton with necrotic bones.
-
type
(String): Alwaysmantle:add_entry
-
conditions
(array): Array of conditions. All must pass for this loot modifier to apply. -
original
(Ingredient): Any items matching this ingredient are replaced with the replacement -
replacement
(ItemOutput): Item to replace the items. If it has a count, the count is multiplied by the number of matches of the ingredient.
Mantle adds a new type of condition for some of its global loot modifiers, allowing conditioning on the generated loot so far.
Base condition type that inverts another condition. Returns true of the nested condition returns false.
-
type
(String): Alwaysmantle:inverted
-
condition
(Condition): Another condition object nested inside
Condition that requires no loot to have been generated so far.
-
type
(String): Alwaysmantle:empty
Condition that ensures the loot contains the specified item.
-
type
(String): Alwaysmantle:contains_item
-
ingredient
(Ingredient): Ingredient that must be found -
needed
(integer): Number of copies of the ingredient that must be present for the condition to pass. If unset, defaults to 1