Productive Bees

Productive Bees

10M Downloads

A baby bee crashes our world

ZackaRiz opened this issue · 3 comments

commented

The mode worked fine until a bee spawn spawned a baby bee which crashed the game once loaded !

Here is the error logs
( I add the complete logs as attachments because I have other mods present )
latest.log

---->

[05août2023 19:39:04.087] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: Cannot invoke "net.minecraft.world.entity.Entity.m_9236()" because the return value of "com.mlib.gamemodifiers.data.IEntityData.getEntity()" is null
Index: 1
Listeners:
0: NORMAL
1: ASM: class com.mlib.gamemodifiers.contexts.OnBabySpawn onBreed(Lnet/minecraftforge/event/entity/living/BabyEntitySpawnEvent;)V
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.m_9236_()" because the return value of "com.mlib.gamemodifiers.data.IEntityData.getEntity()" is null
at TRANSFORMER/[email protected]/com.mlib.gamemodifiers.data.IEntityData.getLevel(IEntityData.java:11)
at TRANSFORMER/[email protected]/com.mlib.gamemodifiers.data.ILevelData.getProfiler(ILevelData.java:18)
at TRANSFORMER/[email protected]/com.mlib.gamemodifiers.Contexts.dispatch(Contexts.java:35)
at TRANSFORMER/[email protected]/com.mlib.gamemodifiers.contexts.OnBabySpawn.onBreed(OnBabySpawn.java:25)
at TRANSFORMER/[email protected]/com.mlib.gamemodifiers.contexts.OnBabySpawn_onBreed_BabyEntitySpawnEvent.invoke(.dynamic)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.animal.Animal.m_27563
(Animal.java:210)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.ai.goal.BreedGoal.m_8026
(BreedGoal.java:80)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.ai.goal.BreedGoal.m_8037_(BreedGoal.java:61)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.ai.goal.WrappedGoal.m_8037_(WrappedGoal.java:65)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.ai.goal.GoalSelector.m_186081_(GoalSelector.java:120)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.ai.goal.GoalSelector.m_25373_(GoalSelector.java:111)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.Mob.m_6140_(Mob.java:760)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.m_8107_(LivingEntity.java:2547)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.Mob.m_8107_(Mob.java:536)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.AgeableMob.m_8107_(AgeableMob.java:128)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.animal.Animal.m_8107_(Animal.java:54)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.animal.Bee.m_8107_(Bee.java:446)
at TRANSFORMER/[email protected]/cy.jdkdigital.productivebees.common.entity.bee.ConfigurableBee.m_8107_(ConfigurableBee.java:165)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.m_8119_(LivingEntity.java:2297)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.Mob.m_8119_(Mob.java:337)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.animal.Bee.m_8119_(Bee.java:246)
at TRANSFORMER/[email protected]/cy.jdkdigital.productivebees.common.entity.bee.ProductiveBee.m_8119_(ProductiveBee.java:150)
at TRANSFORMER/[email protected]/cy.jdkdigital.productivebees.common.entity.bee.ConfigurableBee.m_8119_(ConfigurableBee.java:116)
at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:693)
at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.m_46653_(Level.java:479)
at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:343)
at TRANSFORMER/[email protected]/net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54)
at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:323)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:893)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814)
at TRANSFORMER/[email protected]/net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:89)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251)
at java.base/java.lang.Thread.run(Thread.java:833)

[05août2023 19:39:04.184] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking entity
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:897) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:814) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:89) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:661) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.m_9236_()" because the return value of "com.mlib.gamemodifiers.data.IEntityData.getEntity()" is null
at com.mlib.gamemodifiers.data.IEntityData.getLevel(IEntityData.java:11) ~[majrusz-library-1.20-4.3.2.jar%23395!/:4.3.2]
at com.mlib.gamemodifiers.data.ILevelData.getProfiler(ILevelData.java:18) ~[majrusz-library-1.20-4.3.2.jar%23395!/:4.3.2]
at com.mlib.gamemodifiers.Contexts.dispatch(Contexts.java:35) ~[majrusz-library-1.20-4.3.2.jar%23395!/:4.3.2]
at com.mlib.gamemodifiers.contexts.OnBabySpawn.onBreed(OnBabySpawn.java:25) ~[majrusz-library-1.20-4.3.2.jar%23395!/:4.3.2]
at com.mlib.gamemodifiers.contexts.OnBabySpawn_onBreed_BabyEntitySpawnEvent.invoke(.dynamic) ~[majrusz-library-1.20-4.3.2.jar%23395!/:4.3.2]
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.5.jar%2387!/:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%2387!/:?]
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%2387!/:?]
at net.minecraft.world.entity.animal.Animal.m_27563
(Animal.java:210) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.ai.goal.BreedGoal.m_8026
(BreedGoal.java:80) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.ai.goal.BreedGoal.m_8037_(BreedGoal.java:61) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.ai.goal.WrappedGoal.m_8037_(WrappedGoal.java:65) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.ai.goal.GoalSelector.m_186081_(GoalSelector.java:120) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.ai.goal.GoalSelector.m_25373_(GoalSelector.java:111) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.Mob.m_6140_(Mob.java:760) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.LivingEntity.m_8107_(LivingEntity.java:2547) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.Mob.m_8107_(Mob.java:536) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.AgeableMob.m_8107_(AgeableMob.java:128) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.animal.Animal.m_8107_(Animal.java:54) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.animal.Bee.m_8107_(Bee.java:446) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at cy.jdkdigital.productivebees.common.entity.bee.ConfigurableBee.m_8107_(ConfigurableBee.java:165) ~[productivebees-1.20.1-12.1.3.jar%23418!/:1.20.1-12.1.3]
at net.minecraft.world.entity.LivingEntity.m_8119_(LivingEntity.java:2297) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.Mob.m_8119_(Mob.java:337) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.entity.animal.Bee.m_8119_(Bee.java:246) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at cy.jdkdigital.productivebees.common.entity.bee.ProductiveBee.m_8119_(ProductiveBee.java:150) ~[productivebees-1.20.1-12.1.3.jar%23418!/:1.20.1-12.1.3]
at cy.jdkdigital.productivebees.common.entity.bee.ConfigurableBee.m_8119_(ConfigurableBee.java:116) ~[productivebees-1.20.1-12.1.3.jar%23418!/:1.20.1-12.1.3]
at net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:693) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.level.Level.m_46653_(Level.java:479) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:343) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:323) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:893) ~[client-1.20.1-20230612.114412-srg.jar%23460!/:?]
... 5 more_

commented

It happens when you breed two bees that can't be bred and won't produce an offspring and Majrusz library can't handle it because they expect there to always be an offspring. I told them about it earlier today, but didn't get a response from them.

the "fix" is to take out Majrusz library, load the world, stop the bees from copulating and then put the mod back in and don't breed unbreedable bees again (or use the breeding chamber to be sure)

alternatively you can also try enabling the Forge config that fixes ticking entities or install https://www.curseforge.com/minecraft/mc-mods/neruina

commented

Perfect neruina mod work for me !
( https://www.curseforge.com/minecraft/mc-mods/neruina )

image

commented

We can close the issue and wait for the Majrusz library fix.
Neruina's alternative solution works well