Wandering Trader leash desync when re-entering tracking distance
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
Given the following setup:
- A wandering trader spawns with two llamas, only one is required for this example
- One llama is 4 blocks closer to the player compared to the trader
If the player moves far enough for the trader (that is slightly farther away than the llama) to not being tracked, but still keeps the llama within tracking distance, when the player comes closer to make the trader appear again, the leash will connect back to the wandering trader.
Observed/Actual behavior
If the player moves far enough for the trader to not being tracked, but still keeps the llama within distance, when the player comes closer to make the trader appear again, the leash will be stuck on the air in the same position the trader was before going out of tracking distance.
Steps/models to reproduce
-
Load the following world with Paper 26.2 build 56 (jar not included):
server.zip -
Fly to the platform with the trader and their llama.
-
Fly far enough to only get the trader to not be tracked, there's a diamond platform in the distance for reference
-
Fly back to the platform with the trader
-
See the desync
Plugin and Datapack List
No plugins nor datapacks
Paper version
Paper 26.2 build 56
Other
Possibly related issues as pointed out by Amaranth in discord, but not quite the same issue:
https://mojira.dev/MC-153980
https://mojira.dev/MC-144312
I haven't been able to re-create this neither in Vanilla nor in Fabric+Moonrise.
Paper has logic to re-attach a leashed entity to their leasher when they enter tracking distance.
However, it doesn't seem to be any logic that does the opposite, re-sync the leasher to its leashed entities (vanilla and moonrise don't seem to have logic for that either, it's weird).
https://github.com/user-attachments/assets/3ad0ef63-9d46-4275-b977-297970e76e36
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by loading the attached server.zip on Paper 26.2 build 56 and reproduce the trader-and-llama tracking-distance scenario. Then inspect Paper's leash reattachment logic for entities entering tracking distance and determine how the leasher should be resynchronized when only its leashed entity remains tracked. Done means the leash reconnects to the trader after it reappears without affecting other leash behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100