You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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
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)…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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