Loot Tables - SlimeKnights/Mantle GitHub Wiki

This page documents loot conditions and loot functions added by Mantle, for use in the vanilla loot tables. See Global Loot Modifiers for a way to genericly modify loot tables.

Conditions

Loot conditions allow restricting when most elements of loot tables apply, along with when a global loot modifier applies. Mantle adds one new condition.

Block Tag

Variation on the vanilla minecraft:block_state_property condition that takes a block tag instead of a block name. Matches any block that is in the tag and has the specified properties. Only works on loot tables from breaking blocks.

Keys

  • type (String): Always mantle:block_tag
  • tag (ResourceLocation): Block tag ID. The relevant block to the loot table must be in this tag to pass
  • properties (JsonObject): Map of property name to values. The block must have all specified properties and the properties must match the corresponding value for the condition to pass. If unset, does not check properties.

Functions

Loot functions can modify an item or a group of items after a loot table generates. Mantle adds several new functions.

Set Fluid

Fills a fluid container item stack using the forge IFluidHandler capability. If the item cannot be filled or is not a fluid handler, the function has no result.

Keys

  • type (String): Always mantle:set_fluid
  • fluid (FluidStack): Fluid to add to the item

Retextured

Sets the texture on a block that dropped from textured tile entity. Only works on loot tables from breaking blocks.

Keys

  • type (String): Always fill_retextured_block