Home - Tmtravlr/LootOverhaul GitHub Wiki
Welcome to the loot overhaul wiki! Here you'll find a list of features in the mod and some examples of how to use them. Happy loot-making!
Editing block drops is now as easy as editing loot tables!
You can replace (or add to with _extra, see below) any block drops using loot tables.
To replace block drops, use the loot table with the name <modid>:blocks/<blockId>
. So you can override vanilla grass (minecraft:grass
) drops with the loot table minecraft:blocks/grass
. For a modded block, lets say with the id biomesoplenty:mud
, it would be biomesoplenty:blocks/mud
.
Block loot table drops can be disabled in the config file (in case it causes issues).
Sometimes when making a custom map, or modpack, you don't want to replace a whole loot table. You just want a way to add a couple items to it. With this mod, you can do that too.
To add to a loot table, simply create another loot table with the same name as the one you want to add to, with _extra at the end (so adding extras to entities/zombie
would be in entities/zombie_extra
).
This feature can be disabled in the config file, or you can blacklist certain loot tables from trying to pull in extras, in case you have a mod that happens to have a loot table ending in _extra.
The two loot tables minecraft:entities/all
and minecraft:blocks/all
allow you to add a drop to every entity death loot or block drop, respectively. This would probably be most useful combined with loot conditions, for extremely rare drops and the like.
Both of those can be disabled in the config file.
This mod contains an unnecessarily complicated way to store variables, either globally or for individual entities.
It's mostly as an alternative to using scoreboard scores, which are clunky to set up. They can store strings too, which scoreboards can't do.
/globalvar <variable name> [operation]
/entityvar <entity> <variable name> [operation]
The loot and command trigger items are a way you can generate loot or run a command when the item enters a player's inventory. They are mainly meant as a way to provide more complicated loot without needing a bunch of command blocks/functions running. Set Unwrap:true
on either so the player has to right click them to open them.
Set the loot table in the loot trigger by using LootTable:<loot table>
, and you can also give it a seed with Seed:<long seed>
. Leave out the seed if you want random loot.
/give @p lootoverhaul:trigger_loot 1 0 {Unwrap:true,LootTable:"minecraft:entities/zombie",Seed:300L}
The command trigger can run lists of commands. You can give it a simple list of commands like so:
/give @p lootoverhaul:trigger_command 1 0 {CommandList:["say First Command", "say Second Command", "say Third Command"]}
You can also chain command groups... this is a bit complicated. You can add the next command list to run in a tag called Next, and keep chaining them. When it reaches the last list of commands, it will restart from the first one unless you add Stop:true
to the last one.
/give @p lootoverhaul:trigger_command 1 0 {Unwrap:true,CommandList:["say First Command"],Next:{Unwrap:true,CommandList:["say Second Command"],Next:{Unwrap:true,CommandList:["say Third Command"],Stop:true}}}
Finally, you can also add delays to the commands, which is useful if they are running automatically (Unwrap is false)
/give @p lootoverhaul:trigger_command 1 0 {Delay:20,CommandList:["say First Command"],Next:{Delay:20,CommandList:["say Second Command"],Next:{Delay:20,CommandList:["say Third Command"],Stop:true}}}
Well, kind of. The loot system currently only supports items, so there are 6 items which will have a special effect when they drop: spawning mobs, placing blocks, creating structures, filling an area, running commands, or applying a potion effect. Click on the name for a more detailed description and examples.
Name | Description |
---|---|
lootoverhaul:loot_entity | Spawns an entity |
lootoverhaul:loot_block | Places a block |
lootoverhaul:loot_structure | Creates a structure |
lootoverhaul:loot_fill | Fills an area, with some improvements over using the fill command |
lootoverhaul:loot_command | Runs a command |
lootoverhaul:loot_effect | Applies a potion effect |
This mod adds in a fair number of new loot conditions, ranging from biome to moon phase to those entity/global variables mentioned above. Click on the name to go to a page with a more detailed description and some examples.
Name | Description |
---|---|
lootoverhaul:biome | Change loot based on biome |
lootoverhaul:biome_height | Change loot based on biome height base and variation |
lootoverhaul:biome_humidity | Change loot based on how humid a biome is |
lootoverhaul:temperature | Change loot based on temperature |
lootoverhaul:biome_type | Change loot based on forge biome types (like PLAINS, SANDY, SPOOKY) |
lootoverhaul:block_state | Change loot based on block metadata or block state |
lootoverhaul:command | Change loot based on the success/failure output of a command |
lootoverhaul:difficulty | Change loot based on the game difficulty or regional difficulty |
lootoverhaul:dimension | Change loot based on dimension |
lootoverhaul:dimension_has_sky | Change loot based on whether the dimension has a sky |
lootoverhaul:dimension_height | Change loot based on the maximum height of a dimension |
lootoverhaul:dimension_water_vaporizes | Change loot based on whether water vaporizes when placed in a dimension |
lootoverhaul:entity_type | Change loot based on entity id |
lootoverhaul:entity_variable | Change loot based on an entity variable (mentioned above) |
lootoverhaul:global_variable | Change loot based on a global variable (mentioned above) |
lootoverhaul:light_level | Change loot based on light level |
lootoverhaul:moon_phase | Change loot based on the phase of the moon |
lootoverhaul:nbt_matches | Change loot based on an entity's nbt tag |
lootoverhaul:near_block | Change loot based on nearby blocks |
lootoverhaul:not | Negates a list of loot conditions |
lootoverhaul:and | Is true if all are true in a list of loot conditions |
lootoverhaul:or | Is true if any are true in a list of loot conditions |
lootoverhaul:random_chance_with_fortune | Change loot based on fortune, mirroring vanilla looting |
lootoverhaul:can_see_sky | Change loot based on whether the sky is visible |
lootoverhaul:silk_touch | Change loot based on if the looter has silk touch |
lootoverhaul:tool_type | Change loot based on tool type looted with |
lootoverhaul:weather | Change loot based on weather |
There are also several new loot functions
Name | Description |
---|---|
lootoverhaul:custom_potion_effects | Adds a custom potion effect to an item's nbt tag |
lootoverhaul:enchantments | Adds an enchantment to an item's nbt tag |
lootoverhaul:function_group | Applies a group of functions |
lootoverhaul:replace_nbt | Replaces a string in the nbt tag with various things |
lootoverhaul:fortune_enchant | Increases drops based on fortune (mirrors vanilla looting) |
lootoverhaul:delay | Adds a delay to the loot drop |
lootoverhaul:position | Sets the loot drop's position |
lootoverhaul:offset | Adds an offset to the loot drop's position |