diff --git a/src/main/java/com/minelittlepony/unicopia/compat/ad_astra/OxygenApi.java b/src/main/java/com/minelittlepony/unicopia/compat/ad_astra/OxygenApi.java index 7a216d4c..abc635e2 100644 --- a/src/main/java/com/minelittlepony/unicopia/compat/ad_astra/OxygenApi.java +++ b/src/main/java/com/minelittlepony/unicopia/compat/ad_astra/OxygenApi.java @@ -2,10 +2,11 @@ package com.minelittlepony.unicopia.compat.ad_astra; import java.util.concurrent.atomic.AtomicReference; -import net.minecraft.entity.Entity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; public interface OxygenApi { - AtomicReference API = new AtomicReference<>(entity -> false); + AtomicReference API = new AtomicReference<>((world, pos) -> false); - boolean hasOxygen(Entity entity); + boolean hasOxygen(World world, BlockPos pos); } diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java index e6898304..699a2e95 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java @@ -200,7 +200,7 @@ public class PlayerPhysics extends EntityPhysics implements Tickab if ((RegistryUtils.isIn(entity.getWorld(), dimension, RegistryKeys.DIMENSION_TYPE, UTags.DimensionTypes.HAS_NO_ATMOSPHERE) || Unicopia.getConfig().dimensionsWithoutAtmosphere.get().contains(RegistryUtils.getId(entity.getWorld(), dimension, RegistryKeys.DIMENSION_TYPE).toString())) - && !OxygenApi.API.get().hasOxygen(entity)) { + && !OxygenApi.API.get().hasOxygen(entity.getWorld(), entity.getBlockPos())) { return FlightType.NONE; }