From ed146f441d252f61b32cdaf7994f20044b0707e5 Mon Sep 17 00:00:00 2001 From: BitHeaven Date: Tue, 21 Jan 2025 02:45:24 +0500 Subject: [PATCH] Test --- .../bitheaven/createairfabric/mixin/DivingHelmetItemMixin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/bitheaven/createairfabric/mixin/DivingHelmetItemMixin.java b/src/main/java/ru/bitheaven/createairfabric/mixin/DivingHelmetItemMixin.java index 94b34fd..ed0f04b 100644 --- a/src/main/java/ru/bitheaven/createairfabric/mixin/DivingHelmetItemMixin.java +++ b/src/main/java/ru/bitheaven/createairfabric/mixin/DivingHelmetItemMixin.java @@ -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; @@ -14,7 +15,7 @@ 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 fluidTagKey) { boolean oxygen = true;