-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating FabricComputeCraftAPI with turtle/pocket upgrade serializer registration methods #1457
Conversation
So, locally test passing, I am not sure why they failing in CI, probably related to #1373 or I just running test incorrect locally |
Thank you for looking at this! We hit this in Plethora a while back, and I bodged around it and forgot to look into handling this properly. CCing @Lemmmy here, as this change will probably affect you too. So the original intent with the API was that by just exposing a I do feel a little eeeeeh about this change, as now it means the API is now different between mod loaders. There are some possible alternatives I can think of:
I don't really have any strong thoughts here - I don't maintain any CC add-ons after all, so happy to go with whatever folks think will be easiest, be that this PR or one of the other options! |
I am not sure, if I did this correct or not, but even now registration for serializers is a little different between platforms, because as I understand, common approach for use registries in forge is to create mod-specific ones, like here, so I personally don't see any issue here. So I still using reference for |
Yeah, I think that depends on how you deal with abstracting over registries in general. In CC:T, I use a CC-Tweaked/projects/common/src/main/java/dan200/computercraft/shared/ModRegistry.java Lines 257 to 270 in e153839
|
I suppose, that for exposing But for being able to mimic DefferedRegistry registry API pattern in common code I can suggest to make |
I had a look at this, but I'm not convinced about this model. This means then you're calling the CC entrypoint before some mods have been initialised. This is is probably fine (most Fabric mods do half their work in static initialisers), but feels a little ugly too. It is a bit sad really. I feel Fabric normally has a nicer API design than Forge, but I do prefer Forge's explicitness here.
This is the approach I ended up going with in f0abb83. This should mean you can replace |
Ah, this what you mean by |
Yeah, I don't think I explained that very well! I had a very clear image of what it'd look like in my head, but then explained the implementation rather than how it'd actually help. |
So, this is continuation of #1432, specific turtle and pocket upgrade serializer API for registration, that will help get rid of postpone registration.
For now, due to postpone registration I am not able to have links to registered serializers in minecraft mod code and postpone registration a significant mess right now.