Cardinal-Components-API icon indicating copy to clipboard operation
Cardinal-Components-API copied to clipboard

Allow registering world components on certain dimensions

Open AlphaMode opened this issue 2 years ago • 6 comments

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<C> type, Identifier dimensionId, ComponentFactory<World, ? extends C> factory) could solve this

AlphaMode avatar Feb 24 '23 07:02 AlphaMode

Sounds doable - what would be your use case ?

Pyrofab avatar Mar 19 '23 15:03 Pyrofab

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?

Redfan2 avatar Oct 26 '23 15:10 Redfan2

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

AlphaMode avatar Dec 30 '23 21:12 AlphaMode

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

Pyrofab avatar Dec 30 '23 21:12 Pyrofab

Are there any plans to implement this?

AlphaMode avatar Mar 25 '24 16:03 AlphaMode

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

Pyrofab avatar Mar 25 '24 17:03 Pyrofab

Well, I did it 😎

Pyrofab avatar Apr 19 '24 23:04 Pyrofab