Skip to content

Commit

Permalink
Fixes #5 (#6)
Browse files Browse the repository at this point in the history
NeoForge 21.0.40-beta renamed the class. This just fixes that. Ups the minimum neoforge version to 21.0.40-beta

Removed an unused import.
  • Loading branch information
3x1t-5tyl3 authored Jun 28, 2024
1 parent 04e19b5 commit f6da304
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ forge_version_range=[51.0.3,)
forge_loader_version_range=[51,)

# NeoForge
neoforge_version=21.0.0-beta
neoforge_version=21.0.40-beta
neoforge_version_range=[20.6,)
neoforge_loader_version_range=[1,)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
import net.minecraft.world.level.block.state.BlockState;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.common.ToolActions;
import net.neoforged.neoforge.common.ItemAbilities;
import net.neoforged.neoforge.event.level.BlockEvent;

import java.util.function.Predicate;
Expand All @@ -28,7 +27,7 @@ public static void onToolModification(BlockEvent.BlockToolModificationEvent even
{
BlockState originalState = event.getState();

if (event.getToolAction() == ToolActions.HOE_TILL && tillables.containsKey(originalState.getBlock()))
if (event.getItemAbility() == ItemAbilities.HOE_TILL && tillables.containsKey(originalState.getBlock()))
{
for (var tillable : tillables.get(originalState.getBlock()))
{
Expand Down

0 comments on commit f6da304

Please sign in to comment.