{
if ((!(event.entityLiving instanceof IEntityBreathable) || !((IEntityBreathable) event.entityLiving).canBreath()) && event.entityLiving.ticksExisted % 100 == 0)
{
if (!OxygenUtil.isAABBInBreathableAirBlock(event.entityLiving))
{
GCCoreOxygenSuffocationEvent suffocationEvent = new GCCoreOxygenSuffocationEvent.Pre(event.entityLiving);
MinecraftForge.EVENT_BUS.post(suffocationEvent);
if (suffocationEvent.isCanceled())
{
return;
}
event.entityLiving.attackEntityFrom(DamageSourceGC.oxygenSuffocation, 1);
GCCoreOxygenSuffocationEvent suffocationEventPost = new GCCoreOxygenSuffocationEvent.Post(event.entityLiving);
MinecraftForge.EVENT_BUS.post(suffocationEventPost);
}
}
}
}