-
Notifications
You must be signed in to change notification settings - Fork 4
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
Initial 16-bit Metadata Re-work #7
Conversation
@Cleptomania you named it draft so i set it draft. undraft it when it can be reviewed. |
I think this is ready for review and to start considering merging it. Putting the metadata changes behind a config option was somewhat discussed, but I would rather not do that. Partially because it makes the code much more complex(the block ID extension and metadata extension touch basically all the same things, doing it differently conditionally will be annoying). The other big problem is that the metadata extension only really makes sense in the context that mods are utilizing it, it would make the chain of this being a dependency of another mod for the metadata extension trickier if that depends on a config option(we could make it the default, but still). My proposal would be that the metadata extension gets merged and released as either version 2.0 or 1.6, this leaves us the following versioning profile: Once we merge this and release that version(be it 1.6 or 2.0) we could do an initial test of it in nightlies, so far the only bugs I've been able to produce are when mods make use of the extended metadata and don't adequately update themselves to be aware of that, but that is more a problem of the specific mods which leverage it than NEID itself. |
src/main/java/com/gtnewhorizons/neid/mixins/early/minecraft/MixinBlock.java
Outdated
Show resolved
Hide resolved
This now additionally adds GTNHLib as a dependency(0.2.1+, for fastutil shadow), and also converts the config to use GTNHLib(old config file is compatible and will work fine). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been using this without issue for well over a month now in dev and it loads fine. Code looks fine and it's already in nightly.
the nightly that is so very broken? I mean its probably not this but it being in nightly is in argument against right now, not in favor ;) |
I just tried v2.0.0 on my test server (copy of my prod instance, not GTNH, but using a lot GTNH mods). Each single time I try to join I my client crashes with an IndexOutOfBoundsException with no more useful information. As soon as I go back to 1.5.6 I can join the server again. Not sure if this is my somehow my fault or depent on this PR. 🤔
Full log: |
@Pilzinsel64 do you have any config that differs from GTNH for ArchaicFix? I'm unable to get this to re-produce with GTNH nightly 341(using NEID 2.0.0). I also tested with Optifine added. I'm not actually sure what in ArchaicFix could break it, I just see a lot of mixins from it in the stacktrace, so potentially something there. |
Of course I have a lot of configs different probably. However, I can't find a config for ArchaicFix in the GTNH modpack. But good to know that it works on your side, so it might be my fault somewhere. I checked again with ArchaicFix disabled and I also tested EndlessIDs with 32bits configured but there I directly get errors from ExtraBiomesXL. Need to test a little bit more around and reset some configs (looks lik EBXL generates itself the config dependend on what is possible). But that's another story. Will do some tests against tomorrow but yea, that's absolutely on my side. Thanks anyway and sorry for bothering. :) |
If you do happen to find where the problem is, let me know what you find and I can at least try and add compat for whatever that scenario/combination of mods/config is. |
This PR increases the metadata value from 4 bits to 16 bits.
Most calculations in this are explained in comments above the magic numbers and most are using constants now.
If the
postNeidWorldsSupport
config option is enabled, then it will function similarly to how that is handled for block IDs, metadatas which are outside of the 0-15 range supported by vanilla will be saved as a0
, and anything within 0-15 will be saved accurately as it's normal vanilla flavor. This means that if you remove NEID from the pack, the world isn't necessarily fully corrupted. A world loaded without NEID that triggers this should not break the NEID data, as the NEID metadata is stored in a different NBT tag(Data16
) vs the vanillaData
tag. This is the same way this option functions for block IDs.