Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup: Skip unnecessary NBT copying when checking for Item class #46

Merged
merged 1 commit into from
May 20, 2024

Conversation

szuend
Copy link

@szuend szuend commented May 20, 2024

We can take the underlying Item from an ItemIdentifierStack directly without converting to an ItemStack first. The temporary ItemStack is heavy-weight for fluids since the fluid/amount is stored in an NBT that has to be copied.

We can take the underlying `Item` from an `ItemIdentifierStack`
directly without converting to an `ItemStack` first. The temporary
`ItemStack` is heavy-weight for fluids since the fluid/amount is
stored in an NBT that has to be copied.
@Dream-Master Dream-Master requested a review from a team May 20, 2024 13:00
@boubou19 boubou19 merged commit 4960669 into GTNewHorizons:master May 20, 2024
2 checks passed
@szuend szuend deleted the skip-copy branch May 20, 2024 17:08
Dream-Master pushed a commit that referenced this pull request May 20, 2024
We can take the underlying `Item` from an `ItemIdentifierStack`
directly without converting to an `ItemStack` first. The temporary
`ItemStack` is heavy-weight for fluids since the fluid/amount is
stored in an NBT that has to be copied.

(cherry picked from commit 4960669)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants