From 14addf7f1e457036b89d472329d2a6e9c6f43788 Mon Sep 17 00:00:00 2001 From: Atsuishio <842960157@qq.com> Date: Thu, 3 Apr 2025 23:09:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E5=80=BC=E5=B9=B3=E8=A1=A1=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E6=AC=A1=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E6=89=93=E6=96=AD=E5=8D=95=E5=8F=91=E8=A3=85=E5=A1=AB?= =?UTF-8?q?=E7=B1=BB=E6=8D=A2=E5=BC=B9=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/client/ClickHandler.java | 20 ++++++++----- .../entity/projectile/CannonShellEntity.java | 19 +----------- .../entity/projectile/MortarShellEntity.java | 29 ++++++++++++++++--- .../projectile/SmallCannonShellEntity.java | 26 ++++++----------- .../entity/vehicle/Ah6Entity.java | 9 ++++++ .../entity/vehicle/AnnihilatorEntity.java | 8 +++++ .../entity/vehicle/Bmp2Entity.java | 4 +++ .../entity/vehicle/Lav150Entity.java | 4 +++ .../entity/vehicle/Mk42Entity.java | 7 +++++ .../entity/vehicle/Mle1934Entity.java | 7 +++++ .../entity/vehicle/PrismTankEntity.java | 4 +++ .../entity/vehicle/SpeedboatEntity.java | 25 ++++++++++++++++ .../entity/vehicle/Yx100Entity.java | 8 ++--- 13 files changed, 120 insertions(+), 50 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/client/ClickHandler.java b/src/main/java/com/atsuishio/superbwarfare/client/ClickHandler.java index 185f1b66a..b920eb4ea 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/ClickHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/ClickHandler.java @@ -353,13 +353,19 @@ public class ClickHandler { } } else { PacketDistributor.sendToServer(new FireMessage(0)); - if (GunsTool.getGunIntTag(tag, "FireMode") == 1) { - if (ClientEventHandler.burstFireSize == 0) { - ClientEventHandler.burstFireSize = GunsTool.getGunIntTag(tag, "BurstSize"); - } - } else { - if (!stack.is(ModItems.BOCEK.get())) { - ClientEventHandler.holdFire = true; + if ((!(tag.getBoolean("is_normal_reloading") || tag.getBoolean("is_empty_reloading")) + && !GunsTool.getGunBooleanTag(tag, "Reloading") + && !GunsTool.getGunBooleanTag(tag, "Charging") + && !GunsTool.getGunBooleanTag(tag, "NeedBoltAction")) + && drawTime < 0.01) { + if (GunsTool.getGunIntTag(tag, "FireMode") == 1) { + if (ClientEventHandler.burstFireSize == 0) { + ClientEventHandler.burstFireSize = GunsTool.getGunIntTag(tag, "BurstSize"); + } + } else { + if (!stack.is(ModItems.BOCEK.get())) { + ClientEventHandler.holdFire = true; + } } } } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/CannonShellEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/CannonShellEntity.java index 1d22072bb..52f2c3cf1 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/CannonShellEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/CannonShellEntity.java @@ -337,23 +337,7 @@ public class CannonShellEntity extends FastThrowableProjectile implements GeoEnt } private PlayState movementPredicate(AnimationState event) { - if (this.animationProcedure.equals("empty")) { - return event.setAndContinue(RawAnimation.begin().thenLoop("animation.cannon_shell.idle")); - } - return PlayState.STOP; - } - - private PlayState procedurePredicate(AnimationState event) { - if (!animationProcedure.equals("empty") && event.getController().getAnimationState() == AnimationController.State.STOPPED) { - event.getController().setAnimation(RawAnimation.begin().thenPlay(this.animationProcedure)); - if (event.getController().getAnimationState() == AnimationController.State.STOPPED) { - this.animationProcedure = "empty"; - event.getController().forceAnimationReset(); - } - } else if (animationProcedure.equals("empty")) { - return PlayState.STOP; - } - return PlayState.CONTINUE; + return event.setAndContinue(RawAnimation.begin().thenLoop("animation.cannon_shell.idle")); } @Override @@ -364,7 +348,6 @@ public class CannonShellEntity extends FastThrowableProjectile implements GeoEnt @Override public void registerControllers(AnimatableManager.ControllerRegistrar data) { data.add(new AnimationController<>(this, "movement", 0, this::movementPredicate)); - data.add(new AnimationController<>(this, "procedure", 0, this::procedurePredicate)); } @Override diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/MortarShellEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/MortarShellEntity.java index 72ecece0c..520207671 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/MortarShellEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/MortarShellEntity.java @@ -5,8 +5,8 @@ import com.atsuishio.superbwarfare.init.ModDamageTypes; import com.atsuishio.superbwarfare.init.ModEntities; import com.atsuishio.superbwarfare.init.ModItems; import com.atsuishio.superbwarfare.tools.ChunkLoadTool; +import com.atsuishio.superbwarfare.tools.CustomExplosion; import com.atsuishio.superbwarfare.tools.ParticleTool; -import com.atsuishio.superbwarfare.tools.ProjectileTool; import com.google.common.collect.Sets; import net.minecraft.core.BlockPos; import net.minecraft.core.component.DataComponents; @@ -26,11 +26,14 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.alchemy.Potion; import net.minecraft.world.item.alchemy.PotionContents; import net.minecraft.world.item.alchemy.Potions; +import net.minecraft.world.level.Explosion; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BellBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.EntityHitResult; +import net.minecraft.world.phys.Vec3; +import net.neoforged.neoforge.event.EventHooks; import org.jetbrains.annotations.NotNull; import software.bernie.geckolib.animatable.GeoEntity; import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache; @@ -179,7 +182,7 @@ public class MortarShellEntity extends FastThrowableProjectile implements GeoEnt Entity entity = entityHitResult.getEntity(); entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage); if (this.level() instanceof ServerLevel) { - ProjectileTool.causeCustomExplode(this, this.damage, this.radius); + causeExplode(entityHitResult.getLocation()); this.createAreaCloud(this.level()); } this.discard(); @@ -196,7 +199,7 @@ public class MortarShellEntity extends FastThrowableProjectile implements GeoEnt } if (!this.level().isClientSide() && this.level() instanceof ServerLevel) { if (this.tickCount > 1) { - ProjectileTool.causeCustomExplode(this, this.damage, this.radius); + causeExplode(blockHitResult.getLocation()); this.createAreaCloud(this.level()); } } @@ -215,13 +218,31 @@ public class MortarShellEntity extends FastThrowableProjectile implements GeoEnt } if (this.tickCount > this.life || this.isInWater()) { if (this.level() instanceof ServerLevel) { - ProjectileTool.causeCustomExplode(this, this.damage, this.radius); + causeExplode(position()); this.createAreaCloud(this.level()); } this.discard(); } } + private void causeExplode(Vec3 vec3) { + CustomExplosion explosion = new CustomExplosion(this.level(), this, + ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), + this, + this.getOwner()), + damage, + vec3.x, + vec3.y, + vec3.z, + radius, + ExplosionConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP). + setDamageMultiplier(1.25f); + explosion.explode(); + EventHooks.onExplosionStart(this.level(), explosion); + explosion.finalizeExplosion(false); + ParticleTool.spawnMediumExplosionParticles(this.level(), vec3); + } + @Override public void registerControllers(AnimatableManager.ControllerRegistrar data) { } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/SmallCannonShellEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/SmallCannonShellEntity.java index 06cc92662..29bf1af3c 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/SmallCannonShellEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/SmallCannonShellEntity.java @@ -8,7 +8,6 @@ import com.atsuishio.superbwarfare.init.ModSounds; import com.atsuishio.superbwarfare.network.message.receive.ClientIndicatorMessage; import com.atsuishio.superbwarfare.tools.CustomExplosion; import com.atsuishio.superbwarfare.tools.ParticleTool; -import com.atsuishio.superbwarfare.tools.ProjectileTool; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; @@ -85,10 +84,8 @@ public class SmallCannonShellEntity extends FastThrowableProjectile implements G entity.invulnerableTime = 0; } - if (this.tickCount > 0) { - if (this.level() instanceof ServerLevel) { - causeExplode(entity); - } + if (this.tickCount > 0 && this.level() instanceof ServerLevel) { + causeExplode(result.getLocation()); } this.discard(); } @@ -102,30 +99,27 @@ public class SmallCannonShellEntity extends FastThrowableProjectile implements G bell.attemptToRing(this.level(), resultPos, blockHitResult.getDirection()); } if (this.level() instanceof ServerLevel) { - causeExplodeBlock(blockHitResult); + causeExplode(blockHitResult.getLocation()); } this.discard(); } - private void causeExplode(Entity entity) { + private void causeExplode(Vec3 vec3) { CustomExplosion explosion = new CustomExplosion(this.level(), this, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), explosionDamage, - entity.getX(), - entity.getY() + 0.6 * entity.getBbHeight(), - entity.getZ(), + vec3.x, + vec3.y, + vec3.z, explosionRadius, ExplosionConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP). setDamageMultiplier(1.25f); explosion.explode(); EventHooks.onExplosionStart(this.level(), explosion); explosion.finalizeExplosion(false); - ParticleTool.spawnSmallExplosionParticles(this.level(), - new Vec3(entity.getX(), - entity.getEyeY(), - entity.getZ())); + ParticleTool.spawnSmallExplosionParticles(this.level(), vec3); } private void causeExplodeBlock(HitResult result) { @@ -161,9 +155,7 @@ public class SmallCannonShellEntity extends FastThrowableProjectile implements G if (this.tickCount > 200 || this.isInWater()) { if (this.level() instanceof ServerLevel && !onGround()) { - ProjectileTool.causeCustomExplode(this, - ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), - this, this.explosionDamage, this.explosionRadius, 1.25f); + causeExplode(position()); } this.discard(); } 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 43e0aa539..9e5ade262 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Ah6Entity.java @@ -154,6 +154,15 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity .multiply(0.16f, ModTags.DamageTypes.PROJECTILE) .multiply(10, ModDamageTypes.VEHICLE_STRIKE) .custom((source, damage) -> { + if (source.getDirectEntity() instanceof CannonShellEntity) { + return 0.9f * damage; + } + if (source.getDirectEntity() instanceof SmallCannonShellEntity) { + return 1.3f * damage; + } + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 2.2f * damage; + } if (source.getDirectEntity() instanceof MelonBombEntity) { return 2f * damage; } 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 b9df562ab..308a26e1b 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/AnnihilatorEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/AnnihilatorEntity.java @@ -5,6 +5,8 @@ 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.C4Entity; +import com.atsuishio.superbwarfare.entity.projectile.CannonShellEntity; +import com.atsuishio.superbwarfare.entity.projectile.GunGrenadeEntity; import com.atsuishio.superbwarfare.entity.projectile.MelonBombEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.CannonEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.EnergyVehicleEntity; @@ -221,6 +223,12 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity, if (source.getDirectEntity() instanceof MelonBombEntity) { return 8f * damage; } + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 3f * damage; + } + if (source.getDirectEntity() instanceof CannonShellEntity) { + return 3f * damage; + } return damage; }) .reduce(12); 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 a227c2cbd..dbf32754e 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Bmp2Entity.java @@ -3,6 +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.GunGrenadeEntity; import com.atsuishio.superbwarfare.entity.projectile.MelonBombEntity; import com.atsuishio.superbwarfare.entity.projectile.MortarShellEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; @@ -155,6 +156,9 @@ public class Bmp2Entity extends ContainerMobileVehicleEntity implements GeoEntit if (source.getDirectEntity() instanceof MortarShellEntity) { return 3f * damage; } + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 1.5f * damage; + } return damage; }) .reduce(8); 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 7c7f07cfe..bc9ffa349 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Lav150Entity.java @@ -3,6 +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.GunGrenadeEntity; import com.atsuishio.superbwarfare.entity.projectile.MelonBombEntity; import com.atsuishio.superbwarfare.entity.projectile.MortarShellEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; @@ -137,6 +138,9 @@ public class Lav150Entity extends ContainerMobileVehicleEntity implements GeoEnt if (source.getDirectEntity() instanceof MortarShellEntity) { return 3f * damage; } + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 1.5f * damage; + } return damage; }) .reduce(7); 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 ea49af294..f63fad64b 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mk42Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mk42Entity.java @@ -5,6 +5,7 @@ import com.atsuishio.superbwarfare.client.gui.RangeHelper; 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.GunGrenadeEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.CannonEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition; import com.atsuishio.superbwarfare.entity.vehicle.base.VehicleEntity; @@ -188,6 +189,12 @@ public class Mk42Entity extends VehicleEntity implements GeoEntity, CannonEntity .multiply(0.85f, ModTags.DamageTypes.PROJECTILE_ABSOLUTE) .multiply(10f, ModDamageTypes.VEHICLE_STRIKE) .custom((source, damage) -> getSourceAngle(source, 1f) * damage) + .custom((source, damage) -> { + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 1.5f * damage; + } + return damage; + }) .reduce(8); } 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 a25570335..16465a58d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mle1934Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Mle1934Entity.java @@ -5,6 +5,7 @@ import com.atsuishio.superbwarfare.client.gui.RangeHelper; 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.GunGrenadeEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.CannonEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition; import com.atsuishio.superbwarfare.entity.vehicle.base.VehicleEntity; @@ -213,6 +214,12 @@ public class Mle1934Entity extends VehicleEntity implements GeoEntity, CannonEnt .multiply(0.85f, ModTags.DamageTypes.PROJECTILE_ABSOLUTE) .multiply(10f, ModDamageTypes.VEHICLE_STRIKE) .custom((source, damage) -> getSourceAngle(source, 1f) * damage) + .custom((source, damage) -> { + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 1.5f * damage; + } + return damage; + }) .reduce(8); } 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 d09ca94ab..1d8fcb777 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/PrismTankEntity.java @@ -3,6 +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.GunGrenadeEntity; import com.atsuishio.superbwarfare.entity.projectile.MelonBombEntity; import com.atsuishio.superbwarfare.entity.projectile.MortarShellEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; @@ -150,6 +151,9 @@ public class PrismTankEntity extends ContainerMobileVehicleEntity implements Geo if (source.getDirectEntity() instanceof MortarShellEntity) { return 3f * damage; } + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 1.5f * damage; + } return damage; }) .reduce(9); 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 331e37e02..eea500664 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java @@ -3,6 +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.*; import com.atsuishio.superbwarfare.entity.vehicle.base.*; import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier; import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon; @@ -105,6 +106,30 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo .multiply(0.8f, ModDamageTypes.CANNON_FIRE) .multiply(0.16f, ModTags.DamageTypes.PROJECTILE) .multiply(2, ModDamageTypes.VEHICLE_STRIKE) + .custom((source, damage) -> { + if (source.getDirectEntity() instanceof CannonShellEntity) { + return 0.9f * damage; + } + if (source.getDirectEntity() instanceof SmallCannonShellEntity) { + return 1.3f * damage; + } + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 2.2f * damage; + } + if (source.getDirectEntity() instanceof MelonBombEntity) { + return 2f * damage; + } + if (source.getDirectEntity() instanceof RgoGrenadeEntity) { + return 6f * damage; + } + if (source.getDirectEntity() instanceof HandGrenadeEntity) { + return 5f * damage; + } + if (source.getDirectEntity() instanceof MortarShellEntity) { + return 4f * damage; + } + return damage; + }) .reduce(2); } 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 0d9caa153..a3b4c3570 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java @@ -3,10 +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.C4Entity; -import com.atsuishio.superbwarfare.entity.projectile.MelonBombEntity; -import com.atsuishio.superbwarfare.entity.projectile.RpgRocketEntity; -import com.atsuishio.superbwarfare.entity.projectile.SmallCannonShellEntity; +import com.atsuishio.superbwarfare.entity.projectile.*; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.LandArmorEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition; @@ -205,6 +202,9 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti if (source.getDirectEntity() instanceof RpgRocketEntity) { return 1.5f * damage; } + if (source.getDirectEntity() instanceof GunGrenadeEntity) { + return 2f * damage; + } return damage; }) .reduce(9);