1
0
Fork 0

Remove shulker box from inv. in creative mode

This commit is contained in:
Wuzzy 2017-02-07 02:22:41 +01:00
parent 93febcac90
commit d519eb6b4d
1 changed files with 3 additions and 1 deletions

View File

@ -382,7 +382,9 @@ end)
if minetest.setting_getbool("creative_mode") then if minetest.setting_getbool("creative_mode") then
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack) 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) end)
function minetest.handle_node_drops(pos, drops, digger) function minetest.handle_node_drops(pos, drops, digger)