This commit is contained in:
GaLicn 2025-09-06 15:25:00 +08:00
parent 9c8756ca59
commit f83c6ff51e

View File

@ -25,7 +25,8 @@ public final class WrenchHook {
@SubscribeEvent
public static void onPlayerUseBlockEvent(PlayerInteractEvent.RightClickBlock event) {
if (event.getUseBlock() == Event.Result.DENY) {
// 1.21 NeoForge: 避免依赖 Event.Result使用 isCanceled() 进行早退检查
if (event.isCanceled()) {
return;
}
var player = event.getEntity();