diff --git a/src/main/java/com/atsuishio/superbwarfare/client/overlay/VehicleHudOverlay.java b/src/main/java/com/atsuishio/superbwarfare/client/overlay/VehicleHudOverlay.java index 06d6c5d88..97e5946f4 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/overlay/VehicleHudOverlay.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/overlay/VehicleHudOverlay.java @@ -198,7 +198,8 @@ public class VehicleHudOverlay { if (player.getVehicle() instanceof LandArmorEntity iLand && iLand.isDriver(player) && iLand instanceof WeaponVehicleEntity weaponVehicle - && iLand instanceof MobileVehicleEntity mobileVehicle) { + && iLand instanceof MobileVehicleEntity mobileVehicle + && !(player.getVehicle() instanceof SpeedboatEntity)) { poseStack.pushPose(); poseStack.translate(Mth.clamp(-8 * ClientEventHandler.turnRot[1], -10, 10), Mth.clamp(-8 * ClientEventHandler.turnRot[0], -10, 10) - 0.3 * ClientEventHandler.shakeTime + 5 * ClientEventHandler.cameraRoll, 0); diff --git a/src/main/java/com/atsuishio/superbwarfare/client/overlay/VehicleMgHudOverlay.java b/src/main/java/com/atsuishio/superbwarfare/client/overlay/VehicleMgHudOverlay.java index 542a1753c..421321b40 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/overlay/VehicleMgHudOverlay.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/overlay/VehicleMgHudOverlay.java @@ -32,6 +32,8 @@ import org.joml.Math; import static com.atsuishio.superbwarfare.client.RenderHelper.preciseBlit; import static com.atsuishio.superbwarfare.client.overlay.VehicleHudOverlay.renderKillIndicator3P; +import static com.atsuishio.superbwarfare.entity.vehicle.SpeedboatEntity.AMMO; +import static com.atsuishio.superbwarfare.entity.vehicle.SpeedboatEntity.HEAT; import static com.atsuishio.superbwarfare.entity.vehicle.Yx100Entity.MACHINE_GUN_HEAT; import static com.atsuishio.superbwarfare.entity.vehicle.Yx100Entity.MG_AMMO; @@ -98,6 +100,12 @@ public class VehicleMgHudOverlay { guiGraphics.drawString(mc.font, Component.literal(".50 HMG " + (player.getInventory().hasAnyMatching(s -> s.is(ModItems.CREATIVE_AMMO_BOX.get())) ? "∞" : yx100.getEntityData().get(MG_AMMO))), 30, -9, Mth.hsvToRgb(0F, (float) heat, 1.0F), false); } + // 快艇 + if (player.getVehicle() instanceof SpeedboatEntity speedboat) { + double heat = speedboat.getEntityData().get(HEAT) / 100.0F; + guiGraphics.drawString(mc.font, Component.literal(".50 HMG " + (player.getInventory().hasAnyMatching(s -> s.is(ModItems.CREATIVE_AMMO_BOX.get())) ? "∞" : speedboat.getEntityData().get(AMMO))), 30, -9, Mth.hsvToRgb(0F, (float) heat, 1.0F), false); + } + double heal = 1 - mobileVehicle.getHealth() / mobileVehicle.getMaxHealth(); guiGraphics.drawString(Minecraft.getInstance().font, Component.literal("HP " + @@ -114,7 +122,6 @@ public class VehicleMgHudOverlay { private static boolean shouldRenderCrossHair(Player player) { if (player == null) return false; return !player.isSpectator() - && (player.getVehicle() instanceof SpeedboatEntity - || player.getVehicle() instanceof Yx100Entity yx100 && yx100.getNthEntity(1) == player); + && (player.getVehicle() instanceof SpeedboatEntity || (player.getVehicle() instanceof Yx100Entity yx100 && yx100.getNthEntity(1) == player)); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/Yx100Renderer.java b/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/Yx100Renderer.java index 36fa070e6..b910b301a 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/Yx100Renderer.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/renderer/entity/Yx100Renderer.java @@ -105,8 +105,6 @@ public class Yx100Renderer extends GeoEntityRenderer { bone.setPosX(r2 * Mth.lerp(partialTick, (float) animatable.recoilShakeO, (float) animatable.getRecoilShake()) * 1f); bone.setRotZ(r2 * Mth.lerp(partialTick, (float) animatable.recoilShakeO, (float) animatable.getRecoilShake()) * Mth.DEG_TO_RAD * 1.5f); - - bone.setPosY(r * Mth.lerp(partialTick, (float) animatable.recoilShakeO, (float) animatable.getRecoilShake()) * 1.5f); } super.renderRecursively(poseStack, animatable, bone, renderType, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, red, green, blue, alpha); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/AnnihilatorEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/AnnihilatorEntity.java index ff4a02114..969c96f15 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/AnnihilatorEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/AnnihilatorEntity.java @@ -491,6 +491,7 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity, float diffY = Mth.wrapDegrees(entityData.get(YAW) - this.getYRot()); float diffX = Mth.wrapDegrees(entityData.get(PITCH) - this.getXRot()); + turretTurnSound(diffX, diffY); this.setYRot(this.getYRot() + Mth.clamp(0.5f * diffY, -0.6f, 0.6f)); this.setXRot(Mth.clamp(this.getXRot() + Mth.clamp(diffX, -2f, 2f), -45, 5f)); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java index b88bb95ee..3527c2f57 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java @@ -509,6 +509,7 @@ public class Bmp2Entity extends ContainerMobileVehicleEntity implements GeoEntit diffY = Mth.wrapDegrees(gunAngle - getTurretYRot() + 0.05f); diffX = Mth.wrapDegrees(driver.getXRot() - this.getTurretXRot()); + turretTurnSound(diffX, diffY); this.setTurretXRot(Mth.clamp(this.getTurretXRot() + Mth.clamp(0.95f * diffX, -5, 5), -74f, 7.5f)); this.setTurretYRot(this.getTurretYRot() + Mth.clamp(0.95f * diffY, -15, 15)); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java index 49e5fa0c8..dc7ae0062 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java @@ -453,6 +453,7 @@ public class Lav150Entity extends ContainerMobileVehicleEntity implements GeoEnt diffY = Mth.wrapDegrees(gunAngle - getTurretYRot() + 0.05f); diffX = Mth.wrapDegrees(driver.getXRot() - this.getTurretXRot()); + turretTurnSound(diffX, diffY); this.setTurretXRot(Mth.clamp(this.getTurretXRot() + Mth.clamp(0.95f * diffX, -5, 5), -32.5f, 15)); this.setTurretYRot(this.getTurretYRot() + Mth.clamp(0.95f * diffY, -20, 20)); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mk42Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mk42Entity.java index 06216c8dc..a6b362988 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mk42Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mk42Entity.java @@ -339,6 +339,8 @@ public class Mk42Entity extends VehicleEntity implements GeoEntity, CannonEntity float diffY = Mth.wrapDegrees(entityData.get(YAW) - this.getYRot()); float diffX = Mth.wrapDegrees(entityData.get(PITCH) - this.getXRot()); + turretTurnSound(diffX, diffY); + this.setYRot(this.getYRot() + Mth.clamp(0.5f * diffY, -1.75f, 1.75f)); this.setXRot(Mth.clamp(this.getXRot() + Mth.clamp(0.5f * diffX, -3f, 3f), -85, 16.3f)); } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mle1934Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mle1934Entity.java index 011a1f7f8..e8b75dd47 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mle1934Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mle1934Entity.java @@ -434,6 +434,8 @@ public class Mle1934Entity extends VehicleEntity implements GeoEntity, CannonEnt float diffY = Mth.wrapDegrees(entityData.get(YAW) - this.getYRot()); float diffX = Mth.wrapDegrees(entityData.get(PITCH) - this.getXRot()); + turretTurnSound(diffX, diffY); + this.setYRot(this.getYRot() + Mth.clamp(0.5f * diffY, -1.25f, 1.25f)); this.setXRot(Mth.clamp(this.getXRot() + Mth.clamp(0.5f * diffX, -2f, 2f), -30, 4f)); } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java index d885ec337..619b3daa4 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java @@ -6,6 +6,7 @@ import com.atsuishio.superbwarfare.config.server.VehicleConfig; import com.atsuishio.superbwarfare.entity.projectile.ProjectileEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ArmedVehicleEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; +import com.atsuishio.superbwarfare.entity.vehicle.base.LandArmorEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.WeaponVehicleEntity; import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier; import com.atsuishio.superbwarfare.init.*; @@ -15,6 +16,7 @@ import com.atsuishio.superbwarfare.tools.AmmoType; import com.atsuishio.superbwarfare.tools.CustomExplosion; import com.atsuishio.superbwarfare.tools.ParticleTool; import com.atsuishio.superbwarfare.tools.SoundTool; +import com.mojang.math.Axis; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; @@ -40,6 +42,8 @@ import net.minecraftforge.network.NetworkHooks; import net.minecraftforge.network.PacketDistributor; import net.minecraftforge.network.PlayMessages; import org.joml.Math; +import org.joml.Matrix4f; +import org.joml.Vector4f; import software.bernie.geckolib.animatable.GeoEntity; import software.bernie.geckolib.core.animatable.instance.AnimatableInstanceCache; import software.bernie.geckolib.core.animation.AnimatableManager; @@ -53,7 +57,7 @@ import java.util.Comparator; import static com.atsuishio.superbwarfare.tools.ParticleTool.sendParticle; -public class SpeedboatEntity extends ContainerMobileVehicleEntity implements GeoEntity, ArmedVehicleEntity, WeaponVehicleEntity { +public class SpeedboatEntity extends ContainerMobileVehicleEntity implements GeoEntity, ArmedVehicleEntity, WeaponVehicleEntity, LandArmorEntity { public static final EntityDataAccessor FIRE_ANIM = SynchedEntityData.defineId(SpeedboatEntity.class, EntityDataSerializers.INT); public static final EntityDataAccessor DELTA_ROT = SynchedEntityData.defineId(SpeedboatEntity.class, EntityDataSerializers.FLOAT); @@ -228,6 +232,14 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo @Override public void vehicleShoot(Player player, int type) { if (this.cannotFire) return; + Matrix4f transform = getBarrelTransform(); + + float x = 0; + float y = 0; + float z = 0; + + Vector4f worldPosition = transformPosition(transform, x, y, z); + ProjectileEntity projectile = new ProjectileEntity(player.level()) .shooter(player) @@ -236,8 +248,8 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo .zoom(false); projectile.bypassArmorRate(0.4f); - projectile.setPos(this.xo - this.getViewVector(1).scale(0.54).x - this.getDeltaMovement().x, this.yo + 3.0, this.zo - this.getViewVector(1).scale(0.54).z - this.getDeltaMovement().z); - projectile.shoot(player, player.getLookAngle().x, player.getLookAngle().y + (zooming() ? 0.002f : -0.009f), player.getLookAngle().z, 20, + projectile.setPos(worldPosition.x - 1.1 * this.getDeltaMovement().x, worldPosition.y, worldPosition.z - 1.1 * this.getDeltaMovement().z); + projectile.shoot(player, getBarrelVector(1).x, getBarrelVector(1).y + 0.005f, getBarrelVector(1).z, 20, (float) 0.4); this.level().addFreshEntity(projectile); @@ -337,10 +349,48 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo Entity driver = this.getFirstPassenger(); if (driver == null) return; - float gunAngle = -Math.clamp(-140f, 140f, Mth.wrapDegrees(driver.getYHeadRot() - this.getYRot())); + float gunAngle = -Mth.wrapDegrees(driver.getYHeadRot() - this.getYRot()); - this.setTurretYRot(gunAngle); - this.setTurretXRot(driver.getXRot() - this.getXRot()); + float diffY; + float diffX; + + diffY = Mth.wrapDegrees(gunAngle - getTurretYRot() + 0.05f); + diffX = Mth.wrapDegrees(driver.getXRot() - this.getTurretXRot()); + + turretTurnSound(diffX, diffY); + + this.setTurretXRot(this.getTurretXRot() + Mth.clamp(0.95f * diffX, -40, 40)); + this.setTurretYRot(Mth.clamp(this.getTurretYRot() + Mth.clamp(0.95f * diffY, -40, 40), -140, 140)); + } + + public Matrix4f getBarrelTransform() { + Matrix4f transformT = getTurretTransform(); + float x = 0f; + float y = 0.5088375f; + float z = 0.04173125f; + Vector4f worldPosition = transformPosition(transformT, x, y, z); + + Matrix4f transform = new Matrix4f(); + transform.translate(worldPosition.x, worldPosition.y, worldPosition.z); + transform.rotate(Axis.YP.rotationDegrees(getTurretYRot() - getYRot())); + transform.rotate(Axis.XP.rotationDegrees(getTurretXRot())); + transform.rotate(Axis.ZP.rotationDegrees(getRoll())); + return transform; + } + + public Matrix4f getTurretTransform() { + Matrix4f transformT = getVehicleTransform(); + float x = 0f; + float y = 2.4616625f; + float z = -0.565625f; + Vector4f worldPosition = transformPosition(transformT, x, y, z); + + Matrix4f transform = new Matrix4f(); + transform.translate(worldPosition.x, worldPosition.y, worldPosition.z); + transform.rotate(Axis.YP.rotationDegrees(getTurretYRot() - getYRot())); + transform.rotate(Axis.XP.rotationDegrees(getXRot())); + transform.rotate(Axis.ZP.rotationDegrees(getRoll())); + return transform; } public float getTurretYRot() { @@ -514,4 +564,46 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo public int getWeaponType(int index) { return index == 0 ? 0 : -1; } + + @Override + public float turretYRotO() { + return turretYRotO; + } + + @Override + public float turretYRot() { + return turretYRot; + } + + @Override + public float turretXRotO() { + return turretXRotO; + } + + @Override + public float turretXRot() { + return turretXRot; + } + + @Override + public Vec3 getBarrelVec(float ticks) { + return getBarrelVector(ticks); + } + + public final Vec3 getBarrelVector(float pPartialTicks) { + return this.calculateViewVector(this.getBarrelXRot(pPartialTicks), this.getBarrelYRot(pPartialTicks)); + } + + public float getBarrelXRot(float pPartialTicks) { + return Mth.lerp(pPartialTicks, turretXRotO - this.xRotO, getTurretXRot() - this.getXRot()); + } + + public float getBarrelYRot(float pPartialTick) { + return -Mth.lerp(pPartialTick, turretYRotO - this.yRotO, getTurretYRot() - this.getYRot()); + } + + @Override + public Vec3 getGunVec(float ticks) { + return getBarrelVector(ticks); + } } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java index 7bd9ba869..2dffc7099 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java @@ -589,6 +589,8 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti diffY = Mth.wrapDegrees(turretAngle - getTurretYRot() + 0.05f); diffX = Mth.wrapDegrees(driver.getXRot() - this.getTurretXRot()); + turretTurnSound(diffX, diffY); + float min = -5 + (float) (isInWater() && !onGround() ? 2.5 : 6) * entityData.get(DELTA_ROT); float max = 5 + (float) (isInWater() && !onGround() ? 2.5 : 6) * entityData.get(DELTA_ROT); @@ -608,6 +610,8 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti diffY = Mth.wrapDegrees(gunAngle - getGunYRot()); diffX = Mth.wrapDegrees(gunner.getXRot() - this.getGunXRot()); + turretTurnSound(diffX, diffY); + this.setGunXRot(Mth.clamp(this.getGunXRot() + Mth.clamp(0.95f * diffX, -10, 10), -60f, 12.5f)); this.setGunYRot(this.getGunYRot() + Mth.clamp(0.9f * diffY, -15, 15)); } @@ -728,18 +732,6 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti Matrix4f transform = getTurretTransform(); -// float x = 0.8669625f; -// float y = 0.2f; -// float z = 0.6076875f; -// y += (float) passenger.getMyRidingOffset(); -// -// -// Vector4f worldPosition = transformPosition(transform, x, y, z); -// -// if (passenger instanceof Yx100GunEntity) { -// worldPosition = transformPosition(transform, -x, y + 2, z); -// } - int i = this.getOrderedPassengers().indexOf(passenger); if (i == 0) { diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java index f79c315c7..8e799e10f 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/base/VehicleEntity.java @@ -214,6 +214,12 @@ public abstract class VehicleEntity extends Entity { roll = rot; } + public void turretTurnSound(float diffX, float diffY) { + if (level().isClientSide && java.lang.Math.max(Mth.abs(diffX), Mth.abs(diffY)) > 0) { + level().playLocalSound(this.getX(), this.getY() + this.getBbHeight() * 0.5, this.getZ(), ModSounds.TURRET_TURN.get(), this.getSoundSource(), (float) java.lang.Math.min(0.15 * (java.lang.Math.max(Mth.abs(diffX), Mth.abs(diffY))), 0.75), (random.nextFloat() * 0.05f + 0.95f), false); + } + } + public VehicleEntity(EntityType pEntityType, Level pLevel) { super(pEntityType, pLevel); this.setHealth(this.getMaxHealth()); diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java b/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java index 3dc32bf04..8b6149abb 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java @@ -422,5 +422,6 @@ public class ModSounds { public static final RegistryObject YX_100_FIRE_3P = REGISTRY.register("yx_100_fire_3p", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("yx_100_fire_3p"))); public static final RegistryObject YX_100_FAR = REGISTRY.register("yx_100_far", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("yx_100_far"))); public static final RegistryObject YX_100_VERYFAR = REGISTRY.register("yx_100_veryfar", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("yx_100_veryfar"))); + public static final RegistryObject TURRET_TURN = REGISTRY.register("turret_turn", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("turret_turn"))); } diff --git a/src/main/java/com/atsuishio/superbwarfare/mixins/CameraMixin.java b/src/main/java/com/atsuishio/superbwarfare/mixins/CameraMixin.java index a6b48cb06..f0c26fee8 100644 --- a/src/main/java/com/atsuishio/superbwarfare/mixins/CameraMixin.java +++ b/src/main/java/com/atsuishio/superbwarfare/mixins/CameraMixin.java @@ -57,7 +57,7 @@ public abstract class CameraMixin { CameraPos.rotateZ(-boat.getXRot() * Mth.DEG_TO_RAD); CameraPos.rotateY(-yRot * Mth.DEG_TO_RAD); - setRotation(Mth.lerp(partialTicks, player.yBobO, player.yBob), Mth.lerp(partialTicks, player.xBobO, player.xBob)); + setRotation(-Mth.lerp(partialTicks, boat.turretYRotO - boat.yRotO, boat.getTurretYRot() - boat.getYRot()), Mth.lerp(partialTicks, boat.turretXRotO - boat.xRotO, boat.getTurretXRot() - boat.getXRot())); setPosition(Mth.lerp(partialTicks, boat.xo + CameraPos.x, boat.getX() + CameraPos.x), Mth.lerp(partialTicks, boat.yo + CameraPos.y, boat.getY() + CameraPos.y), Mth.lerp(partialTicks, boat.zo + CameraPos.z, boat.getZ() + CameraPos.z)); info.cancel(); return; diff --git a/src/main/java/com/atsuishio/superbwarfare/network/message/LungeMineAttackMessage.java b/src/main/java/com/atsuishio/superbwarfare/network/message/LungeMineAttackMessage.java index db8f1252c..ffdf91b04 100644 --- a/src/main/java/com/atsuishio/superbwarfare/network/message/LungeMineAttackMessage.java +++ b/src/main/java/com/atsuishio/superbwarfare/network/message/LungeMineAttackMessage.java @@ -57,7 +57,7 @@ public class LungeMineAttackMessage { } Entity lookingEntity = EntityFindUtil.findEntity(player.level(), String.valueOf(message.uuid)); if (lookingEntity != null) { - lookingEntity.hurt(ModDamageTypes.causeLungeMineDamage(player.level().registryAccess(), player, player), lookingEntity instanceof VehicleEntity ? 450 : 150); + lookingEntity.hurt(ModDamageTypes.causeLungeMineDamage(player.level().registryAccess(), player, player), lookingEntity instanceof VehicleEntity ? 600 : 150); causeLungeMineExplode(player.level(), player, lookingEntity); } } else if (message.type == 1) { diff --git a/src/main/resources/assets/superbwarfare/sounds.json b/src/main/resources/assets/superbwarfare/sounds.json index 2113810b6..8a5e364bb 100644 --- a/src/main/resources/assets/superbwarfare/sounds.json +++ b/src/main/resources/assets/superbwarfare/sounds.json @@ -2907,5 +2907,13 @@ "stream": false } ] + }, + "turret_turn": { + "sounds": [ + { + "name": "superbwarfare:turret_turn", + "stream": false + } + ] } } \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/sounds/turret_turn.ogg b/src/main/resources/assets/superbwarfare/sounds/turret_turn.ogg new file mode 100644 index 000000000..5ad23fa94 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/turret_turn.ogg differ