diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java index ecbef0340..28c7e23fb 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java @@ -180,7 +180,7 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt public void interactEvent(Vec3 vec3) { if (level() instanceof ServerLevel serverLevel) { interactionTick++; - if (tickCount % 5 == 0) { + if (tickCount % 2 == 0) { serverLevel.playSound(null, vec3.x, vec3.y, vec3.z, ModSounds.HAND_WHEEL_ROT.get(), SoundSource.PLAYERS, 1f, random.nextFloat() * 0.1f + 0.9f); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java b/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java index 929969e37..a6a4b101d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModSounds.java @@ -497,6 +497,7 @@ public class ModSounds { public static final DeferredHolder SM0KE_GRENADE_RELEASE = REGISTRY.register("smoke_grenade_release", () -> SoundEvent.createVariableRangeEvent(Mod.loc("smoke_grenade_release"))); public static final DeferredHolder HAND_WHEEL_ROT = REGISTRY.register("hand_wheel_rot", () -> SoundEvent.createVariableRangeEvent(Mod.loc("hand_wheel_rot"))); + public static final DeferredHolder MEDIUM_ROCKET_FIRE = REGISTRY.register("medium_rocket_fire", () -> SoundEvent.createVariableRangeEvent(Mod.loc("medium_rocket_fire"))); } diff --git a/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketItem.java b/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketItem.java index 79664405b..b1284fabd 100644 --- a/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketItem.java +++ b/src/main/java/com/atsuishio/superbwarfare/item/common/ammo/MediumRocketItem.java @@ -46,7 +46,7 @@ public class MediumRocketItem extends Item implements ProjectileItem { @Override protected void playSound(BlockSource blockSource) { - blockSource.level().playSound(null, blockSource.pos(), ModSounds.SMALL_ROCKET_FIRE_3P.get(), SoundSource.BLOCKS, 2.0F, 1.0F); + blockSource.level().playSound(null, blockSource.pos(), ModSounds.MEDIUM_ROCKET_FIRE.get(), SoundSource.BLOCKS, 2.0F, 1.0F); } } diff --git a/src/main/java/com/atsuishio/superbwarfare/mixins/ProjectileUtilMixin.java b/src/main/java/com/atsuishio/superbwarfare/mixins/ProjectileUtilMixin.java index 80bed2281..ef35c21c0 100644 --- a/src/main/java/com/atsuishio/superbwarfare/mixins/ProjectileUtilMixin.java +++ b/src/main/java/com/atsuishio/superbwarfare/mixins/ProjectileUtilMixin.java @@ -49,7 +49,7 @@ public class ProjectileUtilMixin { acc.sbw$setCurrentHitPart(obb.part()); cir.setReturnValue(hitResult); - if (pLevel instanceof ServerLevel serverLevel && pProjectile.getDeltaMovement().lengthSqr() > 0.01) { + if (pLevel instanceof ServerLevel serverLevel && pProjectile.getDeltaMovement().lengthSqr() > 0.01 && pProjectile instanceof Projectile) { Vec3 hitPos = hitResult.getLocation(); pLevel.playSound(null, BlockPos.containing(hitPos), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1); sendParticle(serverLevel, ModParticleTypes.FIRE_STAR.get(), hitPos.x, hitPos.y, hitPos.z, 2, 0, 0, 0, 0.2, false); diff --git a/src/main/resources/assets/superbwarfare/sounds.json b/src/main/resources/assets/superbwarfare/sounds.json index 89acddc7e..c14e3ba19 100644 --- a/src/main/resources/assets/superbwarfare/sounds.json +++ b/src/main/resources/assets/superbwarfare/sounds.json @@ -3406,5 +3406,25 @@ "stream": true } ] + }, + "medium_rocket_fire": { + "sounds": [ + { + "name": "superbwarfare:type63/fire_1", + "stream": false + }, + { + "name": "superbwarfare:type63/fire_2", + "stream": false + }, + { + "name": "superbwarfare:type63/fire_3", + "stream": false + }, + { + "name": "superbwarfare:type63/fire_4", + "stream": false + } + ] } } \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/sounds/type63/fire_1.ogg b/src/main/resources/assets/superbwarfare/sounds/type63/fire_1.ogg new file mode 100644 index 000000000..9c26c0c8d Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/type63/fire_1.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/type63/fire_2.ogg b/src/main/resources/assets/superbwarfare/sounds/type63/fire_2.ogg new file mode 100644 index 000000000..3fae996bf Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/type63/fire_2.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/type63/fire_3.ogg b/src/main/resources/assets/superbwarfare/sounds/type63/fire_3.ogg new file mode 100644 index 000000000..c3b0d53a5 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/type63/fire_3.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/type63/fire_4.ogg b/src/main/resources/assets/superbwarfare/sounds/type63/fire_4.ogg new file mode 100644 index 000000000..e3a4319d9 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/type63/fire_4.ogg differ