More Mob Variants

More Mob Variants

13M Downloads

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

Hugs288 opened this issue · 3 comments

commented

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

commented

Issue report I originally got before seeing the mixin in the crash: TelepathicGrunt/RepurposedStructures#347

commented

Issue is this getBiome call using the ServerWorld is not safe for being called in worldgen

variant = Variants.getRandomVariant(EntityType.SKELETON, ((SkeletonEntity)(Object)this).getRandom().nextLong(), world.getBiome(((SkeletonEntity)(Object)this).getBlockPos()), null, world.getMoonSize());

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.

commented

Another user is reporting this mod is breaking on 1.21 fabric as well when skeletons are spawned in structures TelepathicGrunt/RepurposedStructures#351