1
0
Fork 0

Better item flowing

This commit is contained in:
Wuzzy 2017-02-16 18:37:11 +01:00
parent 3e0ac2127b
commit 6aa67cd518
2 changed files with 2 additions and 1 deletions

View File

@ -350,7 +350,6 @@ core.register_entity(":__builtin:item", {
return return
end end
local p = self.object:getpos() local p = self.object:getpos()
p.y = p.y - 0.5
local node = core.get_node_or_nil(p) local node = core.get_node_or_nil(p)
local in_unloaded = (node == nil) local in_unloaded = (node == nil)
if in_unloaded then if in_unloaded then
@ -425,6 +424,8 @@ core.register_entity(":__builtin:item", {
end end
-- If node is not registered or node is walkably solid and resting on nodebox -- If node is not registered or node is walkably solid and resting on nodebox
p.y = p.y - 0.5
local nn = minetest.get_node(p).name
local v = self.object:getvelocity() local v = self.object:getvelocity()
if not core.registered_nodes[nn] or core.registered_nodes[nn].walkable and v.y == 0 then if not core.registered_nodes[nn] or core.registered_nodes[nn].walkable and v.y == 0 then