mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-09-12 00:56:53 +02:00
Make sure banner drops, even if banner entity doesn't exist
This commit is contained in:
parent
a98f79763b
commit
088922dc33
@ -133,16 +133,16 @@ local function on_destruct_banner(pos, hanging)
|
||||
local ent = v:get_luaentity()
|
||||
if ent and ent.name == nodename then
|
||||
v:remove()
|
||||
-- Drop item
|
||||
local meta = minetest.get_meta(pos)
|
||||
local item = meta:get_inventory():get_stack("banner", 1)
|
||||
if not item:is_empty() then
|
||||
minetest.handle_node_drops(pos, {item:to_string()})
|
||||
else
|
||||
minetest.handle_node_drops(pos, {"mcl_banners:banner_item_white"})
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Drop item
|
||||
local meta = minetest.get_meta(pos)
|
||||
local item = meta:get_inventory():get_stack("banner", 1)
|
||||
if not item:is_empty() then
|
||||
minetest.handle_node_drops(pos, {item:to_string()})
|
||||
else
|
||||
minetest.handle_node_drops(pos, {"mcl_banners:banner_item_white"})
|
||||
end
|
||||
end
|
||||
|
||||
local function on_destruct_standing_banner(pos)
|
||||
|
Loading…
Reference in New Issue
Block a user