SaemonMoki / ExtendedAnimals

Other
7 stars 2 forks source link

Genetic Animals incompatibility with Atum 2 causes ticking entity crash #76

Closed BeanZephyron closed 3 years ago

BeanZephyron commented 3 years ago

I kept receiving a ticking entity crash when using this mod with Atum 2. The crashes happen every time that a villager tries to spawn into the game.

CREEATION commented 3 years ago

Came here to give some more context with a crash log.

[20Mai2021 15:28:03.045] [Render thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: null
    Index: 1
    Listeners:
        0: HIGHEST
        1: ASM: mokiyoki.enhancedanimals.util.handlers.EventSubscriber@19a54a74 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
        2: NORMAL
        3: ASM: class com.teammetallurgy.atum.items.artifacts.atem.AtemsProtectionItem onLivingTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
        4: ASM: class com.teammetallurgy.atum.items.tools.HammerItem livingTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
        5: ASM: top.theillusivec4.curios.common.event.CuriosEventHandler@769833c9 tick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
java.lang.NullPointerException
    at mokiyoki.enhancedanimals.util.handlers.EventSubscriber.onLivingUpdateEvent(EventSubscriber.java:134)
    at net.minecraftforge.eventbus.ASMEventHandler_5_EventSubscriber_onLivingUpdateEvent_LivingUpdateEvent.invoke(.dynamic)
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
    at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:339)
    at net.minecraft.entity.LivingEntity.func_70071_h_(LivingEntity.java:2112)
    at net.minecraft.entity.MobEntity.func_70071_h_(MobEntity.java:300)
    at net.minecraft.entity.merchant.villager.VillagerEntity.func_70071_h_(VillagerEntity.java:234)
    at com.teammetallurgy.atum.entity.villager.AtumVillagerEntity.func_70071_h_(AtumVillagerEntity.java:268)
    at net.minecraft.client.world.ClientWorld.func_217418_a(ClientWorld.java:192)
    at net.minecraft.world.World.func_217390_a(World.java:554)
    at net.minecraft.client.world.ClientWorld.func_217419_d(ClientWorld.java:161)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1483)
    at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:953)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607)
    at net.minecraft.client.main.Main.main(Main.java:184)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51)
    at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
    at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
    at cpw.mods.modlauncher.Launcher.run(Launcher.java:82)
    at cpw.mods.modlauncher.Launcher.main(Launcher.java:66)

[20Mai2021 15:28:03.045] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: null
    Index: 1
    Listeners:
        0: HIGHEST
        1: ASM: mokiyoki.enhancedanimals.util.handlers.EventSubscriber@19a54a74 onLivingUpdateEvent(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
        2: NORMAL
        3: ASM: class com.teammetallurgy.atum.items.artifacts.atem.AtemsProtectionItem onLivingTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
        4: ASM: class com.teammetallurgy.atum.items.tools.HammerItem livingTick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
        5: ASM: top.theillusivec4.curios.common.event.CuriosEventHandler@769833c9 tick(Lnet/minecraftforge/event/entity/living/LivingEvent$LivingUpdateEvent;)V
java.lang.NullPointerException
    at mokiyoki.enhancedanimals.util.handlers.EventSubscriber.onLivingUpdateEvent(EventSubscriber.java:134)
    at net.minecraftforge.eventbus.ASMEventHandler_5_EventSubscriber_onLivingUpdateEvent_LivingUpdateEvent.invoke(.dynamic)
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
    at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:339)
    at net.minecraft.entity.LivingEntity.func_70071_h_(LivingEntity.java:2112)
    at net.minecraft.entity.MobEntity.func_70071_h_(MobEntity.java:300)
    at net.minecraft.entity.merchant.villager.VillagerEntity.func_70071_h_(VillagerEntity.java:234)
    at com.teammetallurgy.atum.entity.villager.AtumVillagerEntity.func_70071_h_(AtumVillagerEntity.java:268)
    at net.minecraft.world.server.ServerWorld.func_217479_a(ServerWorld.java:611)
    at net.minecraft.world.World.func_217390_a(World.java:554)
    at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:404)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:851)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:787)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78)
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642)
    at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232)
    at java.lang.Thread.run(Thread.java:748)

[20Mai2021 15:28:03.049] [Server thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID 5e93f848-2d67-4b9d-810a-e6c616a8c756
[20Mai2021 15:28:03.049] [Render thread/FATAL] [net.minecraftforge.common.ForgeMod/]: Preparing crash report with UUID ad132f91-92d8-4ff0-8c44-f264b617bf4a
[20Mai2021 15:28:03.052] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
net.minecraft.crash.ReportedException: Ticking entity
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:855) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:787) ~[?:?]
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.NullPointerException
    at mokiyoki.enhancedanimals.util.handlers.EventSubscriber.onLivingUpdateEvent(EventSubscriber.java:134) ~[eanimod:0_6_29]
    at net.minecraftforge.eventbus.ASMEventHandler_5_EventSubscriber_onLivingUpdateEvent_LivingUpdateEvent.invoke(.dynamic) ~[?:?]
    at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?]
    at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?]
    at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:339) ~[forge:?]
    at net.minecraft.entity.LivingEntity.func_70071_h_(LivingEntity.java:2112) ~[?:?]
    at net.minecraft.entity.MobEntity.func_70071_h_(MobEntity.java:300) ~[?:?]
    at net.minecraft.entity.merchant.villager.VillagerEntity.func_70071_h_(VillagerEntity.java:234) ~[?:?]
    at com.teammetallurgy.atum.entity.villager.AtumVillagerEntity.func_70071_h_(AtumVillagerEntity.java:268) ~[atum:1.16.5-2.2.3]
    at net.minecraft.world.server.ServerWorld.func_217479_a(ServerWorld.java:611) ~[?:?]
    at net.minecraft.world.World.func_217390_a(World.java:554) ~[?:?]
    at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:404) ~[?:?]
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:851) ~[?:?]
    ... 5 more
SaemonMoki commented 3 years ago

The upcoming bug release has a workaround for this, however it is caused because Atum sometimes returns null for a villager's profession, which they should definitely fix there side too.