Skip to content

Fix boat and minecart inventories on region switch#13826

Merged
Owen1212055 merged 1 commit intoPaperMC:mainfrom
coredex-source:fix/boats-minecarts-inventories
Apr 26, 2026
Merged

Fix boat and minecart inventories on region switch#13826
Owen1212055 merged 1 commit intoPaperMC:mainfrom
coredex-source:fix/boats-minecarts-inventories

Conversation

@coredex-source
Copy link
Copy Markdown
Contributor

This PR fixes an inconsistency in the Craft implementations of a few entity inventory holders. While this doesn't rly do anything on Paper, it does cause issues on Folia based forks, which is how this was found. This just fixes the inconsistency furthest upstream since it just makes sense to have it up here.

Link to the original patch - CraftCanvasMC/Canvas@b04a094

@coredex-source coredex-source requested a review from a team as a code owner April 26, 2026 07:19
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Apr 26, 2026
@NonSwag
Copy link
Copy Markdown
Contributor

NonSwag commented Apr 26, 2026

Why should this be merged in Paper if it doesn't affect it?
PRing it to Folia makes more sense in this case.
Also, if the underlying inventory instance changes, wouldn't it make more sense to replace the cached version then?
This seems like potentially a lot of new redundant instances when called often.

@Dueris
Copy link
Copy Markdown
Contributor

Dueris commented Apr 26, 2026

Because the inconsistency is in Paper. All other implementations of InventoryHolder also do the same thing introduced here. It made sense to merge to Paper rather than Folia because it seemed more of an inconsistency with Papers/CraftBukkits code(Idk who originally authored it whatever), rather than a bug introduced by Folia. The bug in Folia seemed more of a product of it of sorts. Just seemed easier and made more sense IMO to upstream it to Paper

@NonSwag
Copy link
Copy Markdown
Contributor

NonSwag commented Apr 26, 2026

Ah I see, makes sense.
Imo it would make sense to add a method contract to the API to indicate a new instance is created every time, but not sure if that is in the scope of this PR (or even wanted)…

@coredex-source
Copy link
Copy Markdown
Contributor Author

The PR is kept very minimal to simply just make it consistent.

@Owen1212055 Owen1212055 merged commit 55be6c0 into PaperMC:main Apr 26, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting review to Merged in Paper PR Queue Apr 26, 2026
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.

5 participants