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

Fixes for textured heads & creative inventories #58

Merged
merged 4 commits into from
Jan 10, 2022
Merged

Fixes for textured heads & creative inventories #58

merged 4 commits into from
Jan 10, 2022

Conversation

Ampflower
Copy link
Collaborator

@Ampflower Ampflower commented Jan 8, 2022

  • Adds a GolfIV tag on items while in creative.
    • To ensure that all creative players get this tag...
      • The inventory is resent every time they switch to creative.
      • The inventory is always minimised and treated as overflown when in creative.
        • This does mean that items in creative maybe lacking NBT on the client, and thus, may not render some items like shulker boxes correctly.
  • Adds fixes for player heads not rendering as expected when worn or on the ground.
  • Added a fix for crossbows not showing if they're loaded. To other clients, they'll only see either a firework or an arrow.
  • Items in creative will no longer be wiped of NBT if the NBT already exists in the inventory.
    • This however does rely on the patchItemKickPatch in its current state. It will fall through to the sanitiser if disabled.
  • Some NBT string references in the minimizer methods has been swapped out to use the strings from items.
  • The creative items check now has unnecessary-javadocitus

Fixes #41 - Creative inventories no longer get inadvertently sanitised for preexisting items by both patchItemKickExploit and removeCreativeNbtTags
Fixes #48 - Item names and heads show as expected now.
Needs verification for #45 for as this may fix the issue.

@Ampflower
Copy link
Collaborator Author

Moving a head around in the inventory, for some reason, the Display tag is not getting sent. Although, interestingly, this only happens in the creative inventory. Other inventories don't show this effect.
This might be due to a disparity of usage within packets for open inventories, although the issue only showing itself on the main inventory makes me wonder otherwise.

@Ampflower
Copy link
Collaborator Author

Force-push was to make the history more sane, and to revert the change to ItemStackChecker#fakeStack.

The one significant change from before the force-push is that usage of fakeStack in patchItemKickExploit was replaced with inventoryStack.

This allows for creative players to be able to use their inventories more or less losslessly.
The only real catch is that a fair amount of data isn't sent to the player, causing things to not quite render.
@Ampflower
Copy link
Collaborator Author

Fixed a typo and now have made crossbows send correct data to all clients.

@samolego samolego merged commit 4d81ac3 into samolego:golfive Jan 10, 2022
@Ampflower Ampflower deleted the fix/heads-creative branch January 10, 2022 12:54
Ampflower pushed a commit that referenced this pull request Jul 17, 2023
Fixes for textured heads & creative inventories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants