diff --git a/src/main/java/com/atsuishio/superbwarfare/client/overlay/HelicopterHudOverlay.java b/src/main/java/com/atsuishio/superbwarfare/client/overlay/HelicopterHudOverlay.java index b8d477d42..6f61cd890 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/overlay/HelicopterHudOverlay.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/overlay/HelicopterHudOverlay.java @@ -7,7 +7,6 @@ import com.atsuishio.superbwarfare.entity.MobileVehicleEntity; import com.atsuishio.superbwarfare.entity.VehicleEntity; import com.atsuishio.superbwarfare.event.ClientEventHandler; import com.atsuishio.superbwarfare.network.ModVariables; -import com.atsuishio.superbwarfare.tools.HudUtil; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; @@ -58,7 +57,7 @@ public class HelicopterHudOverlay { if (player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).edit) return; - if (player.getVehicle() instanceof IHelicopterEntity iHelicopterEntity && player.getVehicle() instanceof MobileVehicleEntity mobileVehicle && iHelicopterEntity.isDriver(player) && Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) { + if (player.getVehicle() instanceof IHelicopterEntity iHelicopterEntity && player.getVehicle() instanceof MobileVehicleEntity mobileVehicle && iHelicopterEntity.isDriver(player)) { poseStack.pushPose(); RenderSystem.disableDepthTest(); @@ -75,46 +74,49 @@ public class HelicopterHudOverlay { float j = Mth.floor(f * f1); float k = ((w - i) / 2); float l = ((h - j) / 2); - preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_base.png"), k, l, 0, 0.0F, i, j, i, j); - poseStack.pushPose(); - poseStack.rotateAround(Axis.ZP.rotationDegrees(-iHelicopterEntity.getRotZ(event.getPartialTick())), w / 2f, h / 2f, 0); - float pitch = iHelicopterEntity.getRotX(event.getPartialTick()); + if (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) { + preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_base.png"), k, l, 0, 0.0F, i, j, i, j); - preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_line.png"), (float) w / 2 - 128, (float) h / 2 - 512 - 5.475f * pitch, 0, 0, 256, 1024, 256, 1024); - poseStack.popPose(); - poseStack.pushPose(); - poseStack.rotateAround(Axis.ZP.rotationDegrees(-iHelicopterEntity.getRotZ(event.getPartialTick())), w / 2f, h / 2f - 56, 0); - preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/roll_ind.png"), (float) w / 2 - 8, (float) h / 2 - 88, 0, 0, 16, 16, 16, 16); - poseStack.popPose(); + poseStack.pushPose(); + poseStack.rotateAround(Axis.ZP.rotationDegrees(-iHelicopterEntity.getRotZ(event.getPartialTick())), w / 2f, h / 2f, 0); + float pitch = iHelicopterEntity.getRotX(event.getPartialTick()); - guiGraphics.blit(ModUtils.loc("textures/screens/helicopter/heli_power_ruler.png"), w / 2 + 100, h / 2 - 64, 0, 0, 64, 128, 64, 128); + preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_line.png"), (float) w / 2 - 128, (float) h / 2 - 512 - 5.475f * pitch, 0, 0, 256, 1024, 256, 1024); + poseStack.popPose(); + poseStack.pushPose(); + poseStack.rotateAround(Axis.ZP.rotationDegrees(-iHelicopterEntity.getRotZ(event.getPartialTick())), w / 2f, h / 2f - 56, 0); + preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/roll_ind.png"), (float) w / 2 - 8, (float) h / 2 - 88, 0, 0, 16, 16, 16, 16); + poseStack.popPose(); - double height = mobileVehicle.position().distanceTo((Vec3.atLowerCornerOf(mobileVehicle.level().clip(new ClipContext(mobileVehicle.position(), mobileVehicle.position().add(new Vec3(0, -1, 0).scale(100)), - ClipContext.Block.OUTLINE, ClipContext.Fluid.ANY, mobileVehicle)).getBlockPos()))); - double blockInWay = mobileVehicle.position().distanceTo((Vec3.atLowerCornerOf(mobileVehicle.level().clip(new ClipContext(mobileVehicle.position(), mobileVehicle.position().add(new Vec3(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z).normalize().scale(100)), - ClipContext.Block.OUTLINE, ClipContext.Fluid.ANY, mobileVehicle)).getBlockPos()))); + guiGraphics.blit(ModUtils.loc("textures/screens/helicopter/heli_power_ruler.png"), w / 2 + 100, h / 2 - 64, 0, 0, 64, 128, 64, 128); - float power = iHelicopterEntity.getPower(); - lerpPower = Mth.lerp(0.001f * event.getPartialTick(), lerpPower, power); - preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_power.png"), (float) w / 2 + 130f, ((float) h / 2 - 64 + 124 - power * 980), 0, 0, 4, power * 980, 4, power * 980); - lerpVy = (float) Mth.lerp(0.021f * event.getPartialTick(), lerpVy, mobileVehicle.getDeltaMovement().y() + 0.06f); - preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_vy_move.png"), (float) w / 2 + 138, ((float) h / 2 - 3 - Math.max(lerpVy * 20, -24) * 2.5f), 0, 0, 8, 8, 8, 8); - guiGraphics.drawString(Minecraft.getInstance().font, Component.literal(new DecimalFormat("##").format(lerpVy * 20) + "m/s"), - w / 2 + 146, (int) (h / 2 - 3 - Math.max(lerpVy * 20, -24) * 2.5), (((lerpVy < -20 || lerpVy * 20 < -5 || (lerpVy * 20 < -1 && length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72 > 100)) && height < 36) || (length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72 > 40 && blockInWay < 72) ? -65536 : 0x66FF00), false); - guiGraphics.drawString(Minecraft.getInstance().font, Component.literal(new DecimalFormat("##").format(mobileVehicle.getY())), - w / 2 + 104, h / 2, 0x66FF00, false); - preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/speed_frame.png"), (float) w / 2 - 144, (float) h / 2 - 6, 0, 0, 50, 18, 50, 18); - guiGraphics.drawString(Minecraft.getInstance().font, Component.literal(new DecimalFormat("##").format(length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72) + "KM/H"), - w / 2 - 140, h / 2, 0x66FF00, false); + double height = mobileVehicle.position().distanceTo((Vec3.atLowerCornerOf(mobileVehicle.level().clip(new ClipContext(mobileVehicle.position(), mobileVehicle.position().add(new Vec3(0, -1, 0).scale(100)), + ClipContext.Block.OUTLINE, ClipContext.Fluid.ANY, mobileVehicle)).getBlockPos()))); + double blockInWay = mobileVehicle.position().distanceTo((Vec3.atLowerCornerOf(mobileVehicle.level().clip(new ClipContext(mobileVehicle.position(), mobileVehicle.position().add(new Vec3(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z).normalize().scale(100)), + ClipContext.Block.OUTLINE, ClipContext.Fluid.ANY, mobileVehicle)).getBlockPos()))); - if (lerpVy * 20 < -20) { - guiGraphics.drawString(Minecraft.getInstance().font, Component.literal("SINK RATE,PULL UP!"), - w / 2 - 53, h / 2 + 24, -65536, false); - } else if (((lerpVy * 20 < -5 || (lerpVy * 20 < -1 && length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72 > 100)) && height < 36) - || (length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72 > 40 && blockInWay < 72)) { - guiGraphics.drawString(Minecraft.getInstance().font, Component.literal("TERRAIN TERRAIN"), - w / 2 - 42, h / 2 + 24, -65536, false); + float power = iHelicopterEntity.getPower(); + lerpPower = Mth.lerp(0.001f * event.getPartialTick(), lerpPower, power); + preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_power.png"), (float) w / 2 + 130f, ((float) h / 2 - 64 + 124 - power * 980), 0, 0, 4, power * 980, 4, power * 980); + lerpVy = (float) Mth.lerp(0.021f * event.getPartialTick(), lerpVy, mobileVehicle.getDeltaMovement().y() + 0.06f); + preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/heli_vy_move.png"), (float) w / 2 + 138, ((float) h / 2 - 3 - Math.max(lerpVy * 20, -24) * 2.5f), 0, 0, 8, 8, 8, 8); + guiGraphics.drawString(Minecraft.getInstance().font, Component.literal(new DecimalFormat("##").format(lerpVy * 20) + "m/s"), + w / 2 + 146, (int) (h / 2 - 3 - Math.max(lerpVy * 20, -24) * 2.5), (((lerpVy < -20 || lerpVy * 20 < -5 || (lerpVy * 20 < -1 && length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72 > 100)) && height < 36) || (length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72 > 40 && blockInWay < 72) ? -65536 : 0x66FF00), false); + guiGraphics.drawString(Minecraft.getInstance().font, Component.literal(new DecimalFormat("##").format(mobileVehicle.getY())), + w / 2 + 104, h / 2, 0x66FF00, false); + preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/speed_frame.png"), (float) w / 2 - 144, (float) h / 2 - 6, 0, 0, 50, 18, 50, 18); + guiGraphics.drawString(Minecraft.getInstance().font, Component.literal(new DecimalFormat("##").format(length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72) + "KM/H"), + w / 2 - 140, h / 2, 0x66FF00, false); + + if (lerpVy * 20 < -20) { + guiGraphics.drawString(Minecraft.getInstance().font, Component.literal("SINK RATE,PULL UP!"), + w / 2 - 53, h / 2 + 24, -65536, false); + } else if (((lerpVy * 20 < -5 || (lerpVy * 20 < -1 && length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72 > 100)) && height < 36) + || (length(mobileVehicle.getDeltaMovement().x, mobileVehicle.getDeltaMovement().y + 0.06, mobileVehicle.getDeltaMovement().z) * 72 > 40 && blockInWay < 72)) { + guiGraphics.drawString(Minecraft.getInstance().font, Component.literal("TERRAIN TERRAIN"), + w / 2 - 42, h / 2 + 24, -65536, false); + } } Matrix4f transform = getVehicleTransform(mobileVehicle); @@ -133,11 +135,21 @@ public class HelicopterHudOverlay { var cPos = cameraPos.add(lookAngle); Vec3 p = RenderHelper.worldToScreen(new Vec3(worldPosition.x, worldPosition.y, worldPosition.z).add(mobileVehicle.getViewVector(event.getPartialTick()).scale(500)), ClientEventHandler.zoom ? cPos : cameraPos); - if (p != null) { + + Vec3 p3 = RenderHelper.worldToScreen(new Vec3(worldPosition.x, worldPosition.y, worldPosition.z).add(mobileVehicle.getViewVector(event.getPartialTick()).scale(500)), cameraPos); + if (p != null && p3 != null) { poseStack.pushPose(); - int x = (int) p.x; - int y = (int) p.y; - HudUtil.blit(poseStack, ModUtils.loc("textures/screens/helicopter/crosshair_ind.png"), x - 8, y - 8, 0, 0, 16, 16, 16, 16, 0x66FF00); + float x = (float) p.x; + float y = (float) p.y; + + float x3 = (float) p3.x; + float y3 = (float) p3.y; + if (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) { + preciseBlit(guiGraphics, ModUtils.loc("textures/screens/helicopter/crosshair_ind.png"), x - 8, y - 8, 0, 0, 16, 16, 16, 16); + } else if (Minecraft.getInstance().options.getCameraType() == CameraType.THIRD_PERSON_BACK) { + preciseBlit(guiGraphics, ModUtils.loc("textures/screens/drone.png"), x3 - 8, y3 - 8, 0, 0, 16, 16, 16, 16); + } + poseStack.popPose(); } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/Ah6Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/Ah6Entity.java index be9cb9c6c..472b5579f 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/Ah6Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/Ah6Entity.java @@ -6,6 +6,7 @@ import com.atsuishio.superbwarfare.entity.projectile.GunGrenadeEntity; import com.atsuishio.superbwarfare.entity.projectile.ProjectileEntity; import com.atsuishio.superbwarfare.init.ModDamageTypes; import com.atsuishio.superbwarfare.init.ModEntities; +import com.atsuishio.superbwarfare.init.ModParticleTypes; import com.atsuishio.superbwarfare.init.ModSounds; import com.atsuishio.superbwarfare.network.message.ShakeClientMessage; import com.atsuishio.superbwarfare.tools.CustomExplosion; @@ -13,6 +14,7 @@ import com.atsuishio.superbwarfare.tools.EntityFindUtil; import com.atsuishio.superbwarfare.tools.ParticleTool; import com.google.common.collect.Lists; import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientGamePacketListener; @@ -52,10 +54,12 @@ import software.bernie.geckolib.util.GeckoLibUtil; import java.util.ArrayList; import java.util.Comparator; +import static com.atsuishio.superbwarfare.tools.ParticleTool.sendParticle; + public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelicopterEntity, MultiWeaponVehicleEntity { private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); - public static final float MAX_HEALTH = 200; + public static final float MAX_HEALTH = 300; public static final int MAX_ENERGY = 4000000; public static final EntityDataAccessor DELTA_ROT = SynchedEntityData.defineId(Ah6Entity.class, EntityDataSerializers.FLOAT); public static final EntityDataAccessor PROPELLER_ROT = SynchedEntityData.defineId(Ah6Entity.class, EntityDataSerializers.FLOAT); @@ -65,6 +69,8 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico public float propellerRot; public float propellerRotO; + public double velocity; + public int fireIndex; public Ah6Entity(PlayMessages.SpawnEntity packet, Level world) { @@ -102,8 +108,24 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico @Override public boolean hurt(DamageSource source, float amount) { super.hurt(source, amount); + if (this.level() instanceof ServerLevel serverLevel) { + sendParticle(serverLevel, ModParticleTypes.FIRE_STAR.get(), this.getX(), this.getY() + 2.5, this.getZ(), 4, 0.2, 0.2, 0.2, 0.2, false); + } + if (source.is(ModDamageTypes.PROJECTILE_BOOM)) { + amount *= 2f; + } + if (source.is(ModDamageTypes.CANNON_FIRE)) { + amount *= 3f; + } + if (source.is(ModDamageTypes.GUN_FIRE)) { + amount *= 0.3f; + } + if (source.is(ModDamageTypes.GUN_FIRE_ABSOLUTE)) { + amount *= 0.7f; + } this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1); - this.hurt(amount); + this.hurt(0.75f * Math.max(amount - 5, 0)); + return true; } @@ -115,14 +137,19 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico this.setDeltaMovement(this.getDeltaMovement().add(0.0, -0.06, 0.0)); if (this.onGround()) { - this.setDeltaMovement(this.getDeltaMovement().multiply(0.6, 0.95, 0.6)); + this.setDeltaMovement(this.getDeltaMovement().multiply(0.8, 0.95, 0.8)); this.setZRot(this.roll * 0.9f); this.setXRot(this.getXRot() * 0.9f); } else { float f = (float) Mth.clamp(0.945f + 0.02f * Mth.abs(90 - (float) calculateAngle(this.getDeltaMovement(), this.getViewVector(1))) / 90, 0.01, 0.99); - this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).scale((this.getXRot() < 0 ? -0.032 : 0.032) * this.getDeltaMovement().length()))); + this.setDeltaMovement(this.getDeltaMovement().add(this.getViewVector(1).scale((this.getXRot() < 0 ? -0.032 : (this.getXRot() > 0 ? 0.032 : 0)) * this.getDeltaMovement().length()))); this.setDeltaMovement(this.getDeltaMovement().multiply(f, 0.95, f)); } + + if (this.isInWater() && this.tickCount %4 == 0) { + this.setDeltaMovement(this.getDeltaMovement().multiply(0.6, 0.6, 0.6)); + this.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), this, this.getFirstPassenger() == null ? this : this.getFirstPassenger()), 26 + (float) (60 * ((lastTickSpeed - 0.4) * (lastTickSpeed - 0.4)))); + } this.refreshDimensions(); } @@ -237,16 +264,7 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico entity.setYBodyRot(this.getYRot()); float f2 = Mth.wrapDegrees(entity.getYRot() - this.getYRot()); - - int i = this.getPassengers().indexOf(entity); - float f3 = Mth.clamp(f2, -80.0F, 80.0F); - if (i == 2) { - f3 = Mth.clamp(f2, -160.0F, -20.0F); - } - if (i == 3) { - f3 = Mth.clamp(f2, 20.0F, 160.0F); - } entity.yRotO += f3 - f2; entity.setYRot(entity.getYRot() + f3 - f2); entity.setYBodyRot(this.getYRot()); @@ -271,47 +289,33 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico float z = 1f; y += (float) passenger.getMyRidingOffset(); - Vector4f worldPosition; - int i = this.getPassengers().indexOf(passenger); if (i == 0) { - worldPosition = transformPosition(transform, x, y, z); + Vector4f worldPosition = transformPosition(transform, x, y, z); passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z); callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z); } else if (i == 1) { - worldPosition = transformPosition(transform, -x, y, z); - passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z); - callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z); - } else if (i == 2) { - worldPosition = transformPosition(transform, x + 1.05f, y - 0.4f, z - 0.8f); - passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z); - callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z); - } else { - worldPosition = transformPosition(transform, -x - 1.05f, y - 0.4f, z - 0.8f); + Vector4f worldPosition = transformPosition(transform, -x, y, z); passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z); callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z); } - if (passenger != this.getFirstPassenger()){ - passenger.setYRot(passenger.getYRot() + (getYRot() - yRotO)); - passenger.setYHeadRot(passenger.getYHeadRot() + (getYRot() - yRotO)); passenger.setXRot(passenger.getXRot() + (getXRot() - xRotO)); } - callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z); copyEntityData(passenger); } public void copyEntityData(Entity entity) { - entity.setYBodyRot(getYRot()); float f = Mth.wrapDegrees(entity.getYRot() - getYRot()); float g = Mth.clamp(f, -105.0f, 105.0f); entity.yRotO += g - f; entity.setYRot(entity.getYRot() + g - f); entity.setYHeadRot(entity.getYRot()); + entity.setYBodyRot(getYRot()); } @Override @@ -320,7 +324,7 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico } public int getMaxPassengers() { - return 4; + return 2; } @Override @@ -328,12 +332,12 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico if (level() instanceof ServerLevel) { Entity attacker = EntityFindUtil.findEntity(this.level(), this.entityData.get(LAST_ATTACKER_UUID)); CustomExplosion explosion = new CustomExplosion(this.level(), attacker == null ? this : attacker, - ModDamageTypes.causeCustomExplosionDamage(this.level().registryAccess(), attacker == null ? this : attacker, attacker == null ? this : attacker), 25.0f, + ModDamageTypes.causeCustomExplosionDamage(this.level().registryAccess(), attacker == null ? this : attacker, attacker == null ? this : attacker), 300.0f, this.getX(), this.getY(), this.getZ(), 5f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); explosion.explode(); ForgeEventFactory.onExplosionStart(this.level(), explosion); explosion.finalizeExplosion(false); - ParticleTool.spawnMediumExplosionParticles(this.level(), this.position()); + ParticleTool.spawnHugeExplosionParticles(this.level(), this.position()); this.discard(); } } @@ -388,6 +392,7 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico projectileRight.shoot(player, this.getLookAngle().x, this.getLookAngle().y+ 0.03, this.getLookAngle().z, 20, (float) 0.2); this.level().addFreshEntity(projectileRight); + ParticleTool.sendParticle((ServerLevel) this.level(), ParticleTypes.LARGE_SMOKE, worldPositionRight.x, worldPositionRight.y, worldPositionRight.z, 1, 0, 0, 0, 0, false); ProjectileEntity projectileLeft = new ProjectileEntity(player.level()) .shooter(player) @@ -401,6 +406,7 @@ public class Ah6Entity extends MobileVehicleEntity implements GeoEntity, IHelico projectileLeft.shoot(player, this.getLookAngle().x, this.getLookAngle().y + 0.03, this.getLookAngle().z, 20, (float) 0.2); this.level().addFreshEntity(projectileLeft); + ParticleTool.sendParticle((ServerLevel) this.level(), ParticleTypes.LARGE_SMOKE, worldPositionLeft.x, worldPositionLeft.y, worldPositionLeft.z, 1, 0, 0, 0, 0, false); if (!player.level().isClientSide) { if (player instanceof ServerPlayer serverPlayer) { diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/AnnihilatorEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/AnnihilatorEntity.java index 062e29252..c6e337a4d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/AnnihilatorEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/AnnihilatorEntity.java @@ -184,9 +184,6 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity, if (this.tickCount % 15 == 0) { this.level().playSound(null, this.getOnPos(), SoundEvents.FIRE_AMBIENT, SoundSource.PLAYERS, 1, 1); } - this.hurt(0.1f); - } else { - this.heal(0.05f); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java index 75b05a476..4c8e694f4 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java @@ -237,7 +237,7 @@ public class DroneEntity extends LivingEntity implements GeoEntity { } if (this.isInWater()) { - this.hurt(new DamageSource(level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.EXPLOSION), Objects.requireNonNullElse(controller, this)), 0.25f + (float) (2 * lastTickSpeed)); + this.hurt(new DamageSource(level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.EXPLOSION), controller), 0.25f + (float) (2 * lastTickSpeed)); } if (this.fire) { diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/Mk42Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/Mk42Entity.java index 1e39fb4c9..ab793083d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/Mk42Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/Mk42Entity.java @@ -167,9 +167,6 @@ public class Mk42Entity extends VehicleEntity implements GeoEntity, ICannonEntit if (this.tickCount % 15 == 0) { this.level().playSound(null, this.getOnPos(), SoundEvents.FIRE_AMBIENT, SoundSource.PLAYERS, 1, 1); } - this.hurt(0.1f); - } else { - this.heal(0.05f); } this.refreshDimensions(); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/Mle1934Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/Mle1934Entity.java index 2f64bf3b1..109170c1e 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/Mle1934Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/Mle1934Entity.java @@ -182,9 +182,6 @@ public class Mle1934Entity extends VehicleEntity implements GeoEntity, ICannonEn if (this.tickCount % 15 == 0) { this.level().playSound(null, this.getOnPos(), SoundEvents.FIRE_AMBIENT, SoundSource.PLAYERS, 1, 1); } - this.hurt(0.1f); - } else { - this.heal(0.05f); } this.refreshDimensions(); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/MobileVehicleEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/MobileVehicleEntity.java index ffef238b5..ba72dd35d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/MobileVehicleEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/MobileVehicleEntity.java @@ -4,6 +4,7 @@ import com.atsuishio.superbwarfare.entity.projectile.LaserEntity; import com.atsuishio.superbwarfare.entity.projectile.ProjectileEntity; import com.atsuishio.superbwarfare.init.ModDamageTypes; import com.atsuishio.superbwarfare.init.ModSounds; +import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; @@ -20,6 +21,7 @@ import net.minecraft.world.entity.projectile.Projectile; import net.minecraft.world.level.Level; import net.minecraft.world.level.entity.EntityTypeTest; import net.minecraft.world.phys.Vec3; +import org.jetbrains.annotations.NotNull; import org.joml.Math; import org.joml.Vector3f; @@ -33,6 +35,8 @@ public class MobileVehicleEntity extends EnergyVehicleEntity { public boolean backInputDown; public boolean upInputDown; public boolean downInputDown; + public double lastTickSpeed; + public int collisionCoolDown; public MobileVehicleEntity(EntityType pEntityType, Level pLevel) { super(pEntityType, pLevel); @@ -52,12 +56,58 @@ public class MobileVehicleEntity extends EnergyVehicleEntity { @Override public void baseTick() { + lastTickSpeed = new Vec3(this.getDeltaMovement().x, this.getDeltaMovement().y + 0.06, this.getDeltaMovement().z).length(); + if (collisionCoolDown > 0) { + collisionCoolDown--; + } super.baseTick(); crushEntities(this.getDeltaMovement()); this.move(MoverType.SELF, this.getDeltaMovement()); this.refreshDimensions(); } + @Override + public void move(@NotNull MoverType movementType, @NotNull Vec3 movement) { + super.move(movementType, movement); + if (lastTickSpeed < 0.4 || collisionCoolDown > 0) return; + + if (horizontalCollision || verticalCollision) { + collisionCoolDown = 4; + } + + if ((horizontalCollision)) { + this.bounceHorizontal(Direction.getNearest(this.getDeltaMovement().x(), this.getDeltaMovement().y(), this.getDeltaMovement().z()).getOpposite()); + this.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), this, this.getFirstPassenger() == null ? this : this.getFirstPassenger()), (float) (160 * ((lastTickSpeed - 0.4) * (lastTickSpeed - 0.4)))); + if (!this.level().isClientSide) { + this.level().playSound(null, this, ModSounds.VEHICLE_STRIKE.get(), this.getSoundSource(), 1, 1); + } + } + + if ((verticalCollision)) { + this.bounceVertical(Direction.getNearest(this.getDeltaMovement().x(), this.getDeltaMovement().y(), this.getDeltaMovement().z()).getOpposite()); + this.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), this, this.getFirstPassenger() == null ? this : this.getFirstPassenger()), (float) (100 * ((lastTickSpeed - 0.4) * (lastTickSpeed - 0.4)))); + if (!this.level().isClientSide) { + this.level().playSound(null, this, ModSounds.VEHICLE_STRIKE.get(), this.getSoundSource(), 1, 1); + } + } + } + + private void bounceHorizontal(Direction direction) { + switch (direction.getAxis()) { + case X: + this.setDeltaMovement(this.getDeltaMovement().multiply(-0.8, 0.99, 0.99)); + break; + case Z: + this.setDeltaMovement(this.getDeltaMovement().multiply(0.99, 0.99, -0.8)); + break; + } + } + private void bounceVertical(Direction direction) { + if (direction.getAxis() == Direction.Axis.Y) { + this.setDeltaMovement(this.getDeltaMovement().multiply(0.9, -0.8, 0.9)); + } + } + /** * 撞击实体并造成伤害 * @param velocity 动量 @@ -80,7 +130,7 @@ public class MobileVehicleEntity extends EnergyVehicleEntity { double f = Math.min(entitySize / thisSize, 2); double f1 = Math.min(thisSize / entitySize, 4); - if (velocity.horizontalDistance() > 0.4) { + if (velocity.length() > 0.4) { if (!this.level().isClientSide) { this.level().playSound(null, this, ModSounds.VEHICLE_STRIKE.get(), this.getSoundSource(), 1, 1); } @@ -88,7 +138,10 @@ public class MobileVehicleEntity extends EnergyVehicleEntity { this.push(-f * velAdd.x, -f * velAdd.y, -f * velAdd.z); } entity.push(f1 * velAdd.x, f1 * velAdd.y, f1 * velAdd.z); - entity.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), this, this.getFirstPassenger() == null ? this : this.getFirstPassenger()), (float) (thisSize * 40 * (velocity.horizontalDistance() - 0.4))); + entity.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), this, this.getFirstPassenger() == null ? this : this.getFirstPassenger()), (float) (thisSize * 10 * ((velocity.length() - 0.4) * (velocity.length() - 0.4)))); + if (entities instanceof VehicleEntity) { + this.hurt(ModDamageTypes.causeVehicleStrikeDamage(this.level().registryAccess(), entity, entity.getFirstPassenger() == null ? entity : entity.getFirstPassenger()), (float) (entitySize * 10 * ((velocity.length() - 0.4) * (velocity.length() - 0.4)))); + } } else { entity.push(0.2 * f1 * velAdd.x, 0.2 * f1 * velAdd.y, 0.2 * f1 * velAdd.z); } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/SpeedboatEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/SpeedboatEntity.java index 50f150c54..1369b5c90 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/SpeedboatEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/SpeedboatEntity.java @@ -232,7 +232,6 @@ public class SpeedboatEntity extends MobileVehicleEntity implements GeoEntity, I this.setDeltaMovement(this.getDeltaMovement().multiply(f, 0.85, f)); } - this.heal(0.05f); if (this.level() instanceof ServerLevel serverLevel && this.isInWater() && this.getDeltaMovement().length() > 0.1) { sendParticle(serverLevel, ParticleTypes.CLOUD, this.getX() + 0.5 * this.getDeltaMovement().x, this.getY() + getSubmergedHeight(this) - 0.2, this.getZ() + 0.5 * this.getDeltaMovement().z, (int) (2 + 4 * this.getDeltaMovement().length()), 0.65, 0, 0.65, 0, true); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/VehicleEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/VehicleEntity.java index e0d2cb87d..1791123be 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/VehicleEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/VehicleEntity.java @@ -1,5 +1,6 @@ package com.atsuishio.superbwarfare.entity; +import com.atsuishio.superbwarfare.init.ModDamageTypes; import com.atsuishio.superbwarfare.init.ModItems; import com.atsuishio.superbwarfare.item.ContainerBlockItem; import com.google.common.collect.Lists; @@ -166,10 +167,12 @@ public class VehicleEntity extends Entity { return false; if (source.is(DamageTypes.IN_FIRE)) return false; + if (source.is(ModDamageTypes.VEHICLE_STRIKE)) + amount-= 20; if (source.getEntity() != null) { this.entityData.set(LAST_ATTACKER_UUID, source.getEntity().getStringUUID()); } - return true; + return super.hurt(source, amount); } public void heal(float pHealAmount) { @@ -251,6 +254,13 @@ public class VehicleEntity extends Entity { } travel(); + + if (this.getHealth() <= 0.1 * this.getMaxHealth()) { + this.hurt(0.1f); + } else { + this.heal(0.05f); + } + this.refreshDimensions(); } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/WheelChairEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/WheelChairEntity.java index 217ea27f4..ad86d63f0 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/WheelChairEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/WheelChairEntity.java @@ -1,13 +1,12 @@ package com.atsuishio.superbwarfare.entity; -import com.atsuishio.superbwarfare.config.server.ExplosionDestroyConfig; -import com.atsuishio.superbwarfare.init.ModDamageTypes; import com.atsuishio.superbwarfare.init.ModEntities; import com.atsuishio.superbwarfare.init.ModSounds; -import com.atsuishio.superbwarfare.tools.CustomExplosion; -import com.atsuishio.superbwarfare.tools.EntityFindUtil; +import com.atsuishio.superbwarfare.item.ContainerBlockItem; import com.atsuishio.superbwarfare.tools.ParticleTool; import net.minecraft.client.Minecraft; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientGamePacketListener; @@ -20,8 +19,9 @@ import net.minecraft.util.Mth; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.*; import net.minecraft.world.entity.animal.WaterAnimal; +import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.level.Explosion; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.network.NetworkHooks; @@ -37,7 +37,7 @@ import java.util.List; public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity { private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); - public static final float MAX_HEALTH = 50; + public static final float MAX_HEALTH = 30; public static final int MAX_ENERGY = 24000; public float leftWheelRot; public float rightWheelRot; @@ -264,14 +264,16 @@ public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity { @Override public void destroy() { if (level() instanceof ServerLevel) { - Entity attacker = EntityFindUtil.findEntity(this.level(), this.entityData.get(LAST_ATTACKER_UUID)); - CustomExplosion explosion = new CustomExplosion(this.level(), attacker == null ? this : attacker, - ModDamageTypes.causeCustomExplosionDamage(this.level().registryAccess(), attacker == null ? this : attacker, attacker == null ? this : attacker), 25.0f, - this.getX(), this.getY(), this.getZ(), 5f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); - explosion.explode(); - net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion); - explosion.finalizeExplosion(false); - ParticleTool.spawnMediumExplosionParticles(this.level(), this.position()); + ParticleTool.sendParticle((ServerLevel) this.level(), ParticleTypes.EXPLOSION, this.getX(), this.getY() + 1, this.getZ(), 10, 0.5, 0.5, 0.5, 1, false); + this.level().playSound(null, BlockPos.containing(this.position()), SoundEvents.GENERIC_EXPLODE, SoundSource.BLOCKS, 2.0F, (1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F) * 0.7F); + this.setHealth(this.getMaxHealth()); + ItemStack container = ContainerBlockItem.createInstance(this); + if (this.level() instanceof ServerLevel level) { + ItemEntity itemEntity = new ItemEntity(level, this.getX(), this.getY(), this.getZ(), container); + itemEntity.setPickUpDelay(10); + level.addFreshEntity(itemEntity); + } + this.remove(RemovalReason.DISCARDED); this.discard(); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/event/ClientEventHandler.java b/src/main/java/com/atsuishio/superbwarfare/event/ClientEventHandler.java index 25dce06fa..92a928230 100644 --- a/src/main/java/com/atsuishio/superbwarfare/event/ClientEventHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/event/ClientEventHandler.java @@ -1213,12 +1213,12 @@ public class ClientEventHandler { ItemStack stack = player.getMainHandItem(); - if (player.isPassenger() && player.getVehicle() instanceof ICannonEntity && zoom) { + if (player.isPassenger() && player.getVehicle() instanceof ICannonEntity && zoom && mc.options.getCameraType() == CameraType.FIRST_PERSON) { event.setFOV(event.getFOV() / 5); return; } - if (player.getVehicle() instanceof Ah6Entity ah6Entity && ah6Entity.getFirstPassenger() == player && zoom) { + if (player.getVehicle() instanceof Ah6Entity ah6Entity && ah6Entity.getFirstPassenger() == player && zoom && mc.options.getCameraType() == CameraType.FIRST_PERSON) { event.setFOV(event.getFOV() / 3); return; } diff --git a/src/main/java/com/atsuishio/superbwarfare/event/ClientSoundHandler.java b/src/main/java/com/atsuishio/superbwarfare/event/ClientSoundHandler.java index d457475b1..b4a285711 100644 --- a/src/main/java/com/atsuishio/superbwarfare/event/ClientSoundHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/event/ClientSoundHandler.java @@ -44,8 +44,8 @@ public class ClientSoundHandler { SoundEvent engineSound = mobileVehicle.getEngineSound(); float distanceReduce; if (e instanceof Ah6Entity ah6Entity) { - distanceReduce = (float) (1 - distance / 128); - player.level().playLocalSound(BlockPos.containing(engineSoundPos), engineSound, mobileVehicle.getSoundSource(), 20 * (mobileVehicle.getEntityData().get(POWER) - 0.012f) * distanceReduce * distanceReduce, (float) ((2 * Math.random() - 1) * 0.1f + 1.0f), false); + distanceReduce = (float) (1 - distance / 64); + player.level().playLocalSound(BlockPos.containing(engineSoundPos), engineSound, mobileVehicle.getSoundSource(), 5 * (mobileVehicle.getEntityData().get(POWER) - 0.012f) * distanceReduce * distanceReduce, (float) ((2 * Math.random() - 1) * 0.1f + 1.0f), false); // player.displayClientMessage(Component.literal("Angle:" + engineSoundPos), true); } } diff --git a/src/main/resources/assets/superbwarfare/geo/ah_6.geo.json b/src/main/resources/assets/superbwarfare/geo/ah_6.geo.json index 7b4a039ac..87c457bb0 100644 --- a/src/main/resources/assets/superbwarfare/geo/ah_6.geo.json +++ b/src/main/resources/assets/superbwarfare/geo/ah_6.geo.json @@ -1052,7 +1052,7 @@ ] }, { - "name": "bone15", + "name": "bone14", "parent": "huojiandan2", "pivot": [-27.40359, 10.29818, -11.75905], "cubes": [ @@ -1451,7 +1451,7 @@ ] }, { - "name": "bone14", + "name": "bone15", "parent": "qiluojia", "pivot": [-15.17822, 4.39988, -12.35401], "cubes": [ @@ -3029,6 +3029,15 @@ "up": {"uv": [12, 43], "uv_size": [4, 12]} } }, + { + "origin": [-3.705, 24.6729, 26.52101], + "size": [7.41, 1.95, 9.07437], + "pivot": [0, 25.6479, 31.0582], + "rotation": [-96, 0, 0], + "uv": { + "up": {"uv": [3.25, 89], "uv_size": [6, 6]} + } + }, { "origin": [-0.78, 47.8535, 28.89815], "size": [1.56, 9.75, 8.31187], @@ -3942,71 +3951,6 @@ "down": {"uv": [87, 85], "uv_size": [1, -1]} } }, - { - "origin": [-16.21009, 36.08024, 23.82845], - "size": [29.29875, 7.3125, 7.3125], - "pivot": [-2.04822, 39.98024, 27.24095], - "rotation": [-45, 0, 0], - "uv": { - "north": {"uv": [32, 22], "uv_size": [15, 4]}, - "south": {"uv": [40, 26], "uv_size": [15, 4]}, - "west": {"uv": [44, 65], "uv_size": [4, 4]}, - "up": {"uv": [40, 30], "uv_size": [15, 4]}, - "down": {"uv": [41, 38], "uv_size": [15, -4]} - } - }, - { - "origin": [13.08866, 37.05524, 24.80345], - "size": [19.5, 5.3625, 5.3625], - "pivot": [-2.04822, 39.98024, 27.24095], - "rotation": [-45, 0, 0], - "uv": { - "north": {"uv": [52, 45], "uv_size": [10, 3]}, - "south": {"uv": [53, 21], "uv_size": [10, 3]}, - "west": {"uv": [70, 73], "uv_size": [3, 3]}, - "up": {"uv": [55, 2], "uv_size": [10, 3]}, - "down": {"uv": [55, 8], "uv_size": [10, -3]} - } - }, - { - "origin": [32.58866, 37.54274, 25.29095], - "size": [19.5, 4.3875, 4.3875], - "pivot": [-2.04822, 39.98024, 27.24095], - "rotation": [-45, 0, 0], - "uv": { - "north": {"uv": [61, 38], "uv_size": [10, 2]}, - "south": {"uv": [61, 40], "uv_size": [10, 2]}, - "west": {"uv": [81, 49], "uv_size": [2, 2]}, - "up": {"uv": [61, 55], "uv_size": [10, 2]}, - "down": {"uv": [61, 59], "uv_size": [10, -2]} - } - }, - { - "origin": [52.08866, 38.03024, 25.77845], - "size": [16.575, 3.4125, 3.4125], - "pivot": [-2.04822, 39.98024, 27.24095], - "rotation": [-45, 0, 0], - "uv": { - "north": {"uv": [63, 21], "uv_size": [9, 2]}, - "south": {"uv": [63, 63], "uv_size": [9, 2]}, - "west": {"uv": [81, 51], "uv_size": [2, 2]}, - "up": {"uv": [64, 13], "uv_size": [9, 2]}, - "down": {"uv": [65, 4], "uv_size": [9, -2]} - } - }, - { - "origin": [68.66366, 38.51774, 26.26595], - "size": [5.85, 2.4375, 2.4375], - "pivot": [-2.04822, 39.98024, 27.24095], - "rotation": [-45, 0, 0], - "uv": { - "north": {"uv": [83, 40], "uv_size": [3, 1]}, - "south": {"uv": [83, 41], "uv_size": [3, 1]}, - "west": {"uv": [7, 88], "uv_size": [1, 1]}, - "up": {"uv": [42, 83], "uv_size": [3, 1]}, - "down": {"uv": [45, 84], "uv_size": [3, -1]} - } - }, { "origin": [68.0038, 38.83289, 22.85345], "size": [4.7775, 1.95, 1.95], @@ -4171,52 +4115,184 @@ "pivot": [-0.65812, 26.09318, 27.24095], "cubes": [ { - "origin": [4.56422, 21.70568, 25.42359], - "size": [2.58375, 8.775, 3.63472], - "pivot": [-0.65812, 26.09318, 27.24095], - "rotation": [-90, 0, 0], - "uv": { - "east": {"uv": [21, 72], "uv_size": [2, 5]}, - "west": {"uv": [24, 72], "uv_size": [2, 5]}, - "up": {"uv": [85, 46], "uv_size": [1, 2]}, - "down": {"uv": [47, 87], "uv_size": [1, -2]} - } - }, - { - "origin": [4.56422, 21.70568, 25.42359], - "size": [2.58375, 8.775, 3.63472], - "pivot": [-0.65812, 26.09318, 27.24095], - "rotation": [-135, 0, 0], - "uv": { - "east": {"uv": [9, 72], "uv_size": [2, 5]}, - "west": {"uv": [11, 72], "uv_size": [2, 5]}, - "up": {"uv": [85, 44], "uv_size": [1, 2]}, - "down": {"uv": [46, 87], "uv_size": [1, -2]} - } - }, - { - "origin": [4.56422, 21.70568, 25.42359], - "size": [2.58375, 8.775, 3.63472], - "pivot": [-0.65812, 26.09318, 27.24095], - "rotation": [-45, 0, 0], - "uv": { - "east": {"uv": [26, 72], "uv_size": [2, 5]}, - "west": {"uv": [72, 28], "uv_size": [2, 5]}, - "up": {"uv": [50, 85], "uv_size": [1, 2]}, - "down": {"uv": [85, 55], "uv_size": [1, -2]} - } - }, - { - "origin": [4.56422, 21.70568, 25.42359], - "size": [2.58375, 8.775, 3.63472], - "pivot": [-0.65812, 26.09318, 27.24095], + "origin": [4.56422, 28.70568, 25.42359], + "size": [2.58375, 1.775, 3.63472], + "pivot": [5.85609, 26.60574, 25.49095], "rotation": [0, 0, 0], "uv": { - "east": {"uv": [32, 72], "uv_size": [2, 5]}, "west": {"uv": [34, 72], "uv_size": [2, 5]}, "up": {"uv": [85, 57], "uv_size": [1, 2]}, "down": {"uv": [85, 61], "uv_size": [1, -2]} } + }, + { + "origin": [4.56422, 27.61837, 24.54859], + "size": [2.58375, 1.775, 3.63472], + "pivot": [5.85609, 26.60574, 25.49095], + "rotation": [45, 0, 0], + "uv": { + "west": {"uv": [34, 72], "uv_size": [2, 5]}, + "up": {"uv": [85, 57], "uv_size": [1, 2]}, + "down": {"uv": [85, 61], "uv_size": [1, -2]} + } + }, + { + "origin": [4.56422, 27.46824, 23.16103], + "size": [2.58375, 1.775, 3.63472], + "pivot": [5.85609, 26.60574, 25.49095], + "rotation": [90, 0, 0], + "uv": { + "west": {"uv": [34, 72], "uv_size": [2, 5]}, + "up": {"uv": [85, 57], "uv_size": [1, 2]}, + "down": {"uv": [85, 61], "uv_size": [1, -2]} + } + }, + { + "origin": [4.56422, 28.34324, 22.07372], + "size": [2.58375, 1.775, 3.63472], + "pivot": [5.85609, 26.60574, 25.49095], + "rotation": [135, 0, 0], + "uv": { + "west": {"uv": [34, 72], "uv_size": [2, 5]}, + "up": {"uv": [85, 57], "uv_size": [1, 2]}, + "down": {"uv": [85, 61], "uv_size": [1, -2]} + } + }, + { + "origin": [4.56422, 27.31811, 25.57372], + "size": [2.58375, 1.775, 3.63472], + "pivot": [5.85609, 25.58061, 28.99095], + "rotation": [-45, 0, 0], + "uv": { + "west": {"uv": [34, 72], "uv_size": [2, 5]}, + "up": {"uv": [85, 57], "uv_size": [1, 2]}, + "down": {"uv": [85, 61], "uv_size": [1, -2]} + } + }, + { + "origin": [4.56422, 26.44311, 26.66103], + "size": [2.58375, 1.775, 3.63472], + "pivot": [5.85609, 25.58061, 28.99095], + "rotation": [-90, 0, 0], + "uv": { + "west": {"uv": [34, 72], "uv_size": [2, 5]}, + "up": {"uv": [85, 57], "uv_size": [1, 2]}, + "down": {"uv": [85, 61], "uv_size": [1, -2]} + } + }, + { + "origin": [4.56422, 26.59324, 28.04859], + "size": [2.58375, 1.775, 3.63472], + "pivot": [5.85609, 25.58061, 28.99095], + "rotation": [-135, 0, 0], + "uv": { + "west": {"uv": [34, 72], "uv_size": [2, 5]}, + "up": {"uv": [85, 57], "uv_size": [1, 2]}, + "down": {"uv": [85, 61], "uv_size": [1, -2]} + } + }, + { + "origin": [4.56422, 27.68055, 28.92359], + "size": [2.58375, 1.775, 3.63472], + "pivot": [5.85609, 25.58061, 28.99095], + "rotation": [180, 0, 0], + "uv": { + "west": {"uv": [34, 72], "uv_size": [2, 5]}, + "up": {"uv": [85, 57], "uv_size": [1, 2]}, + "down": {"uv": [85, 61], "uv_size": [1, -2]} + } + } + ] + }, + { + "name": "bone1", + "parent": "tail", + "pivot": [30.11184, 39.63553, 27.24095], + "rotation": [0, 45, 90], + "cubes": [ + { + "origin": [30.93726, -7.04099, 23.41554], + "size": [3, 93.15946, 3], + "inflate": -0.17146, + "pivot": [30.11184, -6.68641, 27.24095], + "rotation": [-1.43502, -0.01797, -1.43502], + "uv": { + "north": {"uv": [0, 89], "uv_size": [0.25, 6]}, + "west": {"uv": [0.25, 89], "uv_size": [0.25, 6]}, + "up": {"uv": [3, 89], "uv_size": [0.25, 0.25]} + } + }, + { + "origin": [30.93726, -7.04099, 23.41554], + "size": [3, 93.15946, 3], + "inflate": -0.17146, + "pivot": [30.11184, -6.68641, 27.24095], + "rotation": [89.28238, -88.56487, -90.71762], + "uv": { + "north": {"uv": [0.5, 89], "uv_size": [0.25, 6]}, + "west": {"uv": [0.75, 89], "uv_size": [0.25, 6]}, + "up": {"uv": [3, 89.25], "uv_size": [0.25, 0.25]} + } + }, + { + "origin": [30.93726, -7.04099, 23.41554], + "size": [3, 93.15946, 3], + "inflate": -0.17146, + "pivot": [30.11184, -6.68641, 27.24095], + "rotation": [178.56498, 0.01797, -178.56498], + "uv": { + "north": {"uv": [1, 89], "uv_size": [0.25, 6]}, + "west": {"uv": [1.25, 89], "uv_size": [0.25, 6]}, + "up": {"uv": [3, 89.5], "uv_size": [0.25, 0.25]} + } + }, + { + "origin": [30.93726, -7.04099, 23.41554], + "size": [3, 93.15946, 3], + "inflate": -0.17146, + "pivot": [30.11184, -6.68641, 27.24095], + "rotation": [-90.71762, 88.56487, -89.28238], + "uv": { + "north": {"uv": [1.5, 89], "uv_size": [0.25, 6]}, + "west": {"uv": [1.75, 89], "uv_size": [0.25, 6]}, + "up": {"uv": [3, 89.75], "uv_size": [0.25, 0.25]} + } + }, + { + "origin": [29.11184, -6.84451, 23.58668], + "size": [2, 92.84982, 1.002], + "pivot": [30.11184, -6.68641, 27.24095], + "rotation": [-1.43502, 0, 0], + "uv": { + "north": {"uv": [2, 89], "uv_size": [0.25, 5.75]} + } + }, + { + "origin": [29.11184, -6.84451, 23.58668], + "size": [2, 92.84982, 1.002], + "pivot": [30.11184, -6.68641, 27.24095], + "rotation": [178.56498, 0, 180], + "uv": { + "north": {"uv": [2.25, 89], "uv_size": [0.25, 5.75]} + } + }, + { + "origin": [29.11184, -6.84451, 23.58668], + "size": [2, 92.84982, 1.002], + "pivot": [30.11184, -6.68641, 27.24095], + "rotation": [-1.43502, 90, 0], + "uv": { + "north": {"uv": [2.5, 89], "uv_size": [0.25, 5.75]} + } + }, + { + "origin": [29.11184, -6.84451, 23.58668], + "size": [2, 92.84982, 1.002], + "pivot": [30.11184, -6.68641, 27.24095], + "rotation": [-1.43502, -90, 0], + "uv": { + "north": {"uv": [2.75, 89], "uv_size": [0.25, 5.75]} + } } ] } diff --git a/src/main/resources/assets/superbwarfare/sounds/helicopter/heli_rocket_fire_3p.ogg b/src/main/resources/assets/superbwarfare/sounds/helicopter/heli_rocket_fire_3p.ogg index f2be92117..e6c4adba6 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/helicopter/heli_rocket_fire_3p.ogg and b/src/main/resources/assets/superbwarfare/sounds/helicopter/heli_rocket_fire_3p.ogg differ diff --git a/src/main/resources/assets/superbwarfare/textures/entity/ah_6.png b/src/main/resources/assets/superbwarfare/textures/entity/ah_6.png index 19f59a8c9..4216d7965 100644 Binary files a/src/main/resources/assets/superbwarfare/textures/entity/ah_6.png and b/src/main/resources/assets/superbwarfare/textures/entity/ah_6.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/screens/helicopter/drone_fov_move.png b/src/main/resources/assets/superbwarfare/textures/screens/helicopter/drone_fov_move.png deleted file mode 100644 index 03236ac0e..000000000 Binary files a/src/main/resources/assets/superbwarfare/textures/screens/helicopter/drone_fov_move.png and /dev/null differ diff --git a/src/main/resources/assets/superbwarfare/textures/screens/helicopter/heli_base.png b/src/main/resources/assets/superbwarfare/textures/screens/helicopter/heli_base.png index bb30277fa..efcf57aa2 100644 Binary files a/src/main/resources/assets/superbwarfare/textures/screens/helicopter/heli_base.png and b/src/main/resources/assets/superbwarfare/textures/screens/helicopter/heli_base.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/screens/helicopter/heli_line.png b/src/main/resources/assets/superbwarfare/textures/screens/helicopter/heli_line.png index 8c076246f..d2902ded1 100644 Binary files a/src/main/resources/assets/superbwarfare/textures/screens/helicopter/heli_line.png and b/src/main/resources/assets/superbwarfare/textures/screens/helicopter/heli_line.png differ