forked from MineClone5/MineClone5
Minor item entity code cleanup
This commit is contained in:
parent
37f6bfaa9a
commit
932e2dc6f8
|
@ -288,7 +288,6 @@ core.register_entity(":__builtin:item", {
|
||||||
always_collect = self.always_collect,
|
always_collect = self.always_collect,
|
||||||
age = self.age,
|
age = self.age,
|
||||||
dropped_by = self.dropped_by,
|
dropped_by = self.dropped_by,
|
||||||
collect = self._collect
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
@ -440,8 +439,7 @@ 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({x=p.x, y=p.y-0.5, z=p.z}).name
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue