Examples of GCCoreOxygenSuffocationEvent


Examples of micdoodle8.mods.galacticraft.api.event.oxygen.GCCoreOxygenSuffocationEvent

            {
                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);
                    }
                }
            }
        }
View Full Code Here

Examples of micdoodle8.mods.galacticraft.api.event.oxygen.GCCoreOxygenSuffocationEvent

            {
                if (playerStats.damageCounter == 0)
                {
                    playerStats.damageCounter = ConfigManagerCore.suffocationCooldown;

                    GCCoreOxygenSuffocationEvent suffocationEvent = new GCCoreOxygenSuffocationEvent.Pre(player);
                    MinecraftForge.EVENT_BUS.post(suffocationEvent);

                    if (!suffocationEvent.isCanceled())
                    {
                        player.attackEntityFrom(DamageSourceGC.oxygenSuffocation, ConfigManagerCore.suffocationDamage);

                        GCCoreOxygenSuffocationEvent suffocationEventPost = new GCCoreOxygenSuffocationEvent.Post(player);
                        MinecraftForge.EVENT_BUS.post(suffocationEventPost);
                    }
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.