Skip to content

Conversation

LichtHund
Copy link
Member

Slot to GridPoint conversion was very reliant on the containers being Chest based. To tackle this I introduced the idea of a GridMapper which sole responsibility is to turn slots into GridPoints and GridPoints into slots.
With this change we don't need ordered pane anymore as all slots used by the pane will already be mapped when passing it to the pane.

A few things to note:

  • I had to re-map some internal slots on player inventory to make more sense on the new system and to fix crafting grid having the same slots as the hotbar.
  • Using the player crafting grid is now possible, I didn't implement it because it was being too unreliable, items would get removed and placed on player inventory often and I didn't want to bother fixing it.
  • I left some old code intact like fromBukkitPlayerSlot and relativizePlayerInventorySlot because I am not exactly sure how they interact and from my testing they were never called or the results were always the same as the mapper.

@LichtHund LichtHund merged commit 174ab37 into main May 8, 2025
2 checks passed
@Aeltumn Aeltumn deleted the chore/rework-pane-mapping branch May 17, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants