From 22d2b7716e32ae349e8cc015a75e6a3835ce87ae Mon Sep 17 00:00:00 2001 From: XiaoMoMi Date: Mon, 9 Jun 2025 02:44:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=8F=E5=B0=91=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E7=A0=B4=E5=9D=8F=E7=8A=B6=E6=80=81=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bukkit/plugin/user/BukkitServerPlayer.java | 14 ++++++++++---- gradle.properties | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/user/BukkitServerPlayer.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/user/BukkitServerPlayer.java index ca5ac25de..824ff6cdb 100644 --- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/user/BukkitServerPlayer.java +++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/plugin/user/BukkitServerPlayer.java @@ -535,8 +535,10 @@ public class BukkitServerPlayer extends Player { public void abortMiningBlock() { this.swingHandAck = false; this.miningProgress = 0; - if (this.destroyPos != null) { - this.broadcastDestroyProgress(platformPlayer(), this.destroyPos, LocationUtils.toBlockPos(this.destroyPos), -1); + BlockPos pos = this.destroyPos; + if (pos != null && this.isDestroyingCustomBlock) { + // 只纠正自定义方块的 + this.broadcastDestroyProgress(platformPlayer(), pos, LocationUtils.toBlockPos(pos), -1); } } @@ -701,16 +703,20 @@ public class BukkitServerPlayer extends Player { public void setIsDestroyingBlock(boolean is, boolean custom) { this.miningProgress = 0; this.isDestroyingBlock = is; - this.isDestroyingCustomBlock = custom && is; if (is) { this.swingHandAck = true; + this.isDestroyingCustomBlock = custom; } else { this.swingHandAck = false; this.destroyedState = null; if (this.destroyPos != null) { - this.broadcastDestroyProgress(platformPlayer(), this.destroyPos, LocationUtils.toBlockPos(this.destroyPos), -1); + // 只纠正自定义方块的 + if (this.isDestroyingCustomBlock) { + this.broadcastDestroyProgress(platformPlayer(), this.destroyPos, LocationUtils.toBlockPos(this.destroyPos), -1); + } this.destroyPos = null; } + this.isDestroyingCustomBlock = false; } } diff --git a/gradle.properties b/gradle.properties index a295885a1..2d68a579a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -51,7 +51,7 @@ byte_buddy_version=1.17.5 ahocorasick_version=0.6.3 snake_yaml_version=2.4 anti_grief_version=0.17 -nms_helper_version=0.66.17 +nms_helper_version=0.67.1 evalex_version=3.5.0 reactive_streams_version=1.0.4 amazon_awssdk_version=2.31.23