Section
Developers
9 TOP-LEVEL ITEMSRepo API
Repo API is the abstraction and proxy layer Croparia IF uses for cross-platform storage interaction. Out of the box it supports item and fluid resources, and it is mainly used to expose and access storage from blocks and block entities.
The related code lives under the package cool.muyucloud.croparia.api.repo.
Core architecture
Repo API mainly consists of the storage view Repo, the discovery bridge ProxyProvider, the wrapper RepoProxy, and the platform adapter interfaces PlatformItemProxy and PlatformFluidProxy.
Repo: the direct interaction layer used in the common module. It models storage as a slot-indexed resource view.RepoProxy: wraps aReposo it can adapt to different mod platforms.ProxyProvider: registersRepoProxyinstances into the concrete mod platform so outside storage systems can discover them.PlatformItemProxy/PlatformFluidProxy: unified wrappers over platform-side item and fluid storage APIs, so the common module can access them in aRepo-style way.
Repo API also relies on the Resource API to manage resource types.
Navigation
In This Page