Put treasure loot into random inventory slots
This commit is contained in:
parent
7851cee45e
commit
1daf9b7a59
4 changed files with 58 additions and 12 deletions
|
@ -366,9 +366,7 @@ minetest.register_on_generated(function(minp, maxp)
|
|||
local meta = minetest.get_meta(cpos)
|
||||
local inv = meta:get_inventory()
|
||||
local items = get_loot()
|
||||
for i=1, math.min(#items, inv:get_size("main")) do
|
||||
inv:set_stack("main", i, ItemStack(items[i]))
|
||||
end
|
||||
mcl_loot.fill_inventory(inv, "main", items)
|
||||
end
|
||||
|
||||
-- Mob spawners are placed seperately, too
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue