New Loot Types Loot Command - Tmtravlr/LootOverhaul GitHub Wiki
Tag | Type | Description |
---|---|---|
Command | String or List of Strings | Single command to run or a list of commands. |
Sender | String | Selector for who should run the command, like @p. Can be set by the Replace NBT function as well. (Optional) |
This item will run a command as soon as it enters the world.
Example Usage: Sending a global message to all players (from the server)
{
"type": "item",
"name": "lootoverhaul:loot_command",
"weight": 1,
"functions": [
{
"function": "set_nbt",
"tag": "{Command:\"tellraw @a \\\"The wither has been defeated!\\\"\"}"
}
]
}
Example Usage: Teleports the looting (or killing) entity up 2 blocks and gives them a piece of coal.
{
"type": "item",
"name": "lootoverhaul:loot_command",
"weight": 1,
"functions": [
{
"function": "set_nbt",
"tag": "{Sender:\"#looter\",Command:[\"tp ~ ~2 ~\",\"give #looter coal\"]}"
},
{
"function": "lootoverhaul:replace_nbt",
"replace": "#looter",
"uuid": "looter"
}
]
}
Previous - Loot Fill | Back | Next - Loot Effect |
---|