Ambiguity in LivingEntity.getRemoveWhenFarAway() documentation
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
LivingEntity.getRemoveWhenFarAway() returns false for Cow, false nametagged Zombie, true for regular Zombie
Since the documentation states:
"Returns if the living entity despawns when away from players or not.
By default, animals are not removed while other mobs are.
Returns:
true if the living entity is removed when away from players"
then it follows that for any entity that keeps existing after all players are farther than 128 blocks the method returns false, otherwise true.
Observed/Actual behavior
LivingEntity.getRemoveWhenFarAway() returns 'true' for Cow, 'true' for regular Zombie
So the logical conclusion I pointed out in expected behaviour section is not met.
Steps/models to reproduce
use LivingEntity.getRemoveWhenFarAway() in any context e.g. EntityMoveEvent and test on Cow and Zombie.
Plugin and Datapack List
datapack list
[22:17:45 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[22:17:45 INFO]: There are no more data packs available
plugins
[22:17:47 INFO]: ℹ Server Plugins (7):
[22:17:47 INFO]: Bukkit Plugins:
[22:17:47 INFO]: - ChunkyPlots, ConfigLib, Essentials, EssentialsChat, EssentialsSpawn, HeadDB, Vault
Paper version
[22:16:37 INFO]: Checking version, please wait...
[22:16:37 INFO]: This server is running Paper version 26.2-26-dev/26.2@193803d (2026-06-21T04:21:03Z) (Implementing API version 26.2.build.26-alpha)
You are 4 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 26.1.2-72-1a6b910 (MC: 26.1.2)
Other
Please fix the way function works, or add another function with similar functionality to the one expected and document behavior of this one really well.
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 tracing the implementation and API documentation for LivingEntity.getRemoveWhenFarAway(), then compare its behavior for Cow, regular Zombie, and nametagged Zombie. Confirm the intended despawn semantics and update the documentation or related API behavior so the documented result matches the observed contract.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100