Global Loot Modifiers - SlimeKnights/Mantle GitHub Wiki
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.
Add Entry
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.
Keys
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.
Replace Item
Replaces all copies of an ingredient with an item. Ideal for replacing bones dropped by a wither skeleton with necrotic bones.
Keys
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 replacementreplacement
(ItemOutput): Item to replace the items. If it has a count, the count is multiplied by the number of matches of the ingredient.
Loot Modifiers Conditions
Mantle adds a new type of condition for some of its global loot modifiers, allowing conditioning on the generated loot so far.
Inverted
Base condition type that inverts another condition. Returns true of the nested condition returns false.
Keys
type
(String): Alwaysmantle:inverted
condition
(Condition): Another condition object nested inside
Empty
Condition that requires no loot to have been generated so far.
Keys
type
(String): Alwaysmantle:empty
Contains item
Condition that ensures the loot contains the specified item.
Keys
type
(String): Alwaysmantle:contains_item
ingredient
(Ingredient): Ingredient that must be foundneeded
(integer): Number of copies of the ingredient that must be present for the condition to pass. If unset, defaults to 1