Skip to content
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

Full 1.20.4 Support #191

Merged
merged 11 commits into from
Jul 28, 2024
Merged

Conversation

UntalentedAmateur
Copy link
Contributor

This rolls in all the changes I made over time during discussion for issue #179.

As far as I can tell, all major functions are working, changing NPC type is persistent across world loads and game restarts, NPC skins are persistent, and I've relied upon the carpet mod for professions.

NPCs are functional in multiplayer server contexts, and I can't see anything that's obviously broken.

I've finally gotten around to double checking my stuff before poking at 1.21 support. There'll be a bit more digging on that, since there's changes to item definitions and a bump in Java requirements and support (gradle has been a nightmare).

Apologies for it having taken so long to issue the pull request since I worked on it. But, in the meantime it's been rock-steady on a live SMP server with global players, so it works well.

Screenshots show 100+ concurrent NPCs loaded, all with unique presets. Set like this (and probably another 20+ NPCs scattered around doing things) on the live server without issues.

2024-07-23_20 08 37
2024-07-23_20 08 46

Updated mod_version to ensure compatibility with FabricTailor is retained
Initialised an empty JsonObject to ensure the mod doesn't trip over lang being null.  Has the odd side effect of allowing the GUI to start working.
Updated the path to the language files within the .jar.  Note that it loads from within it, NOT from the filepath in the config folder.
Commented out SEVER_TRANSLATIONS reference because it was blocking any attempt to read from the language.json files in toto.  This may be removed in future as it doesn't seem to apply anywhere else in the codebase, and was returning nothing that could be used by the functions seeking translation.
Generated temporary UUID to keep GameProfile from crashing the server when it tries to generate a result using a null uuid entry.
Fix syntax error for defining JsonObject
This just seems to be dead code.  It throws an error at build when not commented out, but doesn't seem to affect mod function.  Most of the imports can be removed, too.
Introduced the concept of modEntity, which is a part of an NPC's definition, and which maps directly to the Entity Type in CAPS.
Added the hashmaps for the entity list and player entity so that we can track and manipulate them with ease when setting TYPE.
We make the necessary changes to allow player TYPE to be edited and for it to persist across world / game loads.
@samolego
Copy link
Owner

That's wicked! Thank you for all the hard work!

@UntalentedAmateur
Copy link
Contributor Author

Looks like something broke in the upload.

@UntalentedAmateur
Copy link
Contributor Author

It might be the build.gradle file. I have a hand-built disguiselib 1.3.5

modImplementation fileTree('./src/lib/disguiselib-1.3.5.jar')

That might be it...

Loose bracket...
@UntalentedAmateur
Copy link
Contributor Author

Nope. It was a loose bracket... Sorry.

@samolego samolego merged commit 9a45891 into samolego:rewrite/polymer Jul 28, 2024
2 of 3 checks passed
@samolego
Copy link
Owner

Why did you set version to 1.12.5 though?

@UntalentedAmateur
Copy link
Contributor Author

I wasn't sure what your versioning method was, and that was what the gradle wrapper I had was set to. I think my local build is actually set to 1.14.5 (1.15.5 for the 1.21 build), but most of those iterations never saw a merge back into github.

@samolego
Copy link
Owner

It's just normal semantic versioning ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants