For the latest news, updates and discussion about the mod, join my official Discord server !
Loot Casket
A 1.12.2 Minecraft mod, adding the Small Casket item into the game which can be "filled" with references to loot tables.
Features
Adds a single item - the Small Casket. The casket's content can be defined using NBT tags, and it can contain the following:
A) A reference to an existing loot table. When a player opens the casket, they get a random roll of that loot table (as if they opened a chest), then the casket disappears
B) A reference to an existing loot table AND a specific pool of that table. When a player opens the casket, they get a random roll of that loot table's specified pool (as if they opened a chest), then the casket disappears
C) An NBT-serialized ItemStack - basically any item saved as an nbt tag. When a player opens the casket, they get the specific item
This mod also adds an /lcdumpitem command which can help you to get the NBT format of an item(stack) in your mainhand. The command needs op privileges.
Example Use Cases
- Pack makers can give quest rewards wrapped in caskets - just for the looks of it, or to give random rewards perhaps
- Easily reference loot tables and attach them to entities as drops, there are mods for attaching items to entities as loot.
- Etc..
- Got an idea? Tell me in the comment section!
Planned features
- Config option to attach a casket to entities as loot
- Config option to define custom caskets for mods that do not support nbt tags for their loot (e.g. Infernal Mobs)
Example Caskets
Using the /give command, you receive a Casket containing an iron ingot and a gold ingot
/give @p lootcasket:small_casket 1 0 { "Items":[{id:"minecraft:gold_ingot",Count:1b},{id:"minecraft:iron_ingot",Count:1b}]}
Using this /give command, you receive a Casket containing the content of a mineshaft chest. It also has an Epic rarity tag so it has an epic purple colored name:/give @p lootcasket:small_casket 1 0 { "LootTable": "minecraft:chests/abandoned_mineshaft", "Rarity" : "epic" }
Supported Tags
LootTable: reference to an already existing loottable. e.g. "ebwizardry:chests/shrine", "minecraft:chests/abandoned_mineshaft", "minecraft:entities/zombie"
Pool: (Optional) A pool's name in a LootTable. When specified, only loot from the specific pool will be dropped from the casket
Rolls: (Optional) The casket contains the specified loottable's loot this many times. Each roll is generated from scratch, as if you would open multiple chests with the same loottable.
Items: A list of NBT-serialized itemstacks (an item with its own nbt, damage, etc. tags). You can use the /lcdumpitem command to get the NBT format of the item you are holding. This should be in an "Items":[{},{},{},...] format, with each {} containing the ItemStack's NBT. Because this is always a list, you need the wrapping [] even if you are specifying a single stack!
Rarity: (Optional) The rarity of this Loot Casket. By default, it can be common, uncommon, rare or epic, but there are mods registering more. Any EnumRarity should work.
The LootTable (with Rolls, Pools) and Items tags are mutually exclusive.
Looking for a server to play with your friends?
Permissions
You are permitted to use this mod in any mod pack, just make sure you provide a link to this page in your credits. Redistribution in public hosting is not allowed.
Issues
If you encounter any issues or problems, you can report them in the Github issue tracker, or more preferably in discord if you want a quicker way to discuss.