设置木仓声传播范围
This commit is contained in:
parent
762a997dac
commit
5e2731f776
40 changed files with 75 additions and 49 deletions
|
@ -61,7 +61,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo
|
|||
}
|
||||
|
||||
public JavelinMissileEntity(LivingEntity entity, Level level, float damage, int monsterMultiplier) {
|
||||
super(ModEntities.RPG_ROCKET.get(), entity, level);
|
||||
super(ModEntities.JAVELIN_MISSILE.get(), entity, level);
|
||||
this.damage = damage;
|
||||
this.monsterMultiplier = monsterMultiplier;
|
||||
}
|
||||
|
|
|
@ -227,13 +227,13 @@ public class GunEventHandler {
|
|||
|
||||
if (!player.level().isClientSide() && player instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.MINIGUN_FIRE_1P.get(), 2f, pitch);
|
||||
player.playSound(ModSounds.MINIGUN_FIRE_3P.get(), 4f, pitch);
|
||||
player.playSound(ModSounds.MINIGUN_FAR.get(), 12f, pitch);
|
||||
player.playSound(ModSounds.MINIGUN_VERYFAR.get(), 24f, pitch);
|
||||
player.playSound(ModSounds.MINIGUN_FIRE_3P.get(), (float) stack.getOrCreateTag().getDouble("SoundRadius") * 0.2f, pitch);
|
||||
player.playSound(ModSounds.MINIGUN_FAR.get(), (float) stack.getOrCreateTag().getDouble("SoundRadius") * 0.5f, pitch);
|
||||
player.playSound(ModSounds.MINIGUN_VERYFAR.get(), (float) stack.getOrCreateTag().getDouble("SoundRadius"), pitch);
|
||||
|
||||
if (perk == ModPerks.BEAST_BULLET.get()) {
|
||||
player.playSound(ModSounds.HENG.get(), 5f, pitch);
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.HENG.get(), 5f, pitch);
|
||||
player.playSound(ModSounds.HENG.get(), 4f, pitch);
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.HENG.get(), 4f, pitch);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -281,17 +281,17 @@ public class GunEventHandler {
|
|||
|
||||
SoundEvent sound3p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, "sentinel_charge_fire_3p"));
|
||||
if (sound3p != null) {
|
||||
player.level().playSound(null, player.getOnPos(), sound3p, SoundSource.PLAYERS, 4f, 1f);
|
||||
player.level().playSound(null, player.getOnPos(), sound3p, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius") * 0.2f, 1f);
|
||||
}
|
||||
|
||||
SoundEvent soundFar = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, "sentinel_charge_far"));
|
||||
if (soundFar != null) {
|
||||
player.playSound(soundFar, 12f, 1f);
|
||||
player.level().playSound(null, player.getOnPos(), soundFar, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius") * 0.5f, 1f);
|
||||
}
|
||||
|
||||
SoundEvent soundVeryFar = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, "sentinel_charge_veryfar"));
|
||||
if (soundVeryFar != null) {
|
||||
player.playSound(soundVeryFar, 24f, 1f);
|
||||
player.level().playSound(null, player.getOnPos(), soundVeryFar, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius"), 1f);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -301,10 +301,10 @@ public class GunEventHandler {
|
|||
var perk = PerkHelper.getPerkByType(stack, Perk.Type.AMMO);
|
||||
|
||||
if (perk == ModPerks.BEAST_BULLET.get()) {
|
||||
player.playSound(ModSounds.HENG.get(), 5f, 1f);
|
||||
player.playSound(ModSounds.HENG.get(), 4f, 1f);
|
||||
|
||||
if (player instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.HENG.get(), 5f, 1f);
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.HENG.get(), 4f, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,17 +315,17 @@ public class GunEventHandler {
|
|||
|
||||
SoundEvent sound3p = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_fire_3p"));
|
||||
if (sound3p != null) {
|
||||
player.level().playSound(null, player.getOnPos(), sound3p, SoundSource.PLAYERS, 4f, 1f);
|
||||
player.level().playSound(null, player.getOnPos(), sound3p, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius") * 0.2f, 1f);
|
||||
}
|
||||
|
||||
SoundEvent soundFar = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_far"));
|
||||
if (soundFar != null) {
|
||||
player.playSound(soundFar, 12f, 1f);
|
||||
player.level().playSound(null, player.getOnPos(), soundFar, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius") * 0.5f, 1f);
|
||||
}
|
||||
|
||||
SoundEvent soundVeryFar = ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation(ModUtils.MODID, name + "_veryfar"));
|
||||
if (soundVeryFar != null) {
|
||||
player.playSound(soundVeryFar, 24f, 1f);
|
||||
player.level().playSound(null, player.getOnPos(), soundVeryFar, SoundSource.PLAYERS, (float) stack.getOrCreateTag().getDouble("SoundRadius"), 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -253,10 +253,10 @@ public class FireMessage {
|
|||
var perk = PerkHelper.getPerkByType(stack, Perk.Type.AMMO);
|
||||
|
||||
if (perk == ModPerks.BEAST_BULLET.get()) {
|
||||
player.playSound(ModSounds.HENG.get(), 5f, 1f);
|
||||
player.playSound(ModSounds.HENG.get(), 4f, 1f);
|
||||
|
||||
if (player instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.HENG.get(), 5f, 1f);
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.HENG.get(), 4f, 1f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -399,9 +399,9 @@ public class FireMessage {
|
|||
|
||||
if (player instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.M_79_FIRE_1P.get(), 2, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.M_79_FIRE_3P.get(), SoundSource.PLAYERS, 4, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.M_79_FAR.get(), SoundSource.PLAYERS, 6, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.M_79_VERYFAR.get(), SoundSource.PLAYERS, 12, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.M_79_FIRE_3P.get(), SoundSource.PLAYERS, 2, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.M_79_FAR.get(), SoundSource.PLAYERS, 5, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.M_79_VERYFAR.get(), SoundSource.PLAYERS, 10, 1);
|
||||
}
|
||||
|
||||
stack.getOrCreateTag().putBoolean("shoot", true);
|
||||
|
@ -450,9 +450,9 @@ public class FireMessage {
|
|||
|
||||
if (player instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.RPG_FIRE_1P.get(), 2, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.RPG_FIRE_3P.get(), SoundSource.PLAYERS, 4, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.RPG_FAR.get(), SoundSource.PLAYERS, 8, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.RPG_VERYFAR.get(), SoundSource.PLAYERS, 16, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.RPG_FIRE_3P.get(), SoundSource.PLAYERS, 2, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.RPG_FAR.get(), SoundSource.PLAYERS, 5, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.RPG_VERYFAR.get(), SoundSource.PLAYERS, 10, 1);
|
||||
}
|
||||
|
||||
tag.putBoolean("shoot", true);
|
||||
|
@ -503,7 +503,7 @@ public class FireMessage {
|
|||
if (player instanceof ServerPlayer serverPlayer) {
|
||||
SoundTool.playLocalSound(serverPlayer, ModSounds.JAVELIN_FIRE_1P.get(), 2, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.JAVELIN_FIRE_3P.get(), SoundSource.PLAYERS, 4, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.JAVELIN_FAR.get(), SoundSource.PLAYERS, 12, 1);
|
||||
serverPlayer.level().playSound(null, serverPlayer.getOnPos(), ModSounds.JAVELIN_FAR.get(), SoundSource.PLAYERS, 10, 1);
|
||||
}
|
||||
|
||||
tag.putBoolean("shoot", true);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 64,
|
||||
"empty_reload_time": 85,
|
||||
"BypassesArmor": 0.05
|
||||
"BypassesArmor": 0.05,
|
||||
"SoundRadius": 18
|
||||
}
|
||||
|
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 66,
|
||||
"empty_reload_time": 83,
|
||||
"BypassesArmor": 0.01
|
||||
"BypassesArmor": 0.01,
|
||||
"SoundRadius": 16
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 54,
|
||||
"empty_reload_time": 69,
|
||||
"BypassesArmor": 0.2
|
||||
"BypassesArmor": 0.2,
|
||||
"SoundRadius": 14
|
||||
}
|
|
@ -20,5 +20,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 73,
|
||||
"empty_reload_time": 95,
|
||||
"BypassesArmor": 0.25
|
||||
"BypassesArmor": 0.25,
|
||||
"SoundRadius": 13
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 30,
|
||||
"empty_reload_time": 35,
|
||||
"BypassesArmor": 0.15
|
||||
"BypassesArmor": 0.15,
|
||||
"SoundRadius": 10
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 30,
|
||||
"empty_reload_time": 35,
|
||||
"BypassesArmor": 0.15
|
||||
"BypassesArmor": 0.15,
|
||||
"SoundRadius": 16
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 56,
|
||||
"empty_reload_time": 64,
|
||||
"BypassesArmor": 0.25
|
||||
"BypassesArmor": 0.25,
|
||||
"SoundRadius": 14
|
||||
}
|
|
@ -17,5 +17,6 @@
|
|||
"auto": 0,
|
||||
"burst_size": 1,
|
||||
"empty_reload_time": 64,
|
||||
"BypassesArmor": 0.7
|
||||
"BypassesArmor": 0.7,
|
||||
"SoundRadius": 20
|
||||
}
|
|
@ -23,5 +23,6 @@
|
|||
"prepare_time": 29,
|
||||
"iterative_time": 11,
|
||||
"finish_time": 18,
|
||||
"BypassesArmor": 0.5
|
||||
"BypassesArmor": 0.5,
|
||||
"SoundRadius": 18
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 30,
|
||||
"empty_reload_time": 35,
|
||||
"BypassesArmor": 0.2
|
||||
"BypassesArmor": 0.2,
|
||||
"SoundRadius": 10
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 56,
|
||||
"empty_reload_time": 64,
|
||||
"BypassesArmor": 0.25
|
||||
"BypassesArmor": 0.25,
|
||||
"SoundRadius": 14
|
||||
}
|
|
@ -20,5 +20,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 114,
|
||||
"empty_reload_time": 133,
|
||||
"BypassesArmor": 0.25
|
||||
"BypassesArmor": 0.25,
|
||||
"SoundRadius": 15
|
||||
}
|
|
@ -22,5 +22,6 @@
|
|||
"prepare_load_time": 36,
|
||||
"iterative_time": 16,
|
||||
"finish_time": 12,
|
||||
"BypassesArmor": 0.05
|
||||
"BypassesArmor": 0.05,
|
||||
"SoundRadius": 16
|
||||
}
|
|
@ -22,5 +22,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 64,
|
||||
"empty_reload_time": 86,
|
||||
"BypassesArmor": 0.6
|
||||
"BypassesArmor": 0.6,
|
||||
"SoundRadius": 18
|
||||
}
|
|
@ -21,5 +21,6 @@
|
|||
"prepare_time": 8,
|
||||
"iterative_time": 16,
|
||||
"finish_time": 19,
|
||||
"BypassesArmor": 0.3
|
||||
"BypassesArmor": 0.3,
|
||||
"SoundRadius": 15
|
||||
}
|
|
@ -11,5 +11,6 @@
|
|||
"weight": 2,
|
||||
"fire_mode": 2,
|
||||
"projectile_amount": 1,
|
||||
"BypassesArmor": 0.3
|
||||
"BypassesArmor": 0.3,
|
||||
"SoundRadius": 14
|
||||
}
|
|
@ -22,5 +22,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 58,
|
||||
"empty_reload_time": 81,
|
||||
"BypassesArmor": 0.4
|
||||
"BypassesArmor": 0.4,
|
||||
"SoundRadius": 16
|
||||
}
|
|
@ -22,5 +22,6 @@
|
|||
"prepare_empty": 16,
|
||||
"iterative_time": 11,
|
||||
"finish_time": 18,
|
||||
"BypassesArmor": 0.54
|
||||
"BypassesArmor": 0.54,
|
||||
"SoundRadius": 18
|
||||
}
|
|
@ -23,5 +23,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 64,
|
||||
"empty_reload_time": 87,
|
||||
"BypassesArmor": 1
|
||||
"BypassesArmor": 1,
|
||||
"SoundRadius": 22
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 58,
|
||||
"empty_reload_time": 74,
|
||||
"BypassesArmor": 0.28
|
||||
"BypassesArmor": 0.28,
|
||||
"SoundRadius": 13
|
||||
}
|
|
@ -20,5 +20,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 73,
|
||||
"empty_reload_time": 95,
|
||||
"BypassesArmor": 0.23
|
||||
"BypassesArmor": 0.23,
|
||||
"SoundRadius": 14
|
||||
}
|
|
@ -20,5 +20,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 59,
|
||||
"empty_reload_time": 89,
|
||||
"BypassesArmor": 0.8
|
||||
"BypassesArmor": 0.8,
|
||||
"SoundRadius": 20
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 54,
|
||||
"empty_reload_time": 75,
|
||||
"BypassesArmor": 0.23
|
||||
"BypassesArmor": 0.23,
|
||||
"SoundRadius": 16
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 1,
|
||||
"normal_reload_time": 56,
|
||||
"empty_reload_time": 70,
|
||||
"BypassesArmor": 0.45
|
||||
"BypassesArmor": 0.45,
|
||||
"SoundRadius": 17
|
||||
}
|
|
@ -18,5 +18,6 @@
|
|||
"auto": 0,
|
||||
"burst_size": 1,
|
||||
"empty_reload_time": 65,
|
||||
"BypassesArmor": 0.2
|
||||
"BypassesArmor": 0.2,
|
||||
"SoundRadius": 10
|
||||
}
|
|
@ -19,5 +19,6 @@
|
|||
"burst_size": 3,
|
||||
"normal_reload_time": 46,
|
||||
"empty_reload_time": 64,
|
||||
"BypassesArmor": 0.15
|
||||
"BypassesArmor": 0.15,
|
||||
"SoundRadius": 4
|
||||
}
|
Loading…
Add table
Reference in a new issue