First push
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package ru.bitheaven.createastrafabric;
|
||||
|
||||
import com.simibubi.create.Create;
|
||||
import earth.terrarium.ad_astra.common.util.OxygenUtils;
|
||||
import io.github.fabricators_of_create.porting_lib.util.EnvExecutor;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class CreateAstraFabric implements ModInitializer {
|
||||
public static final String ID = "createastrafabric";
|
||||
public static final String NAME = "Create Astra Fabric";
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(NAME);
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
LOGGER.info("Create addon mod [{}] is loading alongside Create [{}]!", NAME, Create.VERSION);
|
||||
LOGGER.info(EnvExecutor.unsafeRunForDist(
|
||||
() -> () -> "{} is accessing Porting Lib from the client!",
|
||||
() -> () -> "{} is accessing Porting Lib from the server!"
|
||||
), NAME);
|
||||
}
|
||||
|
||||
public static boolean airQualityActivatesHelmet(LivingEntity entity) {
|
||||
final Level level = entity.level();
|
||||
final boolean air = OxygenUtils.levelHasOxygen(level);
|
||||
return !air || entity.isUnderWater();
|
||||
}
|
||||
|
||||
public static ResourceLocation id(String path) {
|
||||
return new ResourceLocation(ID, path);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user