Skip to content

Log chested horse inventory transactions - #1006

Open
CheekyNox wants to merge 3 commits into
PlayPro:masterfrom
CheekyNox:fix/chested-horse-inventory
Open

CheekyNox wants to merge 3 commits into
PlayPro:masterfrom
CheekyNox:fix/chested-horse-inventory

Conversation

@CheekyNox

Copy link
Copy Markdown
Contributor

Summary

  • log item changes in chest-equipped donkeys, mules, llamas, and trader llamas
  • compare the complete inventory state when the player opens and closes the entity inventory
  • create the entity tracking identity from the first container transaction, independently of player-interactions
  • allow direct inspection of supported chested-horse containers
  • document the additional tracked container types in the v13 API notes

Root cause

InventoryChangeListener only recognized entity containers accepted by EntitySpawnTracking.isPlacedEntity(). That predicate intentionally covers boats and minecarts, so Bukkit ChestedHorse inventories never reached the entity-container snapshot path. A first transaction also needs to promote a natural entity into the persisted identity table before its container rows can be written.

Validation

  • mvn -B clean package - BUILD SUCCESS, 385 source files compiled with --release 11
  • shaded target/CoreProtect-24.0.jar contains the updated listener and entity-container transaction classes
  • git diff --check

A live Paper server test was not available in this checkout.

Fixes #3

@netlify

netlify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for coreprotect failed. Why did it fail? →

Name Link
🔨 Latest commit df9c2c3
🔍 Latest deploy log https://app.netlify.com/projects/coreprotect/deploys/6ab3e098fba780000822e4c6

@CheekyNox
CheekyNox force-pushed the fix/chested-horse-inventory branch from de15e94 to df9c2c3 Compare September 23, 2026 14:22
@Intelli

Intelli commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution! Automated review is requesting the following:

  • Make rollback/restore respect horse chest-storage and equipment slots. The existing generic replay can insert ordinary items into an empty saddle/equipment slot.
  • Replace the independent per-player open/close deltas with actor-aware transaction capture. Two players viewing the same animal can currently both be credited with one player’s removal.
  • Integrate pending horse transactions with lifecycle and shutdown flushing so completed transfers aren’t lost when the animal becomes invalid before inventory close.
  • Release identity-promotion claims when container transactions are permanently discarded, including failed entries marked retryRequired.

@Intelli

Intelli commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Thanks for the updates! Automated review found a few remaining compatibility issues:

  • Please handle the actual horse inventory layout across supported platforms and versions in both capture and replay. getContents() does not universally include saddle/decor at indices 0 and 1. Spigot 1.21.4 has one leading saddle slot, while Spigot 26.1.1 exposes chest storage starting at index 0 with equipment separate. The current replay skips valid chest slots and can report success without applying the item change.
  • Please fix drag capture’s raw-slot boundary check. On Spigot 26.1.1, a donkey’s 15 storage slots occupy GUI raw slots 2–16, so drags exclusively into slots 15–16 are currently missed.
  • Please remove the four files under src/test and restore its .gitignore entry, since we maintain tests in a separate repository. No additional tests are requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Donkey Chest

3 participants