SimplyTea
SimplyTea copied to clipboard
1.19
This PR ports this mod to Minecraft 1.19.2.
I moved the registration to DeferredRegister, fixed alle renames and converted the AddEntryLootModifier to use a Codec
I played a bit and I think everything is still working.
I moved the registration to DeferredRegister
As I asked in my previous PR, is this really nessesscary? I am not against deferred registers, but its a unneeded refactor.
I couldn't find an alternative yesterday, but it looks like there is a RegisterEvent that can be used
plus adding @ObjectHolder
to every field. Should I use this?
The code I had before works exactly the same in 1.19. Registry events were just changed so instead of being generic, the registry is part of a getter. Object holders are not nesseccary unless you expect someone to registry sub your items, and frankly no one should be doing registry subs on my modded items without talking to me first.
Removed the DeferredRegister. I kept the diffrent registration methods (registerEffects
, registerBlocks
, ...) separate, but I can merge them into one method if you want to.
Lets do a single event subscriber for registration, no sense having multiple subscribers to the same event in the same class.
Merged all registration methods into one and removed the the injected hack. The fields are now set in the registration method.
I was unable to successfully build a workspace from this PR, were there gradle wrapper or build.gradle changes you missed in the PR?
I commented out your mods.toml injection code in the build.gradle file, because it never worked for me. I just updated the values manually. Maybe thats the problem?
That would prevent the game from launching, not the entire workspace from building.
You probably need to commit the required 1.19.2 changes to build.gradle (not commenting out the injection code, the other changes). You did not change that file in this PR, but in my experience it requires changes every MC release.
I just ran gradlew genEclipseRuns --refresh-dependencies
and it worked perfectly fine. I used this build.gradle file: https://gist.github.com/Bricktricker/b881f1531bdc8c8f5cd5f163986e2823
Just answer my question directly. Did build.gradle
have any changes other than the stuff you commented out?
No, I haven't changed anything else.