From dda1be91eab964eb5f459386b2d955ac4a1df356 Mon Sep 17 00:00:00 2001 From: Take Weiland Date: Tue, 8 Feb 2022 20:28:22 +0100 Subject: [PATCH] Fix HoeItem patch incorrectly applied during migration. (#8384) --- .../minecraft/world/item/HoeItem.java.patch | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/patches/minecraft/net/minecraft/world/item/HoeItem.java.patch b/patches/minecraft/net/minecraft/world/item/HoeItem.java.patch index 7e7bf03829..2181e6edb4 100644 --- a/patches/minecraft/net/minecraft/world/item/HoeItem.java.patch +++ b/patches/minecraft/net/minecraft/world/item/HoeItem.java.patch @@ -1,25 +1,14 @@ --- a/net/minecraft/world/item/HoeItem.java +++ b/net/minecraft/world/item/HoeItem.java -@@ -33,6 +_,9 @@ +@@ -30,6 +_,8 @@ + } + + public InteractionResult m_6225_(UseOnContext p_41341_) { ++ int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(p_41341_); ++ if (hook != 0) return hook > 0 ? InteractionResult.SUCCESS : InteractionResult.FAIL; Level level = p_41341_.m_43725_(); BlockPos blockpos = p_41341_.m_8083_(); Pair, Consumer> pair = f_41332_.get(level.m_8055_(blockpos).m_60734_()); -+ int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(p_41341_); -+ if (hook != 0) return hook > 0 ? InteractionResult.SUCCESS : InteractionResult.FAIL; -+ if (p_41341_.m_43719_() != Direction.DOWN && level.m_46859_(blockpos.m_7494_())) { - if (pair == null) { - return InteractionResult.PASS; - } else { -@@ -55,6 +_,9 @@ - return InteractionResult.PASS; - } - } -+ } -+ -+ return InteractionResult.PASS; - } - - public static Consumer m_150858_(BlockState p_150859_) { @@ -72,5 +_,10 @@ public static boolean m_150856_(UseOnContext p_150857_) {