From 3e2a0ede2fd2d6ed3c2b248bdb1c71fa44706b3f Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Fri, 17 Jan 2025 21:26:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E4=BA=BA=E6=9C=BA=E4=BC=9A=E5=9C=A8?= =?UTF-8?q?=E6=93=8D=E6=8E=A7=E7=9D=80=E4=B8=BB=E6=89=8B=E4=B8=8D=E6=98=AF?= =?UTF-8?q?=E9=81=A5=E6=8E=A7=E5=99=A8=E7=9A=84=E6=97=B6=E5=80=99=E5=81=9C?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/DroneEntity.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java index 7a5b8b408..f0dc2821d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java @@ -174,11 +174,21 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity { Player controller = EntityFindUtil.findPlayer(this.level(), this.entityData.get(CONTROLLER)); + if (!this.onGround()) { if (controller != null) { ItemStack stack = controller.getMainHandItem(); - if (stack.getOrCreateTag().getBoolean("Using") && controller.level().isClientSide) { - controller.playSound(ModSounds.DRONE_SOUND.get(), 32, 1); + if (stack.is(ModItems.MONITOR.get())) { + if (stack.getOrCreateTag().getBoolean("Using") && controller.level().isClientSide) { + controller.playSound(ModSounds.DRONE_SOUND.get(), 32, 1); + } + } else { + upInputDown = false; + downInputDown = false; + forwardInputDown = false; + backInputDown = false; + leftInputDown = false; + rightInputDown = false; } if (!controller.level().isClientSide) { this.level().playSound(null, this.getOnPos(), ModSounds.DRONE_SOUND.get(), SoundSource.AMBIENT, 3, 1);