mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-19 01:21:05 +01:00
Make sure banner drops, even if banner entity doesn't exist
This commit is contained in:
parent
a98f79763b
commit
088922dc33
1 changed files with 8 additions and 8 deletions
|
@ -133,6 +133,8 @@ local function on_destruct_banner(pos, hanging)
|
||||||
local ent = v:get_luaentity()
|
local ent = v:get_luaentity()
|
||||||
if ent and ent.name == nodename then
|
if ent and ent.name == nodename then
|
||||||
v:remove()
|
v:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
-- Drop item
|
-- Drop item
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local item = meta:get_inventory():get_stack("banner", 1)
|
local item = meta:get_inventory():get_stack("banner", 1)
|
||||||
|
@ -141,8 +143,6 @@ local function on_destruct_banner(pos, hanging)
|
||||||
else
|
else
|
||||||
minetest.handle_node_drops(pos, {"mcl_banners:banner_item_white"})
|
minetest.handle_node_drops(pos, {"mcl_banners:banner_item_white"})
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_destruct_standing_banner(pos)
|
local function on_destruct_standing_banner(pos)
|
||||||
|
|
Loading…
Reference in a new issue