Skip to content

Allow getAsString()-ing non-persistent entities#12424

Merged
kennytv merged 1 commit into
PaperMC:mainfrom
SoSeDiK:estring
Apr 14, 2025
Merged

Allow getAsString()-ing non-persistent entities#12424
kennytv merged 1 commit into
PaperMC:mainfrom
SoSeDiK:estring

Conversation

@SoSeDiK
Copy link
Copy Markdown
Contributor

@SoSeDiK SoSeDiK commented Apr 13, 2025

Entity#getAsString allows dumping entity's snbt and can be used to create entity snapshots.

However, the method currently fails if used on unsaveable entity, e.g., non-persistent (entity.setPersistent(false)) ones.

While this API is not exactly supported, I don't see a reason to keep the restriction either.

@SoSeDiK SoSeDiK requested a review from a team as a code owner April 13, 2025 10:16
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Apr 13, 2025
@github-project-automation github-project-automation Bot moved this from Awaiting review to Awaiting final testing in Paper PR Queue Apr 13, 2025
@kennytv kennytv merged commit 652cea5 into PaperMC:main Apr 14, 2025
4 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting final testing to Merged in Paper PR Queue Apr 14, 2025
@SoSeDiK SoSeDiK deleted the estring branch March 7, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

2 participants