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()),