diff --git a/build.gradle b/build.gradle index 03307b7c5..e2c97792c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id "fabric-loom" version "1.4-SNAPSHOT" + id "fabric-loom" version "1.5-SNAPSHOT" id "maven-publish" } diff --git a/gradle.properties b/gradle.properties index e63408bf2..70c35e05b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,8 +5,8 @@ org.gradle.parallel=true # Minecraft/Fabric minecraft_version=1.20.4 yarn_mappings=1.20.4+build.3 -loader_version=0.15.3 -fabric_api_version=0.93.1+1.20.4 +loader_version=0.15.4 +fabric_api_version=0.94.0+1.20.4 # Project Details mod_version=3.0.6 diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java index b07423596..0e2f622f8 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinMinecraftClient.java @@ -60,7 +60,7 @@ public abstract class MixinMinecraftClient { public ClientPlayerEntity player; @Shadow - public int attackCooldown; + protected int attackCooldown; @Shadow @Final diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinItem.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinItem.java index d65d08a55..8e9da51d1 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinItem.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinItem.java @@ -19,6 +19,7 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.item; +import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import de.florianmichael.viafabricplus.protocolhack.ProtocolHack; import net.minecraft.item.CrossbowItem; import net.minecraft.item.Item; @@ -56,12 +57,12 @@ private void dontStackFood(CallbackInfoReturnable cir) { } } - @Redirect(method = {"use", "finishUsing", "getUseAction", "getMaxUseTime"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;isFood()Z")) - private boolean makeFoodInstantConsumable(Item instance) { + @ModifyExpressionValue(method = {"use", "finishUsing", "getUseAction", "getMaxUseTime"}, at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;isFood()Z")) + private boolean makeFoodInstantConsumable(boolean original) { if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.b1_7tob1_7_3)) { return false; } - return instance.isFood(); + return original; } }