Skip to content

Users Loot Info LootJS

Yanny edited this page Oct 14, 2026 · 4 revisions

LootJS

LootJS lets pack authors modify loot with KubeJS scripts. ALI ships an optional module that reads those script-driven modifications and shows them in the loot tree, so a drop added, replaced or removed by a script is visible in the viewer instead of silently missing.

Availability

The LootJS module is built for these Minecraft versions and loaders (see also the table on Home):

Minecraft Loaders
1.20.1 Fabric, Forge
1.21.1 NeoForge
26.1.2 NeoForge

Nothing needs to be configured: install LootJS and ALI, and the script changes appear on their own. If you need it on another version or loader, open an issue.

LootJS is the only third-party mod integration kept in ALI itself — every other mod is expected to ship its own plugin or be covered by the optional ALI Compat add-on.

What is shown

  • Loot added by a script appears in the tree of the affected block, entity or loot table, attributed to the modification.
  • Loot removed or made conditional by a script is reflected as well, so an entry that a script deletes does not keep showing as a guaranteed drop.
  • LootJS's own conditions and actions get proper tooltips, the same way vanilla conditions and functions do.
  • Side effects of a modification — experience drops, explosions and lightning strikes — appear as modifiers on the loot the modification adds after them, with their values (the amount of experience; the explosion's radius, what it does to blocks and whether it starts fires; whether the lightning hurts the entity).

The scope of a script modification (per block, per entity, per table, per type) is respected — a modification that only applies to one table does not leak into others.

What cannot be shown

Some LootJS features take a JavaScript function that only runs at the moment loot actually drops. There is nothing to read there ahead of time — the answer exists only while a specific player breaks a specific block, so ALI cannot describe what such a rule does. These entries are still listed by name, marked as "detail not available", so you at least know that an extra condition or change is in play.

At the time of writing, this affects:

LootJS call What it is
matchEntityCustom condition checking the entity with a script function
matchAttackerCustom condition checking the attacker
matchDirectAttackerCustom condition checking the direct attacker
matchPlayerCustom condition checking the player
blockEntity (callback form) condition checking the block entity
customAction free-form action run while the loot drops
modifyLoot callback that rewrites each matching item
playerAction action run on the player

Everything else — biome, dimension, structure, light level, equipment slot, distance, item filters, added and removed items, and so on — is displayed normally. LootJS may add more script-driven calls over time; the rule of thumb is that anything whose behaviour lives in a script function cannot be shown, while anything described by values can.

Clone this wiki locally