Remove shulker box from inv. in creative mode
This commit is contained in:
parent
93febcac90
commit
d519eb6b4d
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user