Skip to content

Commit 5c07be2

Browse files
committed
revert: unintended changes committed
1 parent e313eaa commit 5c07be2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/micdoodle8/mods/galacticraft/core/event/EventHandlerGC.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@
115115
import micdoodle8.mods.galacticraft.core.tick.TickHandlerServer;
116116
import micdoodle8.mods.galacticraft.core.util.ASMUtil;
117117
import micdoodle8.mods.galacticraft.core.util.ConfigManagerCore;
118-
import micdoodle8.mods.galacticraft.core.util.DamageSourceGC;
119118
import micdoodle8.mods.galacticraft.core.util.GCCoreUtil;
120119
import micdoodle8.mods.galacticraft.core.util.OxygenUtil;
121120
import micdoodle8.mods.galacticraft.core.util.PlayerUtil;
@@ -371,10 +370,11 @@ public void entityLivingEvent(LivingEvent.LivingUpdateEvent event)
371370
if (!OxygenUtil.isAABBInBreathableAirBlock(entityLiving))
372371
{
373372
GCCoreOxygenSuffocationEvent suffocationEvent = new GCCoreOxygenSuffocationEvent.Pre(entityLiving);
373+
MinecraftForge.EVENT_BUS.post(suffocationEvent);
374374

375-
if (MinecraftForge.EVENT_BUS.post(suffocationEvent))
375+
if (suffocationEvent.isCanceled())
376376
{
377-
entityLiving.attackEntityFrom(DamageSourceGC.oxygenSuffocation, Math.max(ConfigManagerCore.suffocationDamage / 2, 1));
377+
return;
378378
}
379379

380380
GCCoreOxygenSuffocationEvent suffocationEventPost = new GCCoreOxygenSuffocationEvent.Post(entityLiving);

0 commit comments

Comments
 (0)