Skip to content

Fix copper golem container transaction logging - #14

Draft
CheekyNox wants to merge 3 commits into
EarthMC:masterfrom
CheekyNox:copper-golem
Draft

Fix copper golem container transaction logging#14
CheekyNox wants to merge 3 commits into
EarthMC:masterfrom
CheekyNox:copper-golem

Conversation

@CheekyNox

Copy link
Copy Markdown

Summary

  • Capture the selected container through Paper's ItemTransportingEntityValidateTargetEvent.
  • Keep the Paper-specific target listener separate from the generic game-event fallback.
  • Preserve the first container snapshot across repeated target-validation events.
  • Finalize a pending delta before the golem switches between source and destination containers.
  • Watch the final interaction so the last 16-item transfer is not lost.

Problem

Copper golems transfer items in batches of 16. Repeated target validation and rapid source/destination switching could replace a pending snapshot before it was logged. This caused missing removals, missing additions, and incomplete totals such as 48 removed or 32 added for a completed 64-item transfer.

Verification

  • Tested pickup and deposit transactions on Paper 26.1.2.
  • A completed 64-item transfer produces four removed x16 and four added x16 records.
  • gradlew build passes.

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.

1 participant