From 1b9572c87872157a476865bfdb9f8065cc281a9c Mon Sep 17 00:00:00 2001 From: 17146 <1714673995@qq.com> Date: Sun, 5 Jan 2025 23:59:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9D=A0=E6=9C=BA=E4=BC=A4?= =?UTF-8?q?=E5=AE=B3=E5=AE=9E=E7=8E=B0=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/vehicle/Ah6Entity.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java index 494d6c38c..6e55f84de 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java @@ -140,13 +140,13 @@ public class Ah6Entity extends ContainerMobileEntity implements GeoEntity, IHeli super.baseTick(); if (this.level() instanceof ServerLevel) { - if (reloadCoolDown > 0){ + if (reloadCoolDown > 0) { reloadCoolDown--; } Player player = (Player) this.getFirstPassenger(); if (player != null) { if ((this.getItemStacks().stream().filter(stack -> stack.is(ModItems.ROCKET_70.get())).mapToInt(ItemStack::getCount).sum() > 0 || player.getInventory().hasAnyMatching(s -> s.is(ModItems.CREATIVE_AMMO_BOX.get()))) && reloadCoolDown == 0 && this.getEntityData().get(LOADED_ROCKET) < 14) { - this.entityData.set(LOADED_ROCKET,this.getEntityData().get(LOADED_ROCKET) + 1); + this.entityData.set(LOADED_ROCKET, this.getEntityData().get(LOADED_ROCKET) + 1); reloadCoolDown = 30; this.getItemStacks().stream().filter(stack -> stack.is(ModItems.ROCKET_70.get())).findFirst().ifPresent(stack -> stack.shrink(1)); this.level().playSound(null, this, ModSounds.MISSILE_RELOAD.get(), this.getSoundSource(), 1, 1); @@ -484,7 +484,7 @@ public class Ah6Entity extends ContainerMobileEntity implements GeoEntity, IHeli heliRocketEntityRight.shoot(this.getLookAngle().x, this.getLookAngle().y + 0.0125, this.getLookAngle().z, 5, 0.25f); player.level().addFreshEntity(heliRocketEntityRight); fireIndex = 1; - } else if (fireIndex == 1){ + } else if (fireIndex == 1) { HeliRocketEntity heliRocketEntityLeft = new HeliRocketEntity(player, player.level(), 140, 40, @@ -519,7 +519,8 @@ public class Ah6Entity extends ContainerMobileEntity implements GeoEntity, IHeli @Override public Vec3 getDismountLocationForPassenger(LivingEntity passenger) { Vec3 vec3d = getDismountOffset(getBbWidth() * Mth.SQRT_OF_TWO, passenger.getBbWidth() * Mth.SQRT_OF_TWO); - double ox = getX() + vec3d.x;; + double ox = getX() + vec3d.x; + ; int i = this.getPassengers().indexOf(passenger); if (i == 0 || i == 2) { ox = getX() - vec3d.x;