From 5515e2baa169ee3e5e2fe55043f8fe3272a5269a Mon Sep 17 00:00:00 2001 From: NO11 Date: Fri, 12 Nov 2021 21:49:47 +0000 Subject: [PATCH] Add 64 items to inventory when creative is on --- mods/HUD/mcl_inventory/creative.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index 2be0be4bc1..43301ce0b2 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -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)