Console spam and some Exception
Vitali8 opened this issue ยท 1 comments
Repeat of Techguns #135, to match mod's version, with which problems arise.
I have some spam in the server console. Server console are clogging up with errors, when you somehow interact with a mob (zombie, helicopter) from the mod. I tried to put a spawn on 0 in configs, but this doesn't solve the problem, because in some or other quantities the mobs continue to spawn.
Example error from console: Error
Also, sometimes there is such an Exception: Exception occurred during a PhaseState
The problem stems from here
Generally speaking even though that method requires an instance of EntityPlayer as a parameter, it can be safely passed a null as the only thing the instance of EntityPlayer does there is for stat tracking for item damaged.
Alternatively you could do something like this to add it in as required...
if (stack.attemptDamageItem(damage, entity.getRNG(), (entity instanceof EntityPlayerMP ?
(EntityPlayerMP) entity : null)))