mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-26 02:19:23 +00:00
fix: 不是哥们这原版床都有这个问题
This commit is contained in:
@@ -52,14 +52,13 @@ 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;
|
||||
FastNMS.INSTANCE.method$Entity$setDeltaMovement(
|
||||
entity,
|
||||
FastNMS.INSTANCE.field$Vec3$x(deltaMovement),
|
||||
y,
|
||||
-FastNMS.INSTANCE.field$Vec3$y(deltaMovement) * this.bounceHeight * d,
|
||||
FastNMS.INSTANCE.field$Vec3$z(deltaMovement)
|
||||
);
|
||||
if (this.syncPlayerSelf && y > 0.0315) { // 不知道为什么会抖
|
||||
if (this.syncPlayerSelf) {
|
||||
FastNMS.INSTANCE.field$Entity$hurtMarked(entity, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user