Cardinal Components API

Cardinal Components API

21M Downloads

Allow registering world components on certain dimensions

AlphaMode opened this issue ยท 7 comments

commented

Currently if you want to attach a world component your forced to register it for all dimensions.
Adding a method to WorldComponentFactoryRegistry like register(ComponentKey type, Identifier dimensionId, ComponentFactory<World, ? extends C> factory) could solve this

commented

Are there any plans to implement this?

commented

I may do it for the MC 1.20.5 update but no promise

commented

Well, I did it ๐Ÿ˜Ž

commented

Sounds doable - what would be your use case ?

commented

Hello @AlphaMode, have you come to a solution in the meantime? If you ended up implementing the proposed features yourself, would you mind PRing them?

commented

Sorry I forgot about this issue, but I still don't have a proper solution for this. My use case is here https://github.com/The-Aether-Team/The-Aether/blob/1.20.1-develop/src/main/java/com/aetherteam/aether/capability/time/AetherTimeCapability.java I'm in charge of the fabric port and I want to attach this component only to the aether dimension

commented

Ah right, well the workaround right now is to make a dummy implementation of the component and attach that to everything that is not your dimension