[SPIGOT-7934] Item entities start "bouncing" under certain conditions Created: 28/Oct/24  Updated: 25/Dec/24  Resolved: 02/Nov/24

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Cave Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows 11 22631.4317
OpenJDK Runtime Environment Temurin-21.0.5+11

Debian 11.9
OpenJDK Runtime Environment Temurin-21.0.3+9


Attachments: File item_entity_bug.mp4     File item_entity_bug_2.mp4    
Version: 4361-Spigot-5eb8a94-6029040 (MC: 1.21.3) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

While there is no player within 16x16 blocks of an item entity, the entity starts to linearly gain negative y motion while retaining its position. Even if the block beneath the item entity is destroyed for example by using "setblock", the item continues to retain its original position. This behavior stops as soon as a player moves within 16 blocks of an item entity.

The negative y motion can also be verified using the data command:

 

/data get entity @e[type=item,sort=nearest,limit=1] Motion[1] 

This behavior was recorded in the "item_entity_bug.mp4" video.

 

Also, every fourth item inside a chunk seems to consistently demonstrate this behavior regardless of the distance to the nearest player. This behavior was recorded in the "item_entity_bug_2.mp4" video.

 



 Comments   
Comment by md_5 [ 31/Oct/24 ]

Please don't provide patches outside of pull requests, it is problematic for CLA compliance.

Comment by badcop [ 31/Oct/24 ]

can confirm the behavior of every 4th item drop bouncing

the entity.tickCount % 4 == 0 check in ActivationRange seems to be related

Comment by Cave [ 29/Oct/24 ]

We did not observe this behavior in these versions:

  • 4344-Spigot-a759b62-19bf846 (MC: 1.21.1) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
  • 4280-Spigot-34bd42b-682a678 (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)

We observed this behavior in these versions:

  • 4361-Spigot-5eb8a94-6029040 (MC: 1.21.3) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
  • 4358-Spigot-5eb8a94-6bb0db5 (MC: 1.21.3) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
  • 4351-Spigot-5eb8a94-7b5b63b (MC: 1.21.3) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
  • 4347-Spigot-a084d85-71e5738 (MC: 1.21.2) (Implementing API version 1.21.2-R0.1-SNAPSHOT)
  • 4345-Spigot-a084d85-459c38a (MC: 1.21.2) (Implementing API version 1.21.2-R0.1-SNAPSHOT)

To me it appears like this bug is caused by the changes introduced in 1.21.2.

Comment by md_5 [ 29/Oct/24 ]

Does it affect 1.21.0 or other older versions?

Comment by Cave [ 28/Oct/24 ]

Yes, if the entity-activation-range of misc is changed from 16 to 20, the item entities appear to move as expected as long as a player is within 20x20 blocks of the item entity. It does not appear to affect the behavior of every fourth item "bouncing", which I noticed during further testing does not appear to be related to the chunks, but I couldn't determine when this actually starts to happen.

Comment by md_5 [ 28/Oct/24 ]

What if you increase activation range in spigot.yml?

Generated at Sat Apr 05 09:38:10 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.