添加fast projectile的默认同步设定
This commit is contained in:
parent
5933a59d2d
commit
b06d314f2a
2 changed files with 10 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -196,4 +196,9 @@ public class WgMissileEntity extends FastThrowableProjectile implements GeoEntit
|
|||
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSyncMotion() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue