From 2eb987ae33ffd4cf8e5b87d8206e35588b6cc5b7 Mon Sep 17 00:00:00 2001 From: Thomas <1688389+Rakambda@users.noreply.github.com> Date: Sat, 29 Jun 2024 11:28:07 +0200 Subject: [PATCH] NeoForge: Fix ToolActions not found (#718) --- gradle/libs.versions.toml | 6 +++--- .../neoforge/common/wrapper/ItemStackWrapper.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 43542e1a..29666b2f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,9 +9,9 @@ log4j2-version = "2.23.1" # Minecraft / Loaders minecraftVersion = "1.21" fabric-loader-version = "0.15.11" -fabric-api-version = "0.100.1+1.21" -forge-version = "1.21-51.0.8" -neoforge-version = "21.0.8-beta" +fabric-api-version = "0.100.4+1.21" +forge-version = "1.21-51.0.18" +neoforge-version = "21.0.42-beta" # Mod dependencies modmenu-version = "11.0.1" diff --git a/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/wrapper/ItemStackWrapper.java b/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/wrapper/ItemStackWrapper.java index 48f1d572..f4e43777 100644 --- a/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/wrapper/ItemStackWrapper.java +++ b/neoforge/src/main/java/fr/rakambda/fallingtree/neoforge/common/wrapper/ItemStackWrapper.java @@ -13,7 +13,7 @@ import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.enchantment.EnchantmentHelper; -import net.neoforged.neoforge.common.ToolActions; +import net.neoforged.neoforge.common.ItemAbilities; import org.jetbrains.annotations.NotNull; import java.util.Optional; @@ -78,6 +78,6 @@ public Optional getBreakModeFromEnchant(){ @Override public boolean canPerformAxeAction(){ - return raw.canPerformAction(ToolActions.AXE_DIG); + return raw.canPerformAction(ItemAbilities.AXE_DIG); } }