Skip to content

Skip sorting horse inventories - #2

Merged
UrAvgCode merged 2 commits into
UrAvgCode:mainfrom
ricardofauch:fix/horse-inventory-sorting
Oct 28, 2026
Merged

UrAvgCode merged 2 commits into
UrAvgCode:mainfrom
ricardofauch:fix/horse-inventory-sorting

Conversation

@ricardofauch

Copy link
Copy Markdown
Contributor

Problem

Horse inventories report InventoryType.CHEST. Llamas and other ChestedHorses are handled, but plain horses (and other non-chested AbstractHorses) fall through to default and the whole inventory gets sorted. This happens on open with auto-sort enabled, or on a sort click on an empty slot.

The sorter refills from slot 0 by category, so the armor ends up in the saddle slot and the saddle in the armor slot. The horse can no longer be steered, and the armor is no longer rendered.

Seen on Paper 26.2 with 0.5.1.

Fix

Add a no-op case AbstractHorse _ -> {} after ChestedHorse in both switches (click and open). These inventories only hold the saddle and armor slots, so there is nothing to sort.

Possibly also affected (not changed here)

Nautiluses (AbstractNautilus) also have saddle + body armor slots. If their inventory reports CHEST too, they would hit the same issue. I did not verify this, so I kept this PR minimal.

🤖 Generated with Claude Code

ricardofauch and others added 2 commits October 19, 2026 01:21
Horse inventories report InventoryType.CHEST, so non-chested horses
fell through to the default case and got fully sorted, swapping the
saddle and armor slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@UrAvgCode

Copy link
Copy Markdown
Owner

good catch, it affects the nautilus too and i added it to the no-op case.
I'm fine with this pr being ai generated since it is only a small fix, but i wouldn't merge bigger ai generated prs in the future because the project should not have substantial portions of the codebase to be ai generated.

@UrAvgCode
UrAvgCode merged commit caec71c into UrAvgCode:main Oct 28, 2026
1 check passed
UrAvgCode added a commit that referenced this pull request Oct 28, 2026
horse and nautilus inventories report InventoryType.CHEST, so they fell through to the default case and got fully sorted, swapping the
saddle and armor slots.

Co-authored-by: UrAvgCode <dev@uravgcode.com>
@ricardofauch

Copy link
Copy Markdown
Contributor Author

If I wouldn't use AI for these kinda things, I would simply not find the time. So I thought I rather just share my issue and fix and you decide.
Thx for the merge!

Best Regards!

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