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

Revert "Fix for issue #98 (Player#getInventory#getArmorContents is always AIR)" #112

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

RhysB
Copy link
Member

@RhysB RhysB commented Nov 25, 2024

Reverts #105

@RhysB RhysB merged commit f22fa8d into master Nov 25, 2024
2 checks passed
@moderatorman
Copy link
Collaborator

The change looked fine to me when I merged it. What did I miss?

@notdevcody
Copy link
Contributor

The change looked fine to me when I merged it. What did I miss?

From the Discord server:
image

@RitzKid76
Copy link

RitzKid76 commented Nov 30, 2024

The change looked fine to me when I merged it. What did I miss?

The changed function required that all armor slots were present, in order. Commit #105 had returned an array of dynamic sizes that would place armor slots in different positions.
The required order is [boots, leggings, chestplate, helmet], but if you were only wearing a helmet, the return would be
OLD: [AIR, AIR, AIR, HELMET]
NEW: [HELMET]

This creates an issue where the item on the head would be placed on the boots slot. Since the helmet slot was never overwritten, it would also remain present.

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.

4 participants