MCA Reborn [Fabric/Forge]

MCA Reborn [Fabric/Forge]

7M Downloads

Server crash after a player throw eggs to villager

papadave66 opened this issue ยท 3 comments

commented

Describe the bug
My friend was playing modpack on our server. he threw eggs to a villager. The villager was angry and now when he login, the server will crash again

To Reproduce
Steps to reproduce the behavior:

  1. Prepare an egg
  2. Find a villager
  3. Throw to him and make him angry
  4. Server crash

it didn't crash in single player mode(or yet)

Version
MCA Version, minecraft-comes-alive-7.5.14+1.20.1-universal.jar
Minecraft version, 1.20.1
Modloader forge, 47.2.32

Latest.log
latest.log
crash.log
crash-2024-08-14_05.23.32-server.txt

commented
Caused by: java.lang.ArithmeticException: / by zero
	at forge.net.mca.entity.VillagerEntityMCA.getMaxWarnings(VillagerEntityMCA.java:684) ~[minecraft-comes-alive-7.5.14+1.20.1-universal.jar%23209!/:?]
	at forge.net.mca.entity.VillagerEntityMCA.lambda$damage$2(VillagerEntityMCA.java:620) ~[minecraft-comes-alive-7.5.14+1.20.1-universal.jar%23209!/:?]
	at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
	at forge.net.mca.entity.VillagerEntityMCA.m_6469_(VillagerEntityMCA.java:615) ~[minecraft-comes-alive-7.5.14+1.20.1-universal.jar%23209!/:?]
	at net.minecraft.world.entity.projectile.ThrownEgg.m_5790_(ThrownEgg.java:41) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.entity.projectile.Projectile.m_6532_(Projectile.java:138) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.entity.projectile.ThrownEgg.m_6532_(ThrownEgg.java:46) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.entity.projectile.ThrowableProjectile.m_8119_(ThrowableProjectile.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:693) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.level.Level.m_46653_(Level.java:479) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:343) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:323) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:893) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
commented
Caused by: java.lang.ArithmeticException: / by zero
	at forge.net.mca.entity.VillagerEntityMCA.getMaxWarnings(VillagerEntityMCA.java:684) ~[minecraft-comes-alive-7.5.14+1.20.1-universal.jar%23209!/:?]
	at forge.net.mca.entity.VillagerEntityMCA.lambda$damage$2(VillagerEntityMCA.java:620) ~[minecraft-comes-alive-7.5.14+1.20.1-universal.jar%23209!/:?]
	at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
	at forge.net.mca.entity.VillagerEntityMCA.m_6469_(VillagerEntityMCA.java:615) ~[minecraft-comes-alive-7.5.14+1.20.1-universal.jar%23209!/:?]
	at net.minecraft.world.entity.projectile.ThrownEgg.m_5790_(ThrownEgg.java:41) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.entity.projectile.Projectile.m_6532_(Projectile.java:138) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.entity.projectile.ThrownEgg.m_6532_(ThrownEgg.java:46) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.entity.projectile.ThrowableProjectile.m_8119_(ThrowableProjectile.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.server.level.ServerLevel.m_8647_(ServerLevel.java:693) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.level.Level.m_46653_(Level.java:479) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.server.level.ServerLevel.m_184063_(ServerLevel.java:343) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.world.level.entity.EntityTickList.m_156910_(EntityTickList.java:54) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:323) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]
	at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:893) ~[server-1.20.1-20230612.114412-srg.jar%23237!/:?]

SPTKGT% D7)(4L7IN@KX$~I
ok i think it is because the modpack author edit this to 0. thanks for replying. I will close this comment

commented

Thanks, that's possible, tho crashing is still an issue :)