Skip to content

Greatly simplify item API providers - #1315

Open
Robotgiggle wants to merge 4 commits into
1.21from
merge-item-capabilities
Open

Robotgiggle wants to merge 4 commits into
1.21from
merge-item-capabilities

Conversation

@Robotgiggle

Copy link
Copy Markdown
Member

As of 1.21, Fabric now provides the ItemApiLookup system for retrieving APIs from ItemStacks, and it works almost identically to the item capability system used on NeoForge. In fact, the two systems are so similar that there is no longer any need for platform-specific implementations of the various API interfaces in the common addldata package.

This PR removes the platform-specific records implementing those interfaces, and changes the interfaces to either be records themselves (ADHexHolder, ADPigment, and ADVariantItem) or to provide nested record classes for their static and dynamic variants (ADIotaHolder and ADMediaHolder).

It also moves the definitions of the ItemApiLookup objects for each API provider to their own class (HexItemApiLookups) rather than defining them in HexCardinalComponents, as they have nothing to do with Cardinal Components. Together with the other refactoring, this should resolve #1165.

@github-project-automation github-project-automation Bot moved this to 📋 Backlog in Hex Casting Sep 27, 2026
@Robotgiggle Robotgiggle added api API-related enhancements/bugs/optimizations 1.21 labels Sep 27, 2026
@Robotgiggle Robotgiggle changed the title Greatly simplify item data holder lookups Greatly simplify item API providers Sep 27, 2026

This branch has not been deployed

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

Labels

1.21 api API-related enhancements/bugs/optimizations

Projects

Status: 📋 Backlog

Development

Successfully merging this pull request may close these issues.

Rename/refactor fabric-side item capabilities since they don't use Cardinal Components anymore

1 participant