From dd5749758da20564e86a23d186df5e534ecf562b Mon Sep 17 00:00:00 2001 From: jhqwqmc <2110242767@qq.com> Date: Wed, 10 Sep 2025 11:23:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E5=BC=B9=E8=B7=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bukkit/block/behavior/BouncingBlockBehavior.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/behavior/BouncingBlockBehavior.java b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/behavior/BouncingBlockBehavior.java index d94e9f95a..08ba200ba 100644 --- a/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/behavior/BouncingBlockBehavior.java +++ b/bukkit/src/main/java/net/momirealms/craftengine/bukkit/block/behavior/BouncingBlockBehavior.java @@ -52,13 +52,15 @@ public class BouncingBlockBehavior extends BukkitBlockBehavior { Object deltaMovement = FastNMS.INSTANCE.method$Entity$getDeltaMovement(entity); if (FastNMS.INSTANCE.field$Vec3$y(deltaMovement) < 0.0) { double d = CoreReflections.clazz$LivingEntity.isInstance(entity) ? 1.0 : 0.8; + double y = -FastNMS.INSTANCE.field$Vec3$y(deltaMovement) * this.bounceHeight * d; + System.out.println("deltaMovement=" + deltaMovement + ", d=" + d + ", y=" + y); FastNMS.INSTANCE.method$Entity$setDeltaMovement( entity, FastNMS.INSTANCE.field$Vec3$x(deltaMovement), - -FastNMS.INSTANCE.field$Vec3$y(deltaMovement) * this.bounceHeight * d, + y, FastNMS.INSTANCE.field$Vec3$z(deltaMovement) ); - if (this.syncPlayerSelf) { + if (this.syncPlayerSelf && y > 0.06271) { // 不知道为什么会抖 FastNMS.INSTANCE.field$Entity$hurtMarked(entity, true); } }