Dungeon loot chests

Adds loot chests, a command to prevent spawning loot in the chest so you can save a schematic with a loot chest, adds 2 functions to create loot in other chests

API / Library

Download (5 KB)
For Luanti 5.6 and above

How do I install this?

Dungeon loot chests

Adds:
A chests, furnaces, bookshelf, vessel with loot, a command to prevent spawning loot in the chests, furnaces, etc so you can save a schematic with a loot chest:
/loot enable
/loot disable

Function to create a new loot item list:
register_loot("name", [[
{
{name = "default:dirt", chance = 0.6, count = {2, 16}, y = {-64, 32768}, types = {"normal", "sandstone", "desert"}},
{name = "default:book", chance = 0.7},
}]])

Functions to create chests, furnaces, bookshelf, vessel with diferent loot (dungeontype is optional):
add_loot_chest("name", "description", "mod:chest", item_list, "dungeontype")
add_loot_bookshelf("name", "description", "mod:chest", item_list, "dungeontype")
add_loot_vessel("name", "description", "mod:chest", item_list, "dungeontype")
add_loot_furnace("name", "description", "mod:chest", item_list_fuel, item_list_dst, item_list_src, "dungeontype")
If you have the mod x_enchanting
add_loot_enchanting_table("name", "description", "mod:chest", item_list, "dungeontype")
add_loot_grindstone("name", "description", "mod:chest", item_list_item, item_list_trade, "dungeontype")
If you have the mod s_brewing
add_loot_brewing_stand("name", "description", "mod:chest", item_list_dst, item_list_vial, item_list_src, "dungeontype")

You can add a new item to a item list with this function:
name.register({name = "default:dirt", chance = 0.6, count = {2, 16}, y = {-64, 32768}, types = {"normal", "sandstone", "desert"}})

If you want to create a new dungeon type only in types = {" "} write the new dungeontype

If you don't put count, the item in the loot will always be 1, if you don't put y, it will appear on any coordinate, if you don't put types, it will appear in all loot chests

This are all the item lists alredy created bookshelf_loot, vessel_loot, furnace_fuel_loot, furnace_dst_loot, furnace_src_loot and dungeon_loot for chests it has "normal", "sandstone", "desert", "ice" dungeontypes.

If you have the mod s_brewing: brewing_stand_dst_loot, brewing_stand_vial_loot, brewing_stand_src_loot

If you have the mod x_enchanting: enchanting_table_item_loot, enchanting_table_trade_loot, grindstone_loot

Dungeon loot chests was created with code from dungeon_loot by sfan5

Installation

ContentDB

  • Content > Browse Online Content
  • Search for "Dungeon loot chests"
  • Click Install

Manually

  • Unzip the archive, rename the folder to dungeon_loot_chests and place it in .../minetest/mods/

  • GNU/Linux: If you use a system-wide installation place it in ~/.minetest/mods/.

The Luanti engine can be found at GitHub.

For further information or help, see: Installing Mods.

License

See LICENSE.txt

Reviews

Review

Do you recommend this mod?

  • English

    Help

    Can you help me, i tried to disable loot generation with /loot disable and /grantme server. So everytime i try to put a loot chest it transforms into a default chest, i can't do a dungeon schematic for a mod i'm working on.

    What should i do ?

    3 comments

Used By