Skip to content

Clarify mob persistence API - #14312

Open
TiggerTakkyTTT wants to merge 1 commit into
PaperMC:mainfrom
TiggerTakkyTTT:fix/13980-remove-when-far-away
Open

TiggerTakkyTTT wants to merge 1 commit into
PaperMC:mainfrom
TiggerTakkyTTT:fix/13980-remove-when-far-away

Conversation

@TiggerTakkyTTT

Copy link
Copy Markdown

Fixes #13980

Adds isPersistenceRequired() and setPersistenceRequired() to Mob

@TiggerTakkyTTT
TiggerTakkyTTT requested a review from a team as a code owner September 27, 2026 08:34
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Sep 27, 2026
@masmc05

masmc05 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

The isPersistenceRequired() would definitely be confusing when there's already https://jd.papermc.io/paper/26.3/org/bukkit/entity/Entity.html#isPersistent()

@TiggerTakkyTTT

Copy link
Copy Markdown
Author

The isPersistenceRequired() would definitely be confusing when there's already https://jd.papermc.io/paper/26.3/org/bukkit/entity/Entity.html#isPersistent()

Yeah, good point. isPersistent() is for whether the entity gets saved, while this is the mob flag used for distance despawning, so the names would be pretty easy to confuse.

Do you have a name you’d prefer for this?

@masmc05

masmc05 commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Personally I don't think new methods are needed at all and just a few tweaks in javadocs would be enough. But that's for the maintainers to decide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

Ambiguity in LivingEntity.getRemoveWhenFarAway() documentation

2 participants