SimplyTea icon indicating copy to clipboard operation
SimplyTea copied to clipboard

1.19

Open Bricktricker opened this issue 2 years ago • 12 comments

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.

Bricktricker avatar Nov 05 '22 14:11 Bricktricker

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.

KnightMiner avatar Nov 05 '22 21:11 KnightMiner

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?

Bricktricker avatar Nov 06 '22 12:11 Bricktricker

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.

KnightMiner avatar Nov 06 '22 19:11 KnightMiner

Removed the DeferredRegister. I kept the diffrent registration methods (registerEffects, registerBlocks, ...) separate, but I can merge them into one method if you want to.

Bricktricker avatar Nov 07 '22 14:11 Bricktricker

Lets do a single event subscriber for registration, no sense having multiple subscribers to the same event in the same class.

KnightMiner avatar Nov 07 '22 16:11 KnightMiner

Merged all registration methods into one and removed the the injected hack. The fields are now set in the registration method.

Bricktricker avatar Nov 07 '22 17:11 Bricktricker

I was unable to successfully build a workspace from this PR, were there gradle wrapper or build.gradle changes you missed in the PR?

KnightMiner avatar Jan 17 '23 22:01 KnightMiner

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?

Bricktricker avatar Jan 19 '23 15:01 Bricktricker

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.

KnightMiner avatar Jan 19 '23 19:01 KnightMiner

I just ran gradlew genEclipseRuns --refresh-dependencies and it worked perfectly fine. I used this build.gradle file: https://gist.github.com/Bricktricker/b881f1531bdc8c8f5cd5f163986e2823

Bricktricker avatar Jan 19 '23 21:01 Bricktricker

Just answer my question directly. Did build.gradle have any changes other than the stuff you commented out?

KnightMiner avatar Jan 19 '23 21:01 KnightMiner

No, I haven't changed anything else.

Bricktricker avatar Jan 20 '23 14:01 Bricktricker