1
0
Fork 0

Don't allow banner placement on ceiling

objects
Wuzzy 2017-07-31 04:07:17 +02:00
parent 8d0c8965d7
commit 4284d3397d
1 changed files with 6 additions and 0 deletions

View File

@ -221,8 +221,14 @@ for colorid, colortab in pairs(mcl_banners.colors) do
-- Place the node!
local hanging = false
-- Standing or hanging banner. The placement rules are enforced by the node definitions
local _, success = minetest.item_place_node(ItemStack("mcl_banners:standing_banner"), placer, pointed_thing)
if not success then
-- Forbidden on ceiling
if pointed_thing.under.y ~= pointed_thing.above.y then
return itemstack
end
_, success = minetest.item_place_node(ItemStack("mcl_banners:hanging_banner"), placer, pointed_thing)
if not success then
return itemstack