Skip to content

Loot Functions

Partonetrain edited this page Nov 19, 2026 · 1 revision

Train's Tweaks provides several loot functions for use in datapacks (or KubeJS/CraftTweaker)

  • trains_tweaks:enchant_max applies the max level of either random or specified, non-treasure, non-curse enchantments to the item. Example
  • trains_tweaks:enchant_treasure applies the max level of either random or specified treasure enchantments to the item. Example
  • trains_tweaks:enchant_curse applies the max level of either random or specified curses to the item. Example
  • trains_tweaks:enchant_all applies the max level of all relevant enchantments to the item. check_compatible: false can result in normally-impossible combinations. Example
  • trains_tweaks:randomize_exclude and trains_tweaks:randomize_include transmutes the item into one of the items not in or in the specified item tags, respectively. Use carefully as it can result in creative- or admin-only items. Example

Clone this wiki locally