Skip to content

Commit 520293b

Browse files
committedFeb 5, 2018
Item entity: Prevent motion in ignore nodes
1 parent 7b2687f commit 520293b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

Diff for: ‎builtin/game/item_entity.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ core.register_entity(":__builtin:item", {
147147
})
148148
local vel = self.object:getvelocity()
149149
local def = node and core.registered_nodes[node.name]
150-
-- Ignore is nil -> stop until the block loaded
151-
local is_moving = (def and not def.walkable) or
152-
vel.x ~= 0 or vel.y ~= 0 or vel.z ~= 0
150+
-- Avoid entity falling into ignore nodes or unloaded areas
151+
local is_moving = node and node.name ~= "ignore" and
152+
((def and not def.walkable) or vel.x ~= 0 or vel.y ~= 0 or vel.z ~= 0)
153153
local is_slippery = false
154154

155155
if def and def.walkable then

1 commit comments

Comments
 (1)

paramat commented on Feb 10, 2018

@paramat
ContributorAuthor

Beginning to think it's best to delete dropped items in ignore, just in case they 'stick' somehow out of player reach. Would also be more consistent with #7024

Please sign in to comment.