Skip to main content

Result Component

Result components define the actions executed after a raid ends (victory or loss) — such as giving items, running commands, triggering functions, spawning chests, etc.

Result component JSON files are stored under data/<mod_id>/htlib/result/.

Type Overview​

TypeDescription
htlib:item_stackItem Result: directly gives items to the player
htlib:chestChest Result: spawns a chest with loot at the raid location
htlib:eventEvent Result: triggers custom events (e.g. KubeJS integration)
htlib:functionFunction Result: invokes .mcfunction files
htlib:commandCommand Result: executes Minecraft commands
htlib:clear_raiderClear Raiders: removes all surviving raiders

Combining Results​

You can combine multiple result components in the raid's victory_results and loss_results:

// In the raid JSON
"victory_results": [
"htlib:common_function", // Execute function first
"htlib:command_function", // Then execute command
"mod_id:my_item_reward" // Finally give items
],
"loss_results": [
"htlib:clear_raiders" // Clear raiders on loss
]

Result components are executed in the order they appear in the list.

Chapter Navigation​