[1.10][1.0.6] crash when drinking cold resistance potion while suffering from hypotherima
Rosethorns opened this issue ยท 1 comments
Drink cold resistance potion while suffering from hypothermia
net.minecraft.util.ReportedException: Ticking player
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:195) ~[md.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:732) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:149) ~[bzl.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) [MinecraftServer.class:?]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_31]
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(Unknown Source) ~[?:1.8.0_31]
at java.util.HashMap$KeyIterator.next(Unknown Source) ~[?:1.8.0_31]
at net.minecraft.entity.EntityLivingBase.func_70679_bo(EntityLivingBase.java:586) ~[sf.class:?]
at net.minecraft.entity.EntityLivingBase.func_70030_z(EntityLivingBase.java:343) ~[sf.class:?]
at net.minecraft.entity.Entity.func_70071_h_(Entity.java:359) ~[rw.class:?]
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1938) ~[sf.class:?]
at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:233) ~[zs.class:?]
at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:303) ~[lu.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:162) ~[me.class:?]
at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:212) ~[NetworkDispatcher$1.class:?]
at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:287) ~[eo.class:?]
at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180) ~[md.class:?]
Probably because https://github.com/Glitchfiend/ToughAsNails/blob/TAN-1.11.x-2.0.0/src/main/java/toughasnails/potion/PotionColdResistance.java#L17 is modifying the potions array while it's being iterated over to call that method? I've gotten this crash several times, but it's not a 100% thing which is pretty weird. Maybe it'd be best to set the negative effect's duration to 1 if it's > 1, and then let MC do the cleanup.
(Alternatively, set the resist as a cure item?)