File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/micdoodle8/mods/galacticraft/core/event Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 115
115
import micdoodle8 .mods .galacticraft .core .tick .TickHandlerServer ;
116
116
import micdoodle8 .mods .galacticraft .core .util .ASMUtil ;
117
117
import micdoodle8 .mods .galacticraft .core .util .ConfigManagerCore ;
118
- import micdoodle8 .mods .galacticraft .core .util .DamageSourceGC ;
119
118
import micdoodle8 .mods .galacticraft .core .util .GCCoreUtil ;
120
119
import micdoodle8 .mods .galacticraft .core .util .OxygenUtil ;
121
120
import micdoodle8 .mods .galacticraft .core .util .PlayerUtil ;
@@ -371,10 +370,11 @@ public void entityLivingEvent(LivingEvent.LivingUpdateEvent event)
371
370
if (!OxygenUtil .isAABBInBreathableAirBlock (entityLiving ))
372
371
{
373
372
GCCoreOxygenSuffocationEvent suffocationEvent = new GCCoreOxygenSuffocationEvent .Pre (entityLiving );
373
+ MinecraftForge .EVENT_BUS .post (suffocationEvent );
374
374
375
- if (MinecraftForge . EVENT_BUS . post ( suffocationEvent ))
375
+ if (suffocationEvent . isCanceled ( ))
376
376
{
377
- entityLiving . attackEntityFrom ( DamageSourceGC . oxygenSuffocation , Math . max ( ConfigManagerCore . suffocationDamage / 2 , 1 )) ;
377
+ return ;
378
378
}
379
379
380
380
GCCoreOxygenSuffocationEvent suffocationEventPost = new GCCoreOxygenSuffocationEvent .Post (entityLiving );
You can’t perform that action at this time.
0 commit comments