Fix item on_step callback to call previous registered on_step callback - fixes missing light on dropped items when using wielded_light mod

This commit is contained in:
Jason Spangler 2019-05-02 19:39:36 -05:00
parent 1ed1bdfadb
commit 21c9db91f8
1 changed files with 4 additions and 0 deletions

View File

@ -300,6 +300,8 @@ if not time_to_live then
time_to_live = 300
end
local builtin_item = minetest.registered_entities["__builtin:item"]
core.register_entity(":__builtin:item", {
initial_properties = {
hp_max = 1,
@ -509,6 +511,8 @@ core.register_entity(":__builtin:item", {
self.object:remove()
end
builtin_item.on_step(self, dtime)
local p = self.object:get_pos()
local node = core.get_node_or_nil(p)
local in_unloaded = (node == nil)