forked from Mineclonia/Mineclonia
self destruct book entity when table gone
This commit is contained in:
parent
6ca6da2da0
commit
6142453658
|
@ -213,6 +213,13 @@ minetest.register_entity("mcl_enchanting:book", {
|
||||||
end
|
end
|
||||||
self._player_near = player_near
|
self._player_near = player_near
|
||||||
mcl_enchanting.check_animation_schedule(self, dtime)
|
mcl_enchanting.check_animation_schedule(self, dtime)
|
||||||
|
|
||||||
|
if self._table_pos then
|
||||||
|
local tn=minetest.get_node_or_nil(self._table_pos)
|
||||||
|
if tn and tn.name ~= "mcl_enchanting:table" then
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue