From b06d314f2a3045b29e60442ff0116b26b7b8743b Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Thu, 20 Mar 2025 17:12:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0fast=20projectile=E7=9A=84?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=90=8C=E6=AD=A5=E8=AE=BE=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/projectile/FastThrowableProjectile.java | 5 +++++ .../superbwarfare/entity/projectile/WgMissileEntity.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/FastThrowableProjectile.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/FastThrowableProjectile.java index c6c9cfa80..02168dc84 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/FastThrowableProjectile.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/FastThrowableProjectile.java @@ -33,12 +33,17 @@ public abstract class FastThrowableProjectile extends ThrowableItemProjectile im @Override public void syncMotion() { if (this.level().isClientSide) return; + if (!shouldSyncMotion()) return; if (this.tickCount % this.getType().updateInterval() == 0) { ModUtils.PACKET_HANDLER.send(PacketDistributor.ALL.noArg(), new ClientMotionSyncMessage(this)); } } + public boolean shouldSyncMotion() { + return false; + } + @Override public void writeSpawnData(FriendlyByteBuf buffer) { var motion = this.getDeltaMovement(); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/WgMissileEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/WgMissileEntity.java index 5d8b694fe..62e1b1675 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/WgMissileEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/WgMissileEntity.java @@ -196,4 +196,9 @@ public class WgMissileEntity extends FastThrowableProjectile implements GeoEntit public AnimatableInstanceCache getAnimatableInstanceCache() { return this.cache; } + + @Override + public boolean shouldSyncMotion() { + return true; + } }