Fabric API

Fabric API

106M Downloads

ContainerType-based container API

Juuxel opened this issue ยท 2 comments

commented

Using ContainerTypes for containers would allow to register containers in the vanilla menu registry (Registry.CONTAINER) and fully use vanilla's mechanisms for opening NameableContainerProviders.

Opening a container in vanilla: player.openContainer(<NameableContainerProvider instance, for example state.createContainerProvider(world, pos)>)

My WIP API for them can be seen here: Juuxel/Polyester

commented

The main problem with vanilla's approach is that it doesn't allow sending extra data alongside the container open request, which is something vanilla doesn't rely on but mods often do.

commented

Yeah. From what I saw from messing around with the API currently in Polyester, it works well for simple containers (anything chest-like, really), but syncing doesn't fully work with more complex containers (might just be my code, though, but it works with Fabric's ContainerProviderRegistry).