• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CyclopsMC / CyclopsCore / 34099049926
27%
master-1.21: 31%

Build:
Build:
LAST BUILD BRANCH: master-1.21-lts
DEFAULT BRANCH: master-1.21
Ran 07 Sep 2026 08:21AM UTC
Jobs 1
Files 656
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Sep 2026 08:08AM UTC coverage: 26.862% (+0.2%) from 26.63%
34099049926

Pull #242

github

rubensworks
Identify inventories by instance instead of by contents

SimpleInventoryCommon compared inventories by their contents and returned a
modification counter as its hash code. Both are wrong for a mutable container,
and together they break item transfer APIs that cache their wrappers in a map
keyed on the container.

Fabric's InventoryStorage is such a cache, and uses equals-based keys:

    private static final Map<Inventory, InventoryStorageImpl> WRAPPERS = new MapMaker().weakValues().makeMap();

Two empty inventories of the same size were therefore equal and hashed the
same, so the second one looked up was handed the first one's storage. Items
inserted into one block ended up in another, and reading a block's contents
returned the other one's items. The changing hash code additionally made an
inventory lose its own cache entry after every modification.

Instances are now compared by identity. getState() still returns the
modification counter, so change detection is unaffected.

The deprecated NeoForge-only SimpleInventory keeps its contents-based equality:
it backs the cyclopscore:inventory data component, which needs value equality.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wbskd84GPZPE1rB7spHkdn
Pull Request #242: Identify inventories by instance instead of by contents

1284 of 5168 branches covered (24.85%)

Branch coverage included in aggregate %.

3667 of 13263 relevant lines covered (27.65%)

1.33 hits per line

Coverage Regressions

Lines Coverage ∆ File
48
24.18
24.18% org/cyclops/cyclopscore/inventory/SimpleInventoryCommon.java
Jobs
ID Job ID Ran Files Coverage
1 34099049926.1 07 Sep 2026 08:21AM UTC 894
22.44
GitHub Action Run
Source Files on build 34099049926
  • Tree
  • List 656
  • Changed 17
  • Source Changed 0
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34099049926
  • Pull Request #242
  • PR Base - master-1.21-lts (#33961404835)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc