From 5a00b40865befe7815b62a509bf345ef7dd0a721 Mon Sep 17 00:00:00 2001 From: Light_Quanta Date: Thu, 12 Jun 2025 22:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4interface=20AerialBombEntity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/projectile/AerialBombEntity.java | 4 ---- .../entity/vehicle/AnnihilatorEntity.java | 9 +-------- .../superbwarfare/entity/vehicle/Bmp2Entity.java | 9 +-------- .../superbwarfare/entity/vehicle/Lav150Entity.java | 9 +-------- .../entity/vehicle/PrismTankEntity.java | 9 +-------- .../entity/vehicle/SpeedboatEntity.java | 13 ------------- .../superbwarfare/entity/vehicle/Yx100Entity.java | 9 +-------- .../data/superbwarfare/vehicles/annihilator.json | 5 +++++ .../data/superbwarfare/vehicles/bmp_2.json | 5 +++++ .../data/superbwarfare/vehicles/lav_150.json | 5 +++++ .../data/superbwarfare/vehicles/prism_tank.json | 5 +++++ .../data/superbwarfare/vehicles/speedboat.json | 5 +++++ .../data/superbwarfare/vehicles/yx_100.json | 5 +++++ 13 files changed, 35 insertions(+), 57 deletions(-) delete mode 100644 src/main/java/com/atsuishio/superbwarfare/entity/projectile/AerialBombEntity.java diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/AerialBombEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/AerialBombEntity.java deleted file mode 100644 index 382bf8ba9..000000000 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/AerialBombEntity.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.atsuishio.superbwarfare.entity.projectile; - -public interface AerialBombEntity extends ExplosiveProjectile { -} 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 3a8777c55..e7629c364 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/AnnihilatorEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/AnnihilatorEntity.java @@ -4,7 +4,6 @@ import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.component.ModDataComponents; import com.atsuishio.superbwarfare.config.server.ExplosionConfig; import com.atsuishio.superbwarfare.config.server.VehicleConfig; -import com.atsuishio.superbwarfare.entity.projectile.AerialBombEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.CannonEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.EnergyVehicleEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition; @@ -198,13 +197,7 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity, @Override public DamageModifier getDamageModifier() { return super.getDamageModifier() - .custom((source, damage) -> getSourceAngle(source, 3) * damage) - .custom((source, damage) -> { - if (source.getDirectEntity() instanceof AerialBombEntity) { - return 8f * damage; - } - return damage; - }); + .custom((source, damage) -> getSourceAngle(source, 3) * damage); } @Override 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 d64f5ac1d..a5c16f3a9 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java @@ -3,7 +3,6 @@ package com.atsuishio.superbwarfare.entity.vehicle; import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.config.server.ExplosionConfig; import com.atsuishio.superbwarfare.config.server.VehicleConfig; -import com.atsuishio.superbwarfare.entity.projectile.AerialBombEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.LandArmorEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition; @@ -145,13 +144,7 @@ public class Bmp2Entity extends ContainerMobileVehicleEntity implements GeoEntit @Override public DamageModifier getDamageModifier() { return super.getDamageModifier() - .custom((source, damage) -> getSourceAngle(source, 0.4f) * damage) - .custom((source, damage) -> { - if (source.getDirectEntity() instanceof AerialBombEntity) { - return 2f * damage; - } - return damage; - }); + .custom((source, damage) -> getSourceAngle(source, 0.4f) * damage); } @Override 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 1894fdaff..63602f65d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java @@ -3,7 +3,6 @@ package com.atsuishio.superbwarfare.entity.vehicle; import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.config.server.ExplosionConfig; import com.atsuishio.superbwarfare.config.server.VehicleConfig; -import com.atsuishio.superbwarfare.entity.projectile.AerialBombEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.LandArmorEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition; @@ -122,13 +121,7 @@ public class Lav150Entity extends ContainerMobileVehicleEntity implements GeoEnt @Override public DamageModifier getDamageModifier() { return super.getDamageModifier() - .custom((source, damage) -> getSourceAngle(source, 0.25f) * damage) - .custom((source, damage) -> { - if (source.getDirectEntity() instanceof AerialBombEntity) { - return 3f * damage; - } - return damage; - }); + .custom((source, damage) -> getSourceAngle(source, 0.25f) * damage); } @Override diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java index aadc0e669..997e84bab 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java @@ -3,7 +3,6 @@ package com.atsuishio.superbwarfare.entity.vehicle; import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.config.server.ExplosionConfig; import com.atsuishio.superbwarfare.config.server.VehicleConfig; -import com.atsuishio.superbwarfare.entity.projectile.AerialBombEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.LandArmorEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition; @@ -126,13 +125,7 @@ public class PrismTankEntity extends ContainerMobileVehicleEntity implements Geo @Override public DamageModifier getDamageModifier() { return super.getDamageModifier() - .custom((source, damage) -> getSourceAngle(source, 0.4f) * damage) - .custom((source, damage) -> { - if (source.getDirectEntity() instanceof AerialBombEntity) { - return 2f * damage; - } - return damage; - }); + .custom((source, damage) -> getSourceAngle(source, 0.4f) * damage); } @Override 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 cceccf7bd..2fa4d19a8 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java @@ -3,9 +3,7 @@ package com.atsuishio.superbwarfare.entity.vehicle; import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.config.server.ExplosionConfig; import com.atsuishio.superbwarfare.config.server.VehicleConfig; -import com.atsuishio.superbwarfare.entity.projectile.AerialBombEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.*; -import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier; import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon; import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon; import com.atsuishio.superbwarfare.event.ClientMouseHandler; @@ -99,17 +97,6 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo return super.getPassengerRidingPosition(entity).add(0, -0.8, 0); } - @Override - public DamageModifier getDamageModifier() { - return super.getDamageModifier() - .custom((source, damage) -> { - if (source.getDirectEntity() instanceof AerialBombEntity) { - return 2f * damage; - } - return damage; - }); - } - @Override public void baseTick() { super.baseTick(); 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 f84299f2e..a73a5ba97 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java @@ -3,7 +3,6 @@ package com.atsuishio.superbwarfare.entity.vehicle; import com.atsuishio.superbwarfare.Mod; import com.atsuishio.superbwarfare.config.server.ExplosionConfig; import com.atsuishio.superbwarfare.config.server.VehicleConfig; -import com.atsuishio.superbwarfare.entity.projectile.AerialBombEntity; import com.atsuishio.superbwarfare.entity.projectile.SwarmDroneEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.LandArmorEntity; @@ -216,13 +215,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti @Override public DamageModifier getDamageModifier() { return super.getDamageModifier() - .custom((source, damage) -> getSourceAngle(source, 0.5f) * damage) - .custom((source, damage) -> { - if (source.getDirectEntity() instanceof AerialBombEntity) { - return 3f * damage; - } - return damage; - }); + .custom((source, damage) -> getSourceAngle(source, 0.5f) * damage); } @Override diff --git a/src/main/resources/data/superbwarfare/vehicles/annihilator.json b/src/main/resources/data/superbwarfare/vehicles/annihilator.json index 0d24e7507..cd99dd36b 100644 --- a/src/main/resources/data/superbwarfare/vehicles/annihilator.json +++ b/src/main/resources/data/superbwarfare/vehicles/annihilator.json @@ -70,6 +70,11 @@ "Value": 0.3, "Source": "superbwarfare:cannon_fire" }, + { + "Type": "Multiply", + "Value": 8, + "Source": "#superbwarfare:aerial_bomb" + }, { "Type": "Multiply", "Value": 0.04, diff --git a/src/main/resources/data/superbwarfare/vehicles/bmp_2.json b/src/main/resources/data/superbwarfare/vehicles/bmp_2.json index ece98fcb2..2c91832e2 100644 --- a/src/main/resources/data/superbwarfare/vehicles/bmp_2.json +++ b/src/main/resources/data/superbwarfare/vehicles/bmp_2.json @@ -74,6 +74,11 @@ "Value": 1.5, "Source": "superbwarfare:cannon_fire" }, + { + "Type": "Multiply", + "Value": 2, + "Source": "#superbwarfare:aerial_bomb" + }, { "Type": "Multiply", "Value": 0.1, diff --git a/src/main/resources/data/superbwarfare/vehicles/lav_150.json b/src/main/resources/data/superbwarfare/vehicles/lav_150.json index 29b333cdf..9c962ea6c 100644 --- a/src/main/resources/data/superbwarfare/vehicles/lav_150.json +++ b/src/main/resources/data/superbwarfare/vehicles/lav_150.json @@ -69,6 +69,11 @@ "Value": 1.5, "Source": "superbwarfare:cannon_fire" }, + { + "Type": "Multiply", + "Value": 3, + "Source": "#superbwarfare:aerial_bomb" + }, { "Type": "Multiply", "Value": 0.25, diff --git a/src/main/resources/data/superbwarfare/vehicles/prism_tank.json b/src/main/resources/data/superbwarfare/vehicles/prism_tank.json index a7087bf4e..8800931ba 100644 --- a/src/main/resources/data/superbwarfare/vehicles/prism_tank.json +++ b/src/main/resources/data/superbwarfare/vehicles/prism_tank.json @@ -74,6 +74,11 @@ "Value": 1.5, "Source": "superbwarfare:cannon_fire" }, + { + "Type": "Multiply", + "Value": 2, + "Source": "#superbwarfare:aerial_bomb" + }, { "Type": "Multiply", "Value": 0.1, diff --git a/src/main/resources/data/superbwarfare/vehicles/speedboat.json b/src/main/resources/data/superbwarfare/vehicles/speedboat.json index 464ba2b8f..d12d145fe 100644 --- a/src/main/resources/data/superbwarfare/vehicles/speedboat.json +++ b/src/main/resources/data/superbwarfare/vehicles/speedboat.json @@ -58,6 +58,11 @@ "Value": 0.8, "Source": "superbwarfare:cannon_fire" }, + { + "Type": "Multiply", + "Value": 2, + "Source": "#superbwarfare:aerial_bomb" + }, { "Type": "Multiply", "Value": 0.16, diff --git a/src/main/resources/data/superbwarfare/vehicles/yx_100.json b/src/main/resources/data/superbwarfare/vehicles/yx_100.json index 437b332ac..ae3b11ec1 100644 --- a/src/main/resources/data/superbwarfare/vehicles/yx_100.json +++ b/src/main/resources/data/superbwarfare/vehicles/yx_100.json @@ -29,6 +29,11 @@ "Type": "Immunity", "Source": "minecraft:player_attack" }, + { + "Type": "Multiply", + "Value": 3, + "Source": "#superbwarfare:aerial_bomb" + }, { "Type": "Immunity", "Source": "#superbwarfare:projectile"