[1.12.2] FirstAid async data with Mohist and Cat server
siyy123 opened this issue ยท 2 comments
Both Mohist and CatServer have the bug. Forge version 2860.
Logs (on Mohist when a player jumps into lava):
[17:24:12 INFO]: --- Damaging 1.0 using ichttt.mods.firstaid.common.damagesystem.distribution.RandomDamageDistribution@6f7a7ad9 for dmg source inFire, redistribute true, addStat true ---
[17:24:12 INFO]: Starting distribution of 1.0 damage...
[17:24:12 INFO]: --- DONE! 0.0 still left ---
[17:24:12 INFO]: --- Damaging 1.0 using ichttt.mods.firstaid.common.damagesystem.distribution.RandomDamageDistribution@6f7a7ad9 for dmg source inFire, redistribute true, addStat true ---
[17:24:12 INFO]: Starting distribution of 1.0 damage...
[17:24:12 INFO]: --- DONE! 0.0 still left ---
[17:24:12 INFO]: --- Damaging 1.0 using ichttt.mods.firstaid.common.damagesystem.distribution.RandomDamageDistribution@6f7a7ad9 for dmg source inFire, redistribute true, addStat true ---
[17:24:12 INFO]: Starting distribution of 1.0 damage...
[17:24:12 INFO]: --- DONE! 0.0 still left ---
[17:24:12 INFO]: --- Damaging 1.0 using ichttt.mods.firstaid.common.damagesystem.distribution.RandomDamageDistribution@6f7a7ad9 for dmg source inFire, redistribute true, addStat true ---
[17:24:12 INFO]: Starting distribution of 1.0 damage...
[17:24:12 INFO]: --- DONE! 0.0 still left ---
[17:24:12 INFO]: --- Damaging 4.0 using ichttt.mods.firstaid.common.damagesystem.distribution.RandomDamageDistribution@6f7a7ad9 for dmg source lava, redistribute true, addStat true ---
[17:24:12 INFO]: Starting distribution of 4.0 damage...
[17:24:12 INFO]: Distribution round: Not done yet, going to next round. Needed to distribute 4.0 damage (reduced to 4.0) to HEAD, but only distributed 2.0. New damage to be distributed is 2.0, based on absorb factor 1.0
[17:24:12 INFO]: DEBUG: Tracking status change from true to false
java.lang.RuntimeException: DEBUG:Tracking status change from true to false
at ichttt.mods.firstaid.common.util.CommonUtils.debugLogStacktrace(CommonUtils.java:155) [CommonUtils.class:?]
at ichttt.mods.firstaid.common.DataManagerWrapper.toggleTracking(DataManagerWrapper.java:131) [DataManagerWrapper.class:?]
at ichttt.mods.firstaid.common.util.CommonUtils.killPlayer(CommonUtils.java:88) [CommonUtils.class:?]
at ichttt.mods.firstaid.common.damagesystem.distribution.DamageDistribution.handleDamageTaken(DamageDistribution.java:88) [DamageDistribution.class:?]
at ichttt.mods.firstaid.common.EventHandler.onLivingHurt(EventHandler.java:144) [EventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_27_EventHandler_onLivingHurt_LivingHurtEvent.invoke(.dynamic) [?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:96) [ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:186) [EventBus.class:?]
at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:413) [ForgeHooks.class:?]
at net.minecraft.entity.EntityLivingBase.damageEntity_CB(EntityLivingBase.java:1581) [vp.class:?]
at net.minecraft.entity.player.EntityPlayer.damageEntity_CB(EntityPlayer.java:1196) [aed.class:?]
at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:1053) [vp.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70097_a(EntityPlayer.java:1091) [aed.class:?]
at net.minecraft.entity.player.EntityPlayerMP.func_70097_a(EntityPlayerMP.java:833) [oq.class:?]
at net.minecraft.entity.Entity.func_70044_A(Entity.java:626) [vg.class:?]
at net.minecraft.entity.Entity.func_70030_z(Entity.java:591) [vg.class:?]
at net.minecraft.entity.EntityLivingBase.func_70030_z(EntityLivingBase.java:278) [vp.class:?]
at net.minecraft.entity.Entity.func_70071_h_(Entity.java:489) [vg.class:?]
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2402) [vp.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:253) [aed.class:?]
at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:488) [oq.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:255) [pa.class:?]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:208) [NetworkDispatcher$1.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:298) [gw.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:196) [oz.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:922) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:461) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:624) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_322]
[17:24:12 INFO]: DEBUG: Tracking status change from false to true
java.lang.RuntimeException: DEBUG:Tracking status change from false to true
at ichttt.mods.firstaid.common.util.CommonUtils.debugLogStacktrace(CommonUtils.java:155) [CommonUtils.class:?]
at ichttt.mods.firstaid.common.DataManagerWrapper.toggleTracking(DataManagerWrapper.java:131) [DataManagerWrapper.class:?]
at ichttt.mods.firstaid.common.util.CommonUtils.killPlayer(CommonUtils.java:93) [CommonUtils.class:?]
at ichttt.mods.firstaid.common.damagesystem.distribution.DamageDistribution.handleDamageTaken(DamageDistribution.java:88) [DamageDistribution.class:?]
at ichttt.mods.firstaid.common.EventHandler.onLivingHurt(EventHandler.java:144) [EventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_27_EventHandler_onLivingHurt_LivingHurtEvent.invoke(.dynamic) [?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:96) [ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:186) [EventBus.class:?]
at net.minecraftforge.common.ForgeHooks.onLivingHurt(ForgeHooks.java:413) [ForgeHooks.class:?]
at net.minecraft.entity.EntityLivingBase.damageEntity_CB(EntityLivingBase.java:1581) [vp.class:?]
at net.minecraft.entity.player.EntityPlayer.damageEntity_CB(EntityPlayer.java:1196) [aed.class:?]
at net.minecraft.entity.EntityLivingBase.func_70097_a(EntityLivingBase.java:1053) [vp.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70097_a(EntityPlayer.java:1091) [aed.class:?]
at net.minecraft.entity.player.EntityPlayerMP.func_70097_a(EntityPlayerMP.java:833) [oq.class:?]
at net.minecraft.entity.Entity.func_70044_A(Entity.java:626) [vg.class:?]
at net.minecraft.entity.Entity.func_70030_z(Entity.java:591) [vg.class:?]
at net.minecraft.entity.EntityLivingBase.func_70030_z(EntityLivingBase.java:278) [vp.class:?]
at net.minecraft.entity.Entity.func_70071_h_(Entity.java:489) [vg.class:?]
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2402) [vp.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:253) [aed.class:?]
at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:488) [oq.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:255) [pa.class:?]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:208) [NetworkDispatcher$1.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:298) [gw.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:196) [oz.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:922) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:461) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:624) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_322]
[17:24:12 INFO]: --- DONE! 0.0 still left ---
The bug cause abnormal damage (too high) when players are hurted by lava/cactus/wolves. And async players' death event with server causing players still be hurted when they have been in lava and not telling server about their deaths causing other mods (for example simpledifficulty) not to reset players status when they die and keep players' inventory even if keepInventory is set to false.
FirstAid diggs very deep into the minecraft data manager to intercept all health changes. Because of that, it makes some assumptions that are valid for forge servers and other mods, but may break with custom servers. Last time I looked these custom servers had some weird code around the health changes. My stance has and will always be to only support forge and no custom servers, as it would mean a ton of work for me to fix firstaid for these custom server and I would have to make sure that nothing breaks there as well for every version. And yeah, that's not something I am going to do. Sorry