PaperMC / PaperMC/Paper

Entity tracking range is not limited by simulation distance

Open
#8,451 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted type: bug
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

Entities outside of the simulation distance should automatically be outside of tracking range as well. The client should not crash.

Observed/Actual behavior

If entity-tracking-range is set to a value that is higher than the simulation-distance (in blocks), entities will stop ticking while still being tracked. This leads to a client crash, because they will end up in an invalid position as they are still being ticked on the client and not removed.

This issue only happens on Paper, not on Spigot or Vanilla servers. It also happens on Paper builds before the chunk system rewrite.
Client crash report https://pastebin.com/ypqTDvWY. The error indicates that the coordinates were out of bounds for the client.
Also see the discord convo here: https://discord.com/channels/289587909051416579/289587909051416579/1028836007547777165

Steps/models to reproduce
  1. Set entity-tracking-range.others to 256
  2. Give yourself a bunch of firework rockets with a long flight duration using /minecraft:give @p firework_rocket{Fireworks:{Flight:15}} 64
  3. Use the fireworks rockets.
  4. Wait about 2-3 minutes
  5. The client will start lagging and then crash
Plugin and Datapack List

Not relevant

Paper version

Happens on both 112 (first 1.19.2 build) and 202 (currently latest 1.19.2 build)

Other

See discord convo around here: https://discord.com/channels/289587909051416579/289587909051416579/1028836007547777165

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with entity-tracking-range.others set to 256, using the provided firework command, and review the linked client crash report. Trace Paper's entity tracking and simulation-distance handling; done means entities outside simulation distance are no longer tracked and the client no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.