Compare commits
34 Commits
createairf
...
824a2cf0a3
Author | SHA1 | Date | |
---|---|---|---|
824a2cf0a3 | |||
a112b38b1c | |||
2a5f442a78 | |||
d3fea6ca2d | |||
baba04d179 | |||
4f0c236cff | |||
9f80bf51f0 | |||
b5b84d21fc | |||
212c1c11a6 | |||
908701152e | |||
ac3d2b8632 | |||
3adfd20d72 | |||
bb1a6be978 | |||
58125c04df | |||
c52aebf2a8 | |||
ccd632e0c3 | |||
956d2e6b53 | |||
ed146f441d | |||
be9a4bdd59 | |||
2c386caace | |||
b749efbbac | |||
8f01df0971 | |||
3683405780 | |||
f4625f84b3 | |||
3a3b3b11fa | |||
23667171ae | |||
9d811a82af | |||
fb97097b67 | |||
328ca781ff | |||
429b444058 | |||
be08c76edf | |||
7e65f5d748 | |||
1079b588e5 | |||
301bcad666 |
@ -6,36 +6,57 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
env:
|
||||
RUN_NUMBER: ${{ gitea.run_number }}
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 17 ]
|
||||
java: [ '17' ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout repository
|
||||
uses: https://git.bitheaven.ru/actions/checkout@v2
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup jdk ${{ matrix.java }}
|
||||
uses: https://git.bitheaven.ru/actions/setup-java@v1
|
||||
- name: Setup JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'liberica'
|
||||
java-version: ${{ matrix.java }}
|
||||
|
||||
- uses: https://git.bitheaven.ru/actions/cache@v2
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/loom-cache
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: make gradle wrapper executable
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: build
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
|
||||
- name: capture build artifacts
|
||||
uses: https://git.bitheaven.ru/actions/upload-artifact@v2
|
||||
- name: Upload Mod JAR
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
||||
name: create-air-fabric
|
||||
path: build/libs/*.jar
|
||||
|
||||
upload-release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Download build artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: create-air-fabric
|
||||
|
||||
- name: Make release
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
name: Create Air Fabric 1.0-${{ gitea.run_number }} for 1.20.1
|
||||
tag_name: createairfabric-1.0+1.20.1-${{ gitea.run_number }}
|
||||
md5sum: true
|
||||
sha256sum: true
|
||||
files: |-
|
||||
*.jar
|
||||
# build/libs/**
|
||||
|
76
build.gradle
76
build.gradle
@ -1,16 +1,13 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.2-SNAPSHOT'
|
||||
id "fabric-loom" version "1.8+"
|
||||
id "io.github.p03w.machete" version "1.+" // automatic jar compressing on build
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
base.archivesName = archives_base_name
|
||||
group = project.maven_group
|
||||
|
||||
String buildNumber = System.getenv("GITEA_RUN_NUMBER")
|
||||
String buildNumber = System.getenv("RUN_NUMBER")
|
||||
version = "${mod_version}+${minecraft_version}" + (buildNumber != null ? "-${buildNumber}" : "")
|
||||
|
||||
repositories {
|
||||
@ -20,16 +17,24 @@ repositories {
|
||||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
|
||||
// for more information about repositories.
|
||||
maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI
|
||||
maven { url = "https://dvs1.progwml6.com/files/maven/" } // JEI
|
||||
maven { url = "https://maven.parchmentmc.org" } // Parchment mappings
|
||||
maven { url = "https://maven.blamejared.com" } // JEI
|
||||
maven {
|
||||
name = 'ParchmentMC'
|
||||
url = 'https://maven.parchmentmc.org'
|
||||
}
|
||||
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
|
||||
maven { url = "https://api.modrinth.com/maven" } // LazyDFU
|
||||
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu
|
||||
maven { url = "https://mvn.devos.one/snapshots/" } // Create, Porting Lib, Forge Tags, Milk Lib, Registrate
|
||||
maven { url = "https://cursemaven.com" } // Forge Config API Port
|
||||
maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes
|
||||
maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM
|
||||
maven { // Fabric ASM for Porting Lib
|
||||
url = "https://jitpack.io/"
|
||||
content { includeGroupAndSubgroups("com.github") }
|
||||
}
|
||||
maven { url = "https://maven.tterrag.com/" } // Flywheel
|
||||
maven { url = "https://mvn.devos.one/snapshots/" } // Create and several dependencies
|
||||
maven { url = "https://mvn.devos.one/releases/" } // Porting Lib releases
|
||||
maven { url = "https://raw.githubusercontent.com/Fuzss/modresources/main/maven" } // Forge Config API Port
|
||||
|
||||
exclusiveContent {
|
||||
forRepository {
|
||||
@ -61,36 +66,40 @@ dependencies {
|
||||
modImplementation("com.simibubi.create:create-fabric-${minecraft_version}:${create_version}")
|
||||
|
||||
// Thin Air
|
||||
modImplementation("maven.modrinth:thin-air:v8.1.3-1.20.1-Fabric")
|
||||
modImplementation("maven.modrinth:thin-air:${thinair_version}")
|
||||
|
||||
// Ad Astra
|
||||
modImplementation("curse.maven:ad-astra-635042:4774341")
|
||||
modImplementation("maven.modrinth:ad-astra:${adastra_version}")
|
||||
modImplementation("maven.modrinth:botarium:${botarium_version}")
|
||||
|
||||
// Development QOL
|
||||
modLocalRuntime("maven.modrinth:lazydfu:${lazydfu_version}")
|
||||
modLocalRuntime("com.terraformersmc:modmenu:${modmenu_version}")
|
||||
|
||||
// Recipe Viewers - Create Fabric supports JEI, REI, and EMI.
|
||||
include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.4.1")))
|
||||
|
||||
// Recipe Viewers - Create Fabric supports JEI, REI, and EMI.
|
||||
// See root gradle.properties to choose which to use at runtime.
|
||||
switch (recipe_viewer.toLowerCase(Locale.ROOT)) {
|
||||
case "jei": modLocalRuntime("mezz.jei:jei-${minecraft_version}-fabric:${jei_version}"); break
|
||||
case "rei": modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:${rei_version}"); break
|
||||
case "emi": modLocalRuntime("dev.emi:emi:${emi_version}"); break
|
||||
case "jei": modLocalRuntime("mezz.jei:jei-$minecraft_version-fabric:$jei_version"); break
|
||||
case "rei": modLocalRuntime("me.shedaniel:RoughlyEnoughItems-fabric:$rei_version"); break
|
||||
case "emi": modLocalRuntime("dev.emi:emi-fabric:$emi_version"); break
|
||||
case "disabled": break
|
||||
default: println("Unknown recipe viewer specified: ${recipe_viewer}. Must be JEI, REI, EMI, or disabled.")
|
||||
default: println("Unknown recipe viewer specified: $recipe_viewer. Must be JEI, REI, EMI, or disabled.")
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
// require dependencies to be the version compiled against or newer
|
||||
Map<String, String> properties = new HashMap<>()
|
||||
properties.put("version", version)
|
||||
properties.put("fabric_loader_version", fabric_loader_version)
|
||||
properties.put("fabric_api_version", fabric_api_version)
|
||||
properties.put("create_version", create_version)
|
||||
properties.put("minecraft_version", minecraft_version)
|
||||
Map<String, Object> properties = [
|
||||
"version": version,
|
||||
"fabric_loader_version": fabric_loader_version,
|
||||
"fabric_api_version": fabric_api_version,
|
||||
"create_version": create_version,
|
||||
"minecraft_version": minecraft_version
|
||||
]
|
||||
|
||||
properties.forEach((k, v) -> inputs.property(k, v))
|
||||
inputs.properties(properties)
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand properties
|
||||
@ -99,7 +108,7 @@ processResources {
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
it.options.release = Integer.parseInt(sourceCompatibility)
|
||||
it.options.release = 17
|
||||
}
|
||||
|
||||
java {
|
||||
@ -111,20 +120,3 @@ jar {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
}
|
||||
}
|
||||
|
||||
// configure the maven publication
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
|
||||
repositories {
|
||||
// Add repositories to publish to here.
|
||||
// Notice: This block does NOT have the same function as the block in the top level.
|
||||
// The repositories here will be used for publishing your artifact, not for
|
||||
// retrieving dependencies.
|
||||
}
|
||||
}
|
||||
|
@ -2,30 +2,35 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.20.1
|
||||
yarn_mappings=1.20.1+build.10
|
||||
fabric_loader_version=0.14.21
|
||||
# check this on https://modmuss50.me/fabric.html
|
||||
fabric_api_version=0.90.0+1.20.1
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.20.1
|
||||
yarn_mappings=1.20.1+build.10
|
||||
fabric_loader_version=0.16.9
|
||||
# check this on https://modmuss50.me/fabric.html
|
||||
fabric_api_version=0.92.2+1.20.1
|
||||
|
||||
# Mappings
|
||||
# https://lambdaurora.dev/tools/import_quilt.html
|
||||
qm_version = 23
|
||||
# https://parchmentmc.org/docs/getting-started
|
||||
parchment_version = 2023.06.26
|
||||
# https://lambdaurora.dev/tools/import_quilt.html
|
||||
qm_version = 23
|
||||
# https://parchmentmc.org/docs/getting-started
|
||||
parchment_version = 2023.09.03
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0
|
||||
maven_group = ru.bitheaven
|
||||
archives_base_name = createairfabric
|
||||
mod_version = 1.0
|
||||
maven_group = ru.bitheaven
|
||||
archives_base_name = createairfabric
|
||||
|
||||
# Dependencies
|
||||
# https://modrinth.com/mod/create-fabric/versions
|
||||
create_version = 0.5.1-d-build.1161+mc1.20.1
|
||||
# set to disabled to have none of them.
|
||||
recipe_viewer = disabled
|
||||
# Mod Menu - https://modrinth.com/mod/modmenu/versions
|
||||
modmenu_version = 4.1.2
|
||||
# LazyDFU - https://modrinth.com/mod/lazydfu/versions
|
||||
lazydfu_version = 0.1.3
|
||||
# https://modrinth.com/mod/create-fabric/versions
|
||||
create_version = 0.5.1-j-build.1631+mc1.20.1
|
||||
# https://modrinth.com/mod/thin-air/versions
|
||||
thinair_version = v8.1.5-1.20.1-Fabric
|
||||
# https://modrinth.com/mod/ad-astra/versions
|
||||
adastra_version = Xtm1uo8F
|
||||
botarium_version = f3ATcSfq
|
||||
# set to disabled to have none of them.
|
||||
recipe_viewer = disabled
|
||||
# Mod Menu - https://modrinth.com/mod/modmenu/versions
|
||||
modmenu_version = 7.2.2
|
||||
# LazyDFU - https://modrinth.com/mod/lazydfu/versions
|
||||
lazydfu_version = 0.1.3
|
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
||||
networkTimeout=10000
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
@ -1,9 +1,8 @@
|
||||
package ru.bitheaven.createairfabric;
|
||||
|
||||
import com.simibubi.create.Create;
|
||||
import earth.terrarium.ad_astra.common.util.OxygenUtils;
|
||||
import earth.terrarium.adastra.api.systems.OxygenApi;
|
||||
import fuzs.thinair.helper.AirQualityHelperImpl;
|
||||
import io.github.fabricators_of_create.porting_lib.util.EnvExecutor;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
@ -18,10 +17,6 @@ public class CreateAirFabric implements ModInitializer {
|
||||
@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 isOxygen(Entity entity) {
|
||||
@ -31,7 +26,7 @@ public class CreateAirFabric implements ModInitializer {
|
||||
.getAirQualityAtLocation(entity.level(), entity.getEyePosition()).canBreathe;
|
||||
}
|
||||
if (FabricLoader.getInstance().isModLoaded("ad_astra")) {
|
||||
oxygen &= OxygenUtils.levelHasOxygen(entity.level());
|
||||
oxygen &= OxygenApi.API.hasOxygen(entity.level());
|
||||
}
|
||||
return oxygen;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.world.level.material.Fluid;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import com.simibubi.create.content.equipment.armor.DivingHelmetItem;
|
||||
import ru.bitheaven.createairfabric.CreateAirFabric;
|
||||
|
||||
|
@ -1,25 +1,43 @@
|
||||
package ru.bitheaven.createairfabric.mixin;
|
||||
|
||||
import com.simibubi.create.content.equipment.armor.BacktankItem;
|
||||
import com.simibubi.create.content.equipment.armor.BacktankUtil;
|
||||
import com.simibubi.create.content.equipment.armor.DivingHelmetItem;
|
||||
import earth.terrarium.ad_astra.common.entity.system.EntityOxygenSystem;
|
||||
import earth.terrarium.ad_astra.common.util.ModUtils;
|
||||
|
||||
import earth.terrarium.adastra.common.items.armor.SpaceSuitItem;
|
||||
import earth.terrarium.adastra.common.systems.OxygenApiImpl;
|
||||
import earth.terrarium.adastra.common.tags.ModItemTags;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(EntityOxygenSystem.class)
|
||||
@Mixin(OxygenApiImpl.class)
|
||||
public abstract class EntityOxygenSystemMixin {
|
||||
/**
|
||||
* Make air exists if Create Air
|
||||
*/
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/ad_astra/common/util/ModUtils;armourIsOxygenated(Lnet/minecraft/world/entity/LivingEntity;)Z"),
|
||||
method = "oxygenTick(Lnet/minecraft/world/entity/LivingEntity;Lnet/minecraft/server/level/ServerLevel;)V")
|
||||
private static boolean redirectOxygenTick(LivingEntity entity) {
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/adastra/common/items/armor/SpaceSuitItem;hasOxygen(Lnet/minecraft/world/entity/Entity;)Z"),
|
||||
method = "entityTick(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/LivingEntity;)V")
|
||||
private boolean redirectHasOxygen(Entity entity) {
|
||||
if (!(entity instanceof LivingEntity livingEntity)) return SpaceSuitItem.hasOxygen(entity);
|
||||
boolean createOxygen = true;
|
||||
createOxygen &= !DivingHelmetItem.getWornItem(entity).isEmpty();
|
||||
createOxygen &= !BacktankUtil.getAllWithAir(entity).isEmpty();
|
||||
return ModUtils.armourIsOxygenated(entity) || createOxygen;
|
||||
createOxygen &= !DivingHelmetItem.getWornItem(livingEntity).isEmpty();
|
||||
createOxygen &= !BacktankUtil.getAllWithAir(livingEntity).isEmpty();
|
||||
return SpaceSuitItem.hasOxygen(livingEntity) || createOxygen;
|
||||
}
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/adastra/common/items/armor/SpaceSuitItem;hasFullSet(Lnet/minecraft/world/entity/LivingEntity;)Z"),
|
||||
method = "entityTick(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/LivingEntity;)V")
|
||||
private boolean redirectHasFullSet(LivingEntity entity) {
|
||||
boolean createArmor = true;
|
||||
createArmor &= entity.getItemBySlot(EquipmentSlot.HEAD).getItem() instanceof DivingHelmetItem;
|
||||
createArmor &= entity.getItemBySlot(EquipmentSlot.CHEST).getItem() instanceof BacktankItem;
|
||||
createArmor &= entity.getItemBySlot(EquipmentSlot.LEGS).is(ModItemTags.SPACE_SUITS);
|
||||
createArmor &= entity.getItemBySlot(EquipmentSlot.FEET).is(ModItemTags.SPACE_SUITS);
|
||||
|
||||
return SpaceSuitItem.hasFullSet(entity) || createArmor;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,32 +1,31 @@
|
||||
package ru.bitheaven.createairfabric.mixin;
|
||||
|
||||
import earth.terrarium.ad_astra.common.config.AdAstraConfig;
|
||||
import earth.terrarium.ad_astra.common.entity.system.EntityTemperatureSystem;
|
||||
import earth.terrarium.ad_astra.common.item.armor.NetheriteSpaceSuit;
|
||||
import earth.terrarium.ad_astra.common.registry.ModTags;
|
||||
import earth.terrarium.adastra.common.items.armor.NetheriteSpaceSuitItem;
|
||||
import earth.terrarium.adastra.common.tags.ModItemTags;
|
||||
import earth.terrarium.adastra.common.systems.TemperatureApiImpl;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(EntityTemperatureSystem.class)
|
||||
@Mixin(TemperatureApiImpl.class)
|
||||
public abstract class EntityTemperatureSystemMixin {
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/ad_astra/common/entity/system/EntityTemperatureSystem;burnEntity(Lnet/minecraft/world/entity/LivingEntity;)V"),
|
||||
method = "temperatureTick(Lnet/minecraft/world/entity/LivingEntity;Lnet/minecraft/server/level/ServerLevel;)V")
|
||||
private static void redirectTemperatureTick(LivingEntity entity) {
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/adastra/common/systems/TemperatureApiImpl;burnEntity(Lnet/minecraft/world/entity/LivingEntity;)V"),
|
||||
method = "entityTick(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/LivingEntity;)V")
|
||||
private void redirectTemperatureTick(TemperatureApiImpl instance, LivingEntity entity) {
|
||||
boolean createNetherite = true;
|
||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.HEAD).getItem().isFireResistant();
|
||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.CHEST).getItem().isFireResistant();
|
||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.LEGS).is(ModTags.HEAT_RESISTANT)
|
||||
|| entity.getItemBySlot(EquipmentSlot.LEGS).getItem() instanceof NetheriteSpaceSuit
|
||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.LEGS).is(ModItemTags.HEAT_RESISTANT_ARMOR)
|
||||
|| entity.getItemBySlot(EquipmentSlot.LEGS).getItem() instanceof NetheriteSpaceSuitItem
|
||||
|| entity.getItemBySlot(EquipmentSlot.LEGS).getItem().isFireResistant();
|
||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.FEET).is(ModTags.HEAT_RESISTANT)
|
||||
|| entity.getItemBySlot(EquipmentSlot.FEET).getItem() instanceof NetheriteSpaceSuit
|
||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.FEET).is(ModItemTags.HEAT_RESISTANT_ARMOR)
|
||||
|| entity.getItemBySlot(EquipmentSlot.FEET).getItem() instanceof NetheriteSpaceSuitItem
|
||||
|| entity.getItemBySlot(EquipmentSlot.FEET).getItem().isFireResistant();
|
||||
|
||||
if(!createNetherite) {
|
||||
entity.hurt(entity.damageSources().onFire(), (float) AdAstraConfig.heatDamage);
|
||||
entity.hurt(entity.damageSources().onFire(), 6);
|
||||
entity.setSecondsOnFire(10);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user