mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
Add 64 items to inventory when creative is on
This commit is contained in:
parent
be2e4614d0
commit
5515e2baa1
1 changed files with 6 additions and 0 deletions
|
@ -667,3 +667,9 @@ minetest.register_on_joinplayer(function(player)
|
|||
init(player)
|
||||
mcl_inventory.set_creative_formspec(player, 0, 1, nil, false, "nix", "")
|
||||
end)
|
||||
|
||||
minetest.register_on_player_inventory_action(function(player, action, inventory, inventory_info)
|
||||
if minetest.is_creative_enabled(player:get_player_name()) and action == "put" and inventory_info.listname == "main" then
|
||||
player:get_inventory():set_stack("main", inventory_info.index, inventory_info.stack:get_name() .. " 64")
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue