From d519eb6b4d13196e3fd31123ad82628ffb27395a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 7 Feb 2017 02:22:41 +0100 Subject: [PATCH] Remove shulker box from inv. in creative mode --- mods/craftingpack/crafting/creative.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/craftingpack/crafting/creative.lua b/mods/craftingpack/crafting/creative.lua index 89d523af..f1b8ae4e 100644 --- a/mods/craftingpack/crafting/creative.lua +++ b/mods/craftingpack/crafting/creative.lua @@ -382,7 +382,9 @@ end) if minetest.setting_getbool("creative_mode") then minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) - return true + -- Place infinite nodes, except for shulker boxes + local group = minetest.get_item_group(itemstack:get_name(), "shulker_box") + return group == 0 or group == nil end) function minetest.handle_node_drops(pos, drops, digger)