From b7d995feca039e0da1493f937b53fb58335d6985 Mon Sep 17 00:00:00 2001 From: Atsuishio <842960157@qq.com> Date: Fri, 27 Jun 2025 22:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=8F=E9=B8=9F=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/server/VehicleConfig.java | 24 +++++++++---------- .../entity/vehicle/Ah6Entity.java | 8 +++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/config/server/VehicleConfig.java b/src/main/java/com/atsuishio/superbwarfare/config/server/VehicleConfig.java index d13a87eeb..be8282205 100644 --- a/src/main/java/com/atsuishio/superbwarfare/config/server/VehicleConfig.java +++ b/src/main/java/com/atsuishio/superbwarfare/config/server/VehicleConfig.java @@ -47,12 +47,12 @@ public class VehicleConfig { public static ModConfigSpec.IntValue AH_6_MIN_ENERGY_COST; public static ModConfigSpec.IntValue AH_6_MAX_ENERGY_COST; - public static ModConfigSpec.IntValue AH_6_CANNON_DAMAGE; - public static ModConfigSpec.IntValue AH_6_CANNON_EXPLOSION_DAMAGE; + public static ModConfigSpec.DoubleValue AH_6_CANNON_DAMAGE; + public static ModConfigSpec.DoubleValue AH_6_CANNON_EXPLOSION_DAMAGE; public static ModConfigSpec.DoubleValue AH_6_CANNON_EXPLOSION_RADIUS; - public static ModConfigSpec.IntValue AH_6_ROCKET_DAMAGE; - public static ModConfigSpec.IntValue AH_6_ROCKET_EXPLOSION_DAMAGE; - public static ModConfigSpec.IntValue AH_6_ROCKET_EXPLOSION_RADIUS; + public static ModConfigSpec.DoubleValue AH_6_ROCKET_DAMAGE; + public static ModConfigSpec.DoubleValue AH_6_ROCKET_EXPLOSION_DAMAGE; + public static ModConfigSpec.DoubleValue AH_6_ROCKET_EXPLOSION_RADIUS; public static ModConfigSpec.BooleanValue AH_6_CANNON_DESTROY; public static ModConfigSpec.IntValue LAV_150_ENERGY_COST; @@ -230,22 +230,22 @@ public class VehicleConfig { AH_6_MAX_ENERGY_COST = builder.defineInRange("ah_6_max_energy_cost", 128, 0, 2147483647); builder.comment("The cannon damage of AH-6"); - AH_6_CANNON_DAMAGE = builder.defineInRange("ah_6_cannon_damage", 25, 1, 10000000); + AH_6_CANNON_DAMAGE = builder.defineInRange("ah_6_cannon_damage", 25d, 1, 10000000); builder.comment("The cannon explosion damage of AH-6"); - AH_6_CANNON_EXPLOSION_DAMAGE = builder.defineInRange("ah_6_cannon_explosion_damage", 20, 1, 10000000); + AH_6_CANNON_EXPLOSION_DAMAGE = builder.defineInRange("ah_6_cannon_explosion_damage", 12d, 1, 10000000); - builder.comment("The cannon explosion damage of AH-6"); - AH_6_CANNON_EXPLOSION_RADIUS = builder.defineInRange("ah_6_cannon_explosion_damage", 8d, 1, 10000000); + builder.comment("The cannon explosion radius of AH-6"); + AH_6_CANNON_EXPLOSION_RADIUS = builder.defineInRange("ah_6_cannon_explosion_radius", 3.5d, 1, 10000000); builder.comment("The rocket damage of AH-6"); - AH_6_ROCKET_DAMAGE = builder.defineInRange("ah_6_rocket_damage", 80, 1, 10000000); + AH_6_ROCKET_DAMAGE = builder.defineInRange("ah_6_rocket_damage", 80d, 1, 10000000); builder.comment("The rocket explosion damage of AH-6"); - AH_6_ROCKET_EXPLOSION_DAMAGE = builder.defineInRange("ah_6_rocket_explosion_damage", 40, 1, 10000000); + AH_6_ROCKET_EXPLOSION_DAMAGE = builder.defineInRange("ah_6_rocket_explosion_damage", 40d, 1, 10000000); builder.comment("The rocket explosion radius of AH-6"); - AH_6_ROCKET_EXPLOSION_RADIUS = builder.defineInRange("ah_6_rocket_explosion_radius", 5, 1, 10000000); + AH_6_ROCKET_EXPLOSION_RADIUS = builder.defineInRange("ah_6_rocket_explosion_radius", 5d, 1, 10000000); builder.comment("Whether to destroy the block when cannon of AH-6 hits a block"); AH_6_CANNON_DESTROY = builder.define("ah_6_cannon_destroy", true); 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 62deb2312..cb513ffe0 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java @@ -98,7 +98,7 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity new VehicleWeapon[]{ new SmallCannonShellWeapon() .blockInteraction(VehicleConfig.AH_6_CANNON_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP) - .damage(VehicleConfig.AH_6_CANNON_DAMAGE.get()) + .damage(VehicleConfig.AH_6_CANNON_DAMAGE.get().floatValue()) .explosionDamage(VehicleConfig.AH_6_CANNON_EXPLOSION_DAMAGE.get().floatValue()) .explosionRadius(VehicleConfig.AH_6_CANNON_EXPLOSION_RADIUS.get().floatValue()) .sound(ModSounds.INTO_CANNON.get()) @@ -108,9 +108,9 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity .sound3pFar(ModSounds.HELICOPTER_CANNON_FAR.get()) .sound3pVeryFar(ModSounds.HELICOPTER_CANNON_VERYFAR.get()), new HeliRocketWeapon() - .damage(VehicleConfig.AH_6_ROCKET_DAMAGE.get()) - .explosionDamage(VehicleConfig.AH_6_ROCKET_EXPLOSION_DAMAGE.get()) - .explosionRadius(VehicleConfig.AH_6_ROCKET_EXPLOSION_RADIUS.get()) + .damage(VehicleConfig.AH_6_ROCKET_DAMAGE.get().floatValue()) + .explosionDamage(VehicleConfig.AH_6_ROCKET_EXPLOSION_DAMAGE.get().floatValue()) + .explosionRadius(VehicleConfig.AH_6_ROCKET_EXPLOSION_RADIUS.get().floatValue()) .sound(ModSounds.INTO_MISSILE.get()) .sound1p(ModSounds.HELICOPTER_ROCKET_FIRE_1P.get()) .sound3p(ModSounds.HELICOPTER_ROCKET_FIRE_3P.get()),