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

Fix encoding ItemStack in TrackedData #541

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

guac42
Copy link
Contributor

@guac42 guac42 commented Oct 4, 2023

When encoding ItemStacks in TrackedData the ItemStack itself is not optional as it was previously implemented. For further context, when encoding an ItemStack it will only encode as one byte if the ItemStack is empty.

Objective

Solution

  • Remove the optional wrapping around the ItemStack value when encoding it in the TrackedData.

Itemstacks aren't optional as tracked data
@guac42 guac42 changed the title Fix encoding 'ItemStack in TrackedData` Fix encoding ItemStack in TrackedData Oct 4, 2023
@rj00a
Copy link
Member

rj00a commented Oct 4, 2023

Must have been a leftover from #500

@rj00a rj00a enabled auto-merge (squash) October 4, 2023 04:08
@guac42
Copy link
Contributor Author

guac42 commented Oct 4, 2023

Makes sense, I was wondering how that got there.

@rj00a rj00a merged commit a46764c into valence-rs:main Oct 4, 2023
@guac42 guac42 deleted the fix-tracked-item-data branch October 4, 2023 04:17
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.

DecoderException kicking clients when using ItemEntityBundle
2 participants