Rewrite Air function

This commit is contained in:
bitheaven 2023-11-09 22:25:08 +05:00
parent 7ccdf8d063
commit 58a5175ed9
1 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,7 @@
package ru.bitheaven.createairfabric;
import com.simibubi.create.Create;
import fuzs.thinair.helper.AirHelper;
import fuzs.thinair.helper.AirQualityLevel;
import fuzs.thinair.helper.AirQualityHelperImpl;
import io.github.fabricators_of_create.porting_lib.util.EnvExecutor;
import net.fabricmc.api.ModInitializer;
import net.minecraft.resources.ResourceLocation;
@ -25,8 +24,8 @@ public class CreateAirFabric implements ModInitializer {
}
public static boolean airQualityActivatesHelmet(LivingEntity entity) {
final AirQualityLevel air = AirHelper.getO2LevelFromLocation(entity.getEyePosition(), entity.level()).getFirst();
return air == AirQualityLevel.RED || air == AirQualityLevel.YELLOW;
AirQualityHelperImpl air = new AirQualityHelperImpl();
return !air.getAirQualityAtLocation(entity.level(), entity.getEyePosition()).canBreathe;
}
public static ResourceLocation id(String path) {