nyuppo / MobVariants

Minecraft Fabric mod for adding new variants to existing mobs.
Creative Commons Zero v1.0 Universal
10 stars 13 forks source link

game crashes if this mod is installed alongside repurposed structures while loading underground bastion #49

Open Hugs288 opened 2 months ago

Hugs288 commented 2 months ago

crash-2024-08-27_22.25.08-server.txt

from the creator of repurposed structures:

The problematic mod is More Mob Variant’s mixin. Please report to them and link this issue report so they know what to fix

net.minecraft.class_1613.handler$gaj000$moremobvariants$onInitialize(cl

TelepathicGrunt commented 2 months ago

Issue report I originally got before seeing the mixin in the crash: https://github.com/TelepathicGrunt/RepurposedStructures/issues/347

TelepathicGrunt commented 2 months ago

Issue is this getBiome call using the ServerWorld is not safe for being called in worldgen https://github.com/nyuppo/MobVariants/blob/506f42852a72341325d5deed82e099ba6c00a0f8/src/main/java/com/github/nyuppo/mixin/SkeletonVariantsMixin.java#L56

When worldgen is spawning the mob, it is using a worldGenRegion. This mixin is using the ServerLevel however that the entity is using. So what happens is within the generating chunk, it goes to spawn entity, call ServerLevel's getBiome, and then crashes because the chunk it is trying to get is the one that is generating at that point.

TelepathicGrunt commented 1 month ago

Another user is reporting this mod is breaking on 1.21 fabric as well when skeletons are spawned in structures https://github.com/TelepathicGrunt/RepurposedStructures/issues/351