From 566554d13e4b7846caddad6718577de8deaa90d6 Mon Sep 17 00:00:00 2001 From: BlayTheNinth <1933180+BlayTheNinth@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:57:16 +0200 Subject: [PATCH] fix: Update to Breaking Changes in NeoForge 21.0.40 --- gradle.properties | 4 ++-- .../java/net/blay09/mods/balm/neoforge/NeoForgeBalmHooks.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 837ff4b3..afe892b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,8 +32,8 @@ forge_loader_version_range = [51,) # NeoForge neoforge_snapshot_url= -neoforge_version = 21.0.31-beta -neoforge_version_range = [21.0.31-beta,) +neoforge_version = 21.0.40-beta +neoforge_version_range = [21.0.40-beta,) neoforge_loader_version_range = [1,) # Fabric diff --git a/neoforge/src/main/java/net/blay09/mods/balm/neoforge/NeoForgeBalmHooks.java b/neoforge/src/main/java/net/blay09/mods/balm/neoforge/NeoForgeBalmHooks.java index 785502fe..6bf3bcd9 100644 --- a/neoforge/src/main/java/net/blay09/mods/balm/neoforge/NeoForgeBalmHooks.java +++ b/neoforge/src/main/java/net/blay09/mods/balm/neoforge/NeoForgeBalmHooks.java @@ -23,7 +23,7 @@ import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.phys.BlockHitResult; import net.neoforged.neoforge.common.EffectCures; -import net.neoforged.neoforge.common.ToolActions; +import net.neoforged.neoforge.common.ItemAbilities; import net.neoforged.neoforge.common.util.FakePlayer; import net.neoforged.neoforge.event.EventHooks; import net.neoforged.neoforge.fluids.FluidUtil; @@ -112,7 +112,7 @@ public boolean useFluidTank(BlockState state, Level level, BlockPos pos, Player @Override public boolean isShield(ItemStack itemStack) { - return itemStack.getItem().canPerformAction(itemStack, ToolActions.SHIELD_BLOCK); + return itemStack.getItem().canPerformAction(itemStack, ItemAbilities.SHIELD_BLOCK); } @Override