Skip to content

Fix crash with disableChunkTerrainGeneration and EndlessIDs#877

Merged
Dream-Master merged 2 commits into
GTNewHorizons:masterfrom
konkers:pr/endlessids
May 10, 2026
Merged

Fix crash with disableChunkTerrainGeneration and EndlessIDs#877
Dream-Master merged 2 commits into
GTNewHorizons:masterfrom
konkers:pr/endlessids

Conversation

@konkers

@konkers konkers commented May 9, 2026

Copy link
Copy Markdown
Contributor

EndlessIDs disallows the suse of getBiomeArray() and setBiomeArray(). Those calls are replaced with getBiomeShortArray() and .setBiomeShortArray() From EndlessIDs' ChunkBiomeHook.

Fixes: #876

@MalTeeez MalTeeez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend wrinting two mixins across two classes, with one excluding endlessids (the current state) and one requiring it (your change).

@konkers

konkers commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

I recommend wrinting two mixins across two classes, with one excluding endlessids (the current state) and one requiring it (your change).

Is there a way of detecting the presence of EndlessIDs at runtime and registering the correct mixin?

@konkers

konkers commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Ahh I see the .addRequiredMod(TargetedMod.MOD) in Mixins.java

@konkers

konkers commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Reposting my questions from (Discord)[https://discord.com/channels/181078474394566657/603348502637969419/1502791599145484318] for context:

I added ENDLESSIDS to Hodgepodge's TargetedMod:

ENDLESSIDS("endlessids"),

However when I try to make registration of MixinChunkProviderServer_DisableTerrain conditional on the lack of EndlessIDs:

    DISABLE_CHUNK_TERRAIN_GENERATION(new MixinBuilder()
            .addCommonMixins("minecraft.MixinChunkProviderServer_DisableTerrain")
            .setApplyIf(() -> TweaksConfig.disableChunkTerrainGeneration)
            .addExcludedMod(TargetedMod.ENDLESSIDS)
            .setPhase(Phase.EARLY)),

I get a java.lang.NoClassDefFoundError: com/gtnewhorizons/navigator/mixins/Mixins on GTHN startup (at 0%). Full stack trace: https://gist.github.com/konkers/2cf6568035cb4eb0bd9fca85efe31121

If I change the TargetedMod def to

ENDLESSIDS("com.falsepattern.endlessids.EndlessIDs", "endlessids")

The mod gets registered even with the .addRequiredMod(TargetedMod.ENDLESSIDS) clause.

Clearly I'm misunderstanding how TargetedMod and ITargetMod work

Here's the change as I've been debugging it: konkers@398e94b

EndlessIDs disallows the suse of `getBiomeArray()` and `setBiomeArray()`.
Those calls are replaced with `getBiomeShortArray()` and
`.setBiomeShortArray()` From EndlessIDs' `ChunkBiomeHook`.

Fixes: GTNewHorizons#876
@konkers

konkers commented May 9, 2026

Copy link
Copy Markdown
Contributor Author

Added EndlessIDs specific version and logic to register the correct mixin

@MalTeeez MalTeeez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MalTeeez

MalTeeez commented May 9, 2026

Copy link
Copy Markdown
Member

Waiting with squash because @Caedis was asking about server compat

@boubou19
boubou19 marked this pull request as draft May 9, 2026 23:41
@konkers

konkers commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

Confirmed to work on daily 507 server

@Dream-Master
Dream-Master marked this pull request as ready for review May 10, 2026 07:28
@Dream-Master

Copy link
Copy Markdown
Member

@MalTeeez @Caedis merge?

@MalTeeez

Copy link
Copy Markdown
Member

@MalTeeez @Caedis merge?

From what I read in discord, yes. The EID thing caedis was worried about seemed unrelated.

@Dream-Master
Dream-Master merged commit 046c9b2 into GTNewHorizons:master May 10, 2026
1 check passed
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.

GTNH Daily Build #504 with disableChunkTerrainGeneration=true crashed in EndlessIDs

3 participants