Compare commits
8 Commits
824a2cf0a3
...
createairf
Author | SHA1 | Date | |
---|---|---|---|
9cb8f2d356 | |||
66ece416a6 | |||
5df46a0fad | |||
2b0a1a0759 | |||
8c8f995b04 | |||
4f78c9bd03 | |||
6032f8af2b | |||
fc5d12980f |
@ -19,21 +19,27 @@ jobs:
|
||||
- name: Setup JDK ${{ matrix.java }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'liberica'
|
||||
distribution: 'oracle'
|
||||
java-version: ${{ matrix.java }}
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Cache Gradle packages
|
||||
- name: Loom Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
path: "**/.gradle/loom-cache"
|
||||
key: "${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}"
|
||||
restore-keys: "${{ runner.os }}-gradle-"
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
- name: Validate Gradle Wrapper Integrity
|
||||
uses: gradle/wrapper-validation-action@v2
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
run: ./gradlew build --no-daemon
|
||||
|
||||
- name: Upload Mod JAR
|
||||
uses: actions/upload-artifact@v3
|
||||
|
82
build.gradle
82
build.gradle
@ -1,14 +1,16 @@
|
||||
plugins {
|
||||
id "fabric-loom" version "1.8+"
|
||||
alias libs.plugins.fabric.loom
|
||||
id "io.github.p03w.machete" version "1.+" // automatic jar compressing on build
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
base.archivesName = archives_base_name
|
||||
group = project.maven_group
|
||||
base {
|
||||
archivesName = project.archives_base_name
|
||||
}
|
||||
|
||||
String buildNumber = System.getenv("RUN_NUMBER")
|
||||
version = "${mod_version}+${minecraft_version}" + (buildNumber != null ? "-${buildNumber}" : "")
|
||||
version = "${mod_version}+${libs.versions.minecraft.get()}" + (buildNumber != null ? "-${buildNumber}" : "")
|
||||
group = project.maven_group
|
||||
|
||||
repositories {
|
||||
// Add repositories to retrieve artifacts from in here.
|
||||
@ -22,7 +24,10 @@ repositories {
|
||||
name = 'ParchmentMC'
|
||||
url = 'https://maven.parchmentmc.org'
|
||||
}
|
||||
maven { url = "https://maven.quiltmc.org/repository/release" } // Quilt Mappings
|
||||
maven {
|
||||
name = 'Quilt'
|
||||
url = 'https://maven.quiltmc.org/repository/release'
|
||||
}
|
||||
maven { url = "https://api.modrinth.com/maven" } // LazyDFU
|
||||
maven { url = "https://maven.terraformersmc.com/releases/" } // Mod Menu
|
||||
maven { url = "https://cursemaven.com" } // Forge Config API Port
|
||||
@ -49,54 +54,58 @@ repositories {
|
||||
}
|
||||
}
|
||||
|
||||
loom {
|
||||
// Loom and Loader both use this block in order to gather more information about your mod.
|
||||
mods {
|
||||
// This should match your mod id.
|
||||
"ru.bitheaven.createairfabric" {
|
||||
// Tell Loom about each source set used by your mod here. This ensures that your mod's classes are properly transformed by Loader.
|
||||
sourceSet("main")
|
||||
// If you shade (directly include classes, not JiJ) a dependency into your mod, include it here using one of these methods:
|
||||
// dependency("com.example.shadowedmod:1.2.3")
|
||||
// configuration("exampleShadedConfigurationName")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"
|
||||
dependencies {
|
||||
// To change the versions see the gradle.properties file
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings(loom.layered {
|
||||
it.mappings("org.quiltmc:quilt-mappings:${minecraft_version}+build.${qm_version}:intermediary-v2")
|
||||
it.parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
|
||||
it.officialMojangMappings { nameSyntheticMembers = false }
|
||||
})
|
||||
modImplementation("net.fabricmc:fabric-loader:${fabric_loader_version}")
|
||||
minecraft libs.minecraft
|
||||
mappings loom.layered {
|
||||
mappings "org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:intermediary-v2"
|
||||
officialMojangMappings()
|
||||
}
|
||||
|
||||
modImplementation libs.fabric.loader
|
||||
|
||||
// Fabric API. This is technically optional, but you probably want it anyway.
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabric_api_version}")
|
||||
modImplementation libs.fabric.api
|
||||
|
||||
// Create - dependencies are added transitively
|
||||
modImplementation("com.simibubi.create:create-fabric-${minecraft_version}:${create_version}")
|
||||
modImplementation libs.create
|
||||
|
||||
// Thin Air
|
||||
modImplementation("maven.modrinth:thin-air:${thinair_version}")
|
||||
modImplementation libs.thinair
|
||||
|
||||
// Ad Astra
|
||||
modImplementation("maven.modrinth:ad-astra:${adastra_version}")
|
||||
modImplementation("maven.modrinth:botarium:${botarium_version}")
|
||||
modImplementation libs.adastra
|
||||
modImplementation libs.botarium
|
||||
|
||||
// Development QOL
|
||||
modLocalRuntime("maven.modrinth:lazydfu:${lazydfu_version}")
|
||||
modLocalRuntime("com.terraformersmc:modmenu:${modmenu_version}")
|
||||
modLocalRuntime libs.lazydfu
|
||||
modLocalRuntime libs.modmenu
|
||||
|
||||
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-fabric:$emi_version"); break
|
||||
case "disabled": break
|
||||
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, Object> properties = [
|
||||
"version": version,
|
||||
"fabric_loader_version": fabric_loader_version,
|
||||
"fabric_api_version": fabric_api_version,
|
||||
"create_version": create_version,
|
||||
"minecraft_version": minecraft_version
|
||||
"fabric_loader_version": libs.versions.fabric.loader.get(),
|
||||
"fabric_api_version": libs.versions.fabric.api.get(),
|
||||
"create_version": libs.versions.create.get(),
|
||||
"minecraft_version": libs.versions.minecraft.get()
|
||||
]
|
||||
|
||||
inputs.properties(properties)
|
||||
@ -112,11 +121,14 @@ tasks.withType(JavaCompile).configureEach {
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
rename { "${it}_${base.archivesName.get()}"}
|
||||
}
|
||||
}
|
||||
|
@ -1,36 +1,9 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
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.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.09.03
|
||||
org.gradle.jvmargs = -Xmx1G
|
||||
|
||||
# Mod Properties
|
||||
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-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
|
||||
# Dependencies are managed at gradle/libs.versions.toml
|
46
gradle/libs.versions.toml
Normal file
46
gradle/libs.versions.toml
Normal file
@ -0,0 +1,46 @@
|
||||
# The latest versions are available at https://quiltmc.org/en/usage/latest-versions
|
||||
[versions]
|
||||
minecraft = "1.20.1"
|
||||
# https://lambdaurora.dev/tools/import_quilt.html
|
||||
quilt_mappings = "1.20.1+build.23"
|
||||
# https://parchmentmc.org/docs/getting-started
|
||||
parchment = "2023.09.03"
|
||||
|
||||
fabric_loom = "1.8+"
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
fabric_loader = "0.16.9"
|
||||
fabric_api = "0.92.2+1.20.1"
|
||||
|
||||
# https://modrinth.com/mod/create-fabric/versions
|
||||
create = "0.5.1-j-build.1631+mc1.20.1"
|
||||
# https://modrinth.com/mod/thin-air/versions
|
||||
thinair = "v8.1.5-1.20.1-Fabric"
|
||||
# https://modrinth.com/mod/ad-astra/versions
|
||||
adastra = "Xtm1uo8F"
|
||||
# https://modrinth.com/mod/botarium/versions
|
||||
botarium = "f3ATcSfq"
|
||||
|
||||
# LazyDFU - https://modrinth.com/mod/lazydfu/versions
|
||||
lazydfu = "0.1.3"
|
||||
# Mod Menu - https://modrinth.com/mod/modmenu/versions
|
||||
modmenu = "7.2.2"
|
||||
|
||||
[libraries]
|
||||
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
|
||||
|
||||
fabric_loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric_loader" }
|
||||
fabric_api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fabric_api" }
|
||||
|
||||
create = { module = "com.simibubi.create:create-fabric-1.20.1", version.ref = "create" }
|
||||
thinair = { module = "maven.modrinth:thin-air", version.ref = "thinair" }
|
||||
adastra = { module = "maven.modrinth:ad-astra", version.ref = "adastra" }
|
||||
botarium = { module = "maven.modrinth:botarium", version.ref = "botarium" }
|
||||
|
||||
lazydfu = { module = "maven.modrinth:lazydfu", version.ref = "lazydfu" }
|
||||
modmenu = { module = "com.terraformersmc:modmenu", version.ref = "modmenu" }
|
||||
|
||||
# If you have multiple similar dependencies, you can declare a dependency bundle and reference it on the build script with "libs.bundles.example".
|
||||
[bundles]
|
||||
|
||||
[plugins]
|
||||
fabric_loom = { id = "fabric-loom", version.ref = "fabric_loom" }
|
@ -5,7 +5,7 @@ import earth.terrarium.adastra.api.systems.OxygenApi;
|
||||
import fuzs.thinair.helper.AirQualityHelperImpl;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@ -19,7 +19,7 @@ public class CreateAirFabric implements ModInitializer {
|
||||
LOGGER.info("Create addon mod [{}] is loading alongside Create [{}]!", NAME, Create.VERSION);
|
||||
}
|
||||
|
||||
public static boolean isOxygen(Entity entity) {
|
||||
public static boolean isOxygen(LivingEntity entity) {
|
||||
boolean oxygen = true;
|
||||
if (FabricLoader.getInstance().isModLoaded("thinair")) {
|
||||
oxygen &= new AirQualityHelperImpl()
|
||||
|
@ -1,11 +1,8 @@
|
||||
package ru.bitheaven.createairfabric.mixin;
|
||||
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
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;
|
||||
@ -15,11 +12,11 @@ public abstract class DivingHelmetItemMixin {
|
||||
/**
|
||||
* Activate helmet "if in water or lava" -> "if in water or bad air or lava"
|
||||
*/
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;isEyeInFluid(Lnet/minecraft/tags/TagKey;)Z"),
|
||||
@ModifyExpressionValue(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;isEyeInFluid(Lnet/minecraft/tags/TagKey;)Z"),
|
||||
method = "breatheUnderwater(Lnet/minecraft/world/entity/LivingEntity;)V")
|
||||
private static boolean redirectBreatheUnderwater(LivingEntity entity, TagKey<Fluid> fluidTagKey) {
|
||||
private static boolean redirectBreatheUnderwater(boolean original, LivingEntity entity) {
|
||||
boolean oxygen = true;
|
||||
oxygen &= !entity.isEyeInFluid(fluidTagKey);
|
||||
oxygen &= !original;
|
||||
oxygen &= !entity.isUnderWater();
|
||||
oxygen &= CreateAirFabric.isOxygen(entity);
|
||||
|
||||
|
@ -1,43 +1,41 @@
|
||||
package ru.bitheaven.createairfabric.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
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.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.server.level.ServerLevel;
|
||||
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(OxygenApiImpl.class)
|
||||
public abstract class EntityOxygenSystemMixin {
|
||||
/**
|
||||
* Make air exists if Create Air
|
||||
*/
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/adastra/common/items/armor/SpaceSuitItem;hasOxygen(Lnet/minecraft/world/entity/Entity;)Z"),
|
||||
@ModifyExpressionValue(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);
|
||||
private boolean redirectHasOxygen(boolean original, ServerLevel level, LivingEntity entity) {
|
||||
boolean createOxygen = true;
|
||||
createOxygen &= !DivingHelmetItem.getWornItem(livingEntity).isEmpty();
|
||||
createOxygen &= !BacktankUtil.getAllWithAir(livingEntity).isEmpty();
|
||||
return SpaceSuitItem.hasOxygen(livingEntity) || createOxygen;
|
||||
createOxygen &= !DivingHelmetItem.getWornItem(entity).isEmpty();
|
||||
createOxygen &= !BacktankUtil.getAllWithAir(entity).isEmpty();
|
||||
return original || createOxygen;
|
||||
}
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/adastra/common/items/armor/SpaceSuitItem;hasFullSet(Lnet/minecraft/world/entity/LivingEntity;)Z"),
|
||||
@ModifyExpressionValue(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) {
|
||||
private boolean redirectHasFullSet(boolean original, ServerLevel level, 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;
|
||||
return original || createArmor;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,20 @@
|
||||
package ru.bitheaven.createairfabric.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
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.server.level.ServerLevel;
|
||||
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(TemperatureApiImpl.class)
|
||||
public abstract class EntityTemperatureSystemMixin {
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Learth/terrarium/adastra/common/systems/TemperatureApiImpl;burnEntity(Lnet/minecraft/world/entity/LivingEntity;)V"),
|
||||
@ModifyExpressionValue(at = @At(value = "INVOKE", target = "Learth/terrarium/adastra/api/events/AdAstraEvents$HotTemperatureTickEvent;fire(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/LivingEntity;)Z"),
|
||||
method = "entityTick(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/LivingEntity;)V")
|
||||
private void redirectTemperatureTick(TemperatureApiImpl instance, LivingEntity entity) {
|
||||
private boolean redirectTemperatureTick(boolean original, ServerLevel level, LivingEntity entity) {
|
||||
boolean createNetherite = true;
|
||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.HEAD).getItem().isFireResistant();
|
||||
createNetherite &= entity.getItemBySlot(EquipmentSlot.CHEST).getItem().isFireResistant();
|
||||
@ -24,9 +25,6 @@ public abstract class EntityTemperatureSystemMixin {
|
||||
|| entity.getItemBySlot(EquipmentSlot.FEET).getItem() instanceof NetheriteSpaceSuitItem
|
||||
|| entity.getItemBySlot(EquipmentSlot.FEET).getItem().isFireResistant();
|
||||
|
||||
if(!createNetherite) {
|
||||
entity.hurt(entity.damageSources().onFire(), 6);
|
||||
entity.setSecondsOnFire(10);
|
||||
}
|
||||
return original && !createNetherite;
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,11 @@
|
||||
package ru.bitheaven.createairfabric.mixin;
|
||||
|
||||
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
|
||||
import com.simibubi.create.content.equipment.armor.RemainingAirOverlay;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.tags.TagKey;
|
||||
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 ru.bitheaven.createairfabric.CreateAirFabric;
|
||||
|
||||
@Mixin(RemainingAirOverlay.class)
|
||||
@ -14,9 +13,11 @@ public class RemainingAirOverlayMixin {
|
||||
/**
|
||||
* Activate UI "if in water or lava" -> "if in water or bad air or lava"
|
||||
*/
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;isEyeInFluid(Lnet/minecraft/tags/TagKey;)Z"),
|
||||
@ModifyExpressionValue(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;isEyeInFluid(Lnet/minecraft/tags/TagKey;)Z"),
|
||||
method = "render(Lnet/minecraft/client/gui/GuiGraphics;II)V")
|
||||
private static boolean redirectRender(LocalPlayer player, TagKey<Fluid> fluidTagKey) {
|
||||
return player.isEyeInFluid(fluidTagKey) || !CreateAirFabric.isOxygen(player);
|
||||
private static boolean redirectRender(boolean original) {
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
LocalPlayer player = mc.player;
|
||||
return original || !CreateAirFabric.isOxygen(player);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user