[FEATURE] Port Forgotten Graves to MC v1.20.5 & v1.20.6
ginsm opened this issue ยท 8 comments
I've already started porting to 1.20.5 but there seems to be quite a bit of work needed (and new concepts to learn, at least for me). You can track the progress here.. but there's no ETA yet as I'm not even 100% sure what I need to learn or do. ๐คฃ
I've been looking through the codebase and it looks like I'll need to update quite a lot of it for 1.20.5 and 1.20.6. I have a better idea than I did last week on getting it up-to-date but there's definitely no ETA. I'll try and work on it here and there and hopefully it's done sooner than later.
Looking through the errors, here are some things that need to be done:
- Networking needs to be swapped to using payloads.
-
readNbtandwriteNbtcalls need access toRegistryWrapper.WrapperLookup. -
World.getDimensionKeyno longer exists; I'll need to figure out the alternative. -
ServerState.javahas some issues with overridden methods and theTypehas changed. -
ItemStackno longer has agetNbtmethod; used inSkull.java. I'm assuming I'll need to get a component instead. - I need to figure out how to create
GameProfiles again for the custom skulls (I was usingNbtHelper.toGameProfile).
In addition, I'll need to make sure all the changes don't break previous versions within the multi-version codebase.
Progress is going to be non-existent for a bit. I've had a couple pinched nerves for the last 6-7 weeks that have been crushing my right hand.. once that's resolved I'll start working on porting to more recent versions again.
Question: isn't 1.20.6 a tiny hotfix that only fixes a critical llama bug? So the codebase is nearly identical to its predecessor, is it not? Theoretically 1.20.6 would be simple once 1.20.5 is finished if this is true. I'm not totally informed, so forgive my ignorance. Good luck on the pinched nerves! Our wrists and hands could always use some extra care...
Thank you, I'm hoping they'll be fixed within a month or two. ๐ค Just waiting on doctors mostly.
And I'm pretty sure that you're correct, once 1.20.5 is set 1.20.6 should be pretty much done as well.
No idea about 1.21 and onwards though, hopefully it's not as much of a headache as 1.20.5.
I've got a working tentative build for 1.20.5. I'm not at all sure if I've mapped anything properly at all. I've created a compatibility layer for a ton of things (possibly temporary just to get it running) and I've reworked the networking codebase discrepancies, but I haven't tested any of it yet. So far:
working features:
- Grave spawns on death
- Grave contains all items correctly
- XP is stored correctly
- Graves can be broken and items retrieved
- Dying in quick succession yields no glaring issues (i think)
broken features:
- saving chunks with graves in them caused crashes (fixed)
- saving and reloading game makes all grave items, xp, etc unretrievable; saving effectively empties them. I expected this, given my poor attempts to update the Nbthelpers. Just never reboot your server with graves in them, I guess, lol.
If you're interested, how would I go about sharing my code without ruining yours? I'm hoping what I've done has helped to speed up the porting process, but I'm not at all confident I didn't ruin things... Especially with 4am brain. Anyway, hope you and your nerves are doing better.
Looking through the errors, here are some things that need to be done:
[ ] Networking needs to be swapped to using payloads.
[ ]readNbtandwriteNbtcalls need access toRegistryWrapper.WrapperLookup.
[x]World.getDimensionKeyno longer exists; I'll need to figure out the alternative.
[ ]ServerState.javahas some issues with overridden methods and theTypehas changed.
[ ]ItemStackno longer has agetNbtmethod; used inSkull.java. I'm assuming I'll need to get a component instead.
[ ] I need to figure out how to createGameProfiles again for the custom skulls (I was usingNbtHelper.toGameProfile).In addition, I'll need to make sure all the changes don't break previous versions within the multi-version codebase.
I think I (poorly) took care of all of these, except I definitely broke previous versions; I think the Nbt calls are incompatible with 1.20. It might not be possible to have a multi-version codebase anymore? I'm by no means an expert, so idk.
Edit: my fork is now up. 1.20.5 branch should have all my changes, whether they be well-informed and good, or not!
Edit: my fork is now up. 1.20.5 branch should have all my changes, whether they be well-informed and good, or not!
Thanks for all this! I'm sure it'll be a huge help! I'm sure it's all fine, and if there is any jank, you've seen the codebase, there's already plenty of jank in it. ๐
Anyway, hope you and your nerves are doing better.
Thank you! It ended up not being a pinched nerve, it's a bit worse than that (MS), but I'm starting treatment this week so hopefully things get back to normal sooner than later.
It may be a couple weeks before I can really dive into this mod again while I get used to the treatment, but your efforts will help quite a bit with getting it fully functional for 1.20.5 and 1.20.6; just having it in a running state again is huge. Thanks again!