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

level.dat Biome Rules Recurse Infinitely [Problem Area Identified, just needs fix] #192

Open
ByThePowerOfScience opened this issue Nov 9, 2024 · 7 comments

Comments

@ByThePowerOfScience
Copy link

ByThePowerOfScience commented Nov 9, 2024

Seems to be the exact same issue as #101, but on the latest version of Citadel. Happening consistently with this pack on all platforms, and both client and server-side.

I spent like twelve hours straight going through it with a debugger trying to find why it was doing that, so if you need any more information, please let me know.

Citadel: citadel-2.6.0-1.20.1
TerraBlender: Disabled

Modpack: Epoch Arcanus

level.dat.txt (an extension that GitHub will accept)
NBTExplorer_2024-11-09_00-00-37

@ByThePowerOfScience
Copy link
Author

ByThePowerOfScience commented Nov 9, 2024

It looks like it might be an incompatibility with Luminous: Nether, though how an MCreator mod could do that is beyond me.

Here's a stringified version of the level.dat I managed to get the server jar to generate: level.txt.gz

(That was so nostalgic btw, having to modify the server jar to bypass the limit. Amazing to see how old-fashioned Minecraft mods were made, down to deleting META-INF to get rid of the checksums and signing.)

@ByThePowerOfScience
Copy link
Author

ByThePowerOfScience commented Dec 2, 2024

Removing Luminous: Nether did not, in fact, fix it. However, I think I found the cause.

private boolean mergedSurfaceRules = false;
@Inject(method = "surfaceRule", at = @At("HEAD"))
private void surfaceRule(CallbackInfoReturnable<SurfaceRules.RuleSource> cir) {
if (!this.mergedSurfaceRules) {
this.surfaceRule = SurfaceRulesManager.mergeOverworldRules(surfaceRule);
this.mergedSurfaceRules = true;
//not replacing the return result for compatibility with TerraBlender
}
}

In mixin.NoiseGeneratorSettingsMixin, the biome rules are appended to the existing ones unless mergedSurfaceRules is set to true. However, this does not take into account the fact that the previously injected biome rules were actually already deserialized and exist there already. So it just keeps adding them onto the end of the list, forever.

No mod incompatibility, just a Citadel bug because the mergedSurfaceRules flag doesn't persist between restarts.

@kinnikinnick
Copy link

So is this what's causing the worldgen to be so incredibly slow after playing on the server awhile? Is there a fix for this aside from removing Citadel and all mods that require it?

@Veynam
Copy link

Veynam commented Dec 15, 2024

Id like to know as well. Ive been searching for a solution for the past 2 months. Frustrating

@ByThePowerOfScience
Copy link
Author

ByThePowerOfScience commented Dec 15, 2024

Id like to know as well. Ive been searching for a solution for the past 2 months. Frustrating

So is this what's causing the worldgen to be so incredibly slow after playing on the server awhile? Is there a fix for this aside from removing Citadel and all mods that require it?

Until the issue is resolved in the mod, the only way to fix it temporarily is to open up level.dat in NBTExplorer and remove the infinitely recursing rule.

@ByThePowerOfScience ByThePowerOfScience changed the title level.dat Biome Rules Recurse Infinitely level.dat Biome Rules Recurse Infinitely [Problem Area Identified, just needs fix] Dec 15, 2024
@soup587
Copy link

soup587 commented Dec 15, 2024

what exactly would the fix be here? storing mergedSurfaceRules somewhere that gets saved across restarts?

@ByThePowerOfScience
Copy link
Author

what exactly would the fix be here? storing mergedSurfaceRules somewhere that gets saved across restarts?

Yeah, pretty much.

Alternately, use MixinExtras' @ModifyReturnValue to allow compat with Terrablender without saving state, instead of modifying this.surfaceRule.

AlexModGuy added a commit that referenced this issue Dec 18, 2024
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

No branches or pull requests

4 participants