rikka0w0 / MobZReborn

Continued of https://github.com/Globox1997/MobZ
https://www.curseforge.com/minecraft/mc-mods/mobz
7 stars 1 forks source link

[Neoforge 1.21.1] MobZ crashes Bumblezone due to SyncedEntityData not defined #44

Closed TelepathicGrunt closed 1 hour ago

TelepathicGrunt commented 1 week ago

I am the dev of Bumblezone and a user reported an issue where MobZ presence will crash Bumblezone when Bumblezone's Variant Bee entity spawns. Sometimes the crash is with vanilla's Bee when those are spawned in my dimension

latest.log crash-2024-11-10_19.47.22-server.txt


Time: 2024-11-10 19:47:22
Description: Exception ticking world

java.lang.IllegalStateException: Entity class net.minecraft.world.entity.animal.Bee has not defined synched data value 19
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.network.syncher.SynchedEntityData$Builder.build(SynchedEntityData.java:167) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:classloading}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.entity.Entity.<init>(Entity.java:267) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.entity.LivingEntity.<init>(LivingEntity.java:267) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.LaterLivingEntityMixin from mod the_bumblezone,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.LivingEntityAccessor from mod the_bumblezone,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.LivingEntityMixin from mod the_bumblezone,pl:mixin:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.entity.Mob.<init>(Mob.java:139) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.MobAccessor from mod the_bumblezone,pl:mixin:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.entity.PathfinderMob.<init>(PathfinderMob.java:17) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,re:classloading}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.entity.AgeableMob.<init>(AgeableMob.java:29) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,re:classloading,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.AgeableMobAccessor from mod the_bumblezone,pl:mixin:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.entity.animal.Animal.<init>(Animal.java:39) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,re:classloading,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.AnimalMixin from mod the_bumblezone,pl:mixin:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.entity.animal.Bee.<init>(Bee.java:138) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.BeeEntityInvoker from mod the_bumblezone,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.BeeEntityMixin from mod the_bumblezone,pl:mixin:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.world.entity.EntityType.create(EntityType.java:1097) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,xf:fml:default,re:classloading,xf:fml:default,pl:mixin:APP:the_bumblezone-common.mixins.json:entities.EntityTypeMixin from mod the_bumblezone,pl:mixin:A}
    at TRANSFORMER/the_bumblezone@7.7.5+1.21.1-neoforge/com.telepathicgrunt.the_bumblezone.entities.BeeDedicatedSpawning.specialSpawnBees(BeeDedicatedSpawning.java:72) ~[the_bumblezone-7.7.5+1.21.1-neoforge.jar%23191!/:?] {re:mixin,re:classloading}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.server.level.ServerLevel.handler$zcn000$the_bumblezone$bumblezone$countBzDimEntities(ServerLevel.java:1975) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone-common.mixins.json:world.ServerWorldMixin from mod the_bumblezone,pl:mixin:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.server.level.ServerLevel.tick(ServerLevel.java) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone-common.mixins.json:world.ServerWorldMixin from mod the_bumblezone,pl:mixin:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1037) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:classloading,pl:accesstransformer:B}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:917) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:classloading,pl:accesstransformer:B}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:110) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:classloading,pl:runtimedistcleaner:A}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:707) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:classloading,pl:accesstransformer:B}
    at TRANSFORMER/minecraft@1.21.1/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267) ~[client-1.21.1-20240808.144430-srg.jar%23185!/:?] {re:classloading,pl:accesstransformer:B}
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?] {}

Removing MobZ stops the crash

TelepathicGrunt commented 1 week ago

Found it, you used Bee.class here. This is incorrect. You need to use Wasp.class here so the SyncedEntityData is defined for Wasps and not bees https://github.com/rikka0w0/MobZReborn/blob/a10b2dbb0c48bce60797eeefd5c7145964c1bb34/src/main/java/net/mobz/entity/Wasp.java#L58C25-L58C43

rikka0w0 commented 4 hours ago

Thanks for reporting! This wasnt a problem until 1.20.5... Has been fixed in the 1.21.3 port. And I will back-port it to 1.20.5 to 1.21.1.

rikka0w0 commented 1 hour ago

Fixed for all MobZ versions run on Minecraft 1.20.5 to 1.21.3