quiqueck / WorldWeaver

Unleash your world-building potential with WorldWeaver, a Minecraft utility mod for Fabric, simplifying tasks and enhancing the possibilities of data-driven world generation.
MIT License
6 stars 3 forks source link

[Bug] Errors during registry creation with BlueMap and BetterNether #11

Closed OffsetMonkey538 closed 4 months ago

OffsetMonkey538 commented 4 months ago

What happened?

(I'm pretty sure the underlying issue is from WorldWeaver and it only happens with BetterNether present because it adds some biomes. Then again it didn't seem to happen with betterend so I'm not sure if this should be in the BetterNether repo)

Anyway, steps to reproduce:

  1. Install BlueMap, BetterNether and its dependencies
  2. Start the server
  3. Try to join the server and it should crash.

Before e612c4c2b17305f6c49cd58d09e7b8a5fa652596, the game would crash with only WorldWeaver and BlueMap present with this error like in #9, after that it only crashes when betternether is present and with this error.

WorldWeaver

21.0.9

Fabric API

0.100.6+1.21

Fabric Loader

0.15.11

Minecraft

1.21

Relevant log output

https://mclo.gs/YH2w9Lt (after #9 was fixed)

https://mclo.gs/7cuU9Nd (before #9 was fixed)

Other Mods

- BClib 21.0.8
- BetterNether 21.0.7
- BlueMap 5.2
- Fabric API 0.100.6+1.21
quiqueck commented 4 months ago

Hm, I am not sure that the issue is on our side.

As far as I can tell, BlueMap creates it's own registry lookup as soon as fabric loads the mod. https://github.com/BlueMap-Minecraft/BlueMap/blob/4ebceb88018d0f8ea2ce468ea51be17ec4d6de8f/implementations/fabric/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java#L43C65-L43C104

If I remember correctly, this will create a copy of the registries at this point. We add Biomes once a world get's loaded or prepared (so way after the initial loading phase of the mod), so the Biome objects will probably be missing in the copy that BlueMap created.

However, I do not understand why our Biome keys are known at this point (without any objects being added). Did you also report this issue to the BlueMap Team? Since the game crashes in one of their methods, it might be easier for them to see what is breaking...

quiqueck commented 4 months ago

Ah, and do you by any chance have the complete latest.log as well? This would give me a clue what the actual event order was.

OffsetMonkey538 commented 4 months ago

I did tell them about the old issue, which they responded to with "i don't think this error is actually caused by bluemap .. i think its an error in a mixin of another mod, that just gets "triggered" by bluemap", but I haven't told them about the new crash. Though I will tell them after writing this comment.

Here's the latest.log file. I used this mod to deobfuscate the stack traces to mojang official mappings so hopefully it's easier to understand. latest.log

TBlueF commented 4 months ago

I am still not quite sure what exactly is causing this, I am assuming it's something with BlueMap calling this method (on class-initialization) a little to early when some mods (probably based on load-order) are not ready for it yet..

I found and implemented a way to completely remove the need to create my own registry-access (which I think is a way better way of doing things anyways): https://github.com/BlueMap-Minecraft/BlueMap/commit/eed8f79e68b053c119f88bbf358bed893a78d110 That should fix this issue :)

quiqueck commented 4 months ago

@TBlueF Thank you for the quick response and the rapid fix :)

The mentioned fix was related to those Registries. We are no longer adding our custom modded objects (biomes, features, structures...) to those static registries. That is probably why there is an exception that those keys cannot be resolved. What I do not understand is, why (at this point) our registry keys are known when a lookup is created.

OffsetMonkey538 commented 4 months ago

Well the issue does seem to be fixed so I'll close this