diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/ProjectileEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/ProjectileEntity.java index ad4fb2bca..f94b30688 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/ProjectileEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/ProjectileEntity.java @@ -65,7 +65,9 @@ import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Predicate; -@SuppressWarnings({"unused", "UnusedReturnValue"}) +import static com.atsuishio.superbwarfare.tools.ParticleTool.sendParticle; + +@SuppressWarnings({"unused", "UnusedReturnValue", "SuspiciousNameCombination"}) public class ProjectileEntity extends Projectile implements IEntityWithComplexSpawn, GeoEntity, CustomSyncMotionEntity { public static final EntityDataAccessor COLOR_R = SynchedEntityData.defineId(ProjectileEntity.class, EntityDataSerializers.FLOAT); @@ -187,6 +189,10 @@ public class ProjectileEntity extends Projectile implements IEntityWithComplexSp var obbVec = obb.clip(startVec.toVector3f(), endVec.toVector3f()).orElse(null); if (obbVec != null) { hitPos = new Vec3(obbVec); + if (this.level() instanceof ServerLevel serverLevel) { + sendParticle(serverLevel, ModParticleTypes.FIRE_STAR.get(), hitPos.x, hitPos.y, hitPos.z, 2, 0, 0, 0, 0.2, false); + sendParticle(serverLevel, ParticleTypes.SMOKE, hitPos.x, hitPos.y, hitPos.z, 3, 0, 0, 0, 0.01, false); + } } } } else { diff --git a/src/main/java/com/atsuishio/superbwarfare/event/GunEventHandler.java b/src/main/java/com/atsuishio/superbwarfare/event/GunEventHandler.java index ab366f9fd..05f09f7c2 100644 --- a/src/main/java/com/atsuishio/superbwarfare/event/GunEventHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/event/GunEventHandler.java @@ -229,7 +229,7 @@ public class GunEventHandler { if (reload.singleReloadStarter.start()) { NeoForge.EVENT_BUS.post(new ReloadEvent.Pre(player, data)); - if (data.defaultPrepareLoadTime() != 0 && data.ammo.get() == 0) { + if (data.defaultPrepareLoadTime() != 0 && (data.ammo.get() == 0 || stack.is(ModItems.SECONDARY_CATACLYSM.get()))) { // 此处判断空仓换弹的时候,是否在准备阶段就需要装填一发,如M870 playGunPrepareLoadReloadSounds(player); int prepareLoadTime = data.defaultPrepareLoadTime(); diff --git a/src/main/resources/data/superbwarfare/guns/secondary_cataclysm.json b/src/main/resources/data/superbwarfare/guns/secondary_cataclysm.json index 5a6a9b23a..05d05b82e 100644 --- a/src/main/resources/data/superbwarfare/guns/secondary_cataclysm.json +++ b/src/main/resources/data/superbwarfare/guns/secondary_cataclysm.json @@ -13,6 +13,7 @@ "ReloadTypes": [ "Iterative" ], + "PrepareTime": 31, "PrepareLoadTime": 31, "PrepareAmmoLoadTime": 3, "IterativeTime": 20,