ContainerType-based container API
Juuxel opened this issue ยท 2 comments
Using ContainerType
s for containers would allow to register containers in the vanilla menu registry (Registry.CONTAINER
) and fully use vanilla's mechanisms for opening NameableContainerProvider
s.
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
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.
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
).