更准确地预测炮弹运动

This commit is contained in:
Light_Quanta 2025-04-02 16:47:14 +08:00
parent c12ff91418
commit 082300754c
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
2 changed files with 2 additions and 6 deletions

View file

@ -48,9 +48,6 @@ public abstract class FastThrowableProjectile extends ThrowableItemProjectile im
// 重新应用重力 // 重新应用重力
this.applyGravity(); this.applyGravity();
//
System.out.println(this.getDeltaMovement());
// 同步动量 // 同步动量
this.syncMotion(); this.syncMotion();
} }

View file

@ -17,9 +17,8 @@ public class ChunkLoadTool {
var x = entity.position().x; var x = entity.position().x;
var z = entity.position().z; var z = entity.position().z;
float f = entity.isInWater() ? 0.8F : 0.99F; var nextX = x + entity.getDeltaMovement().x;
var nextX = x + entity.getDeltaMovement().x * f; var nextZ = z + entity.getDeltaMovement().z;
var nextZ = z + entity.getDeltaMovement().z * f;
// 加载当前区块和下一tick会进入的区块 // 加载当前区块和下一tick会进入的区块
var newChunks = new HashSet<Long>(); var newChunks = new HashSet<Long>();