1
0
Fork 0

Add 64 items to inventory when creative is on

new_mapgen_api
NO11 2021-11-12 21:49:47 +00:00
parent be2e4614d0
commit 5515e2baa1
1 changed files with 6 additions and 0 deletions

View File

@ -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)