diff --git a/common/src/main/kotlin/quaedam/projection/misc/NoiseProjection.kt b/common/src/main/kotlin/quaedam/projection/misc/NoiseProjection.kt index daeeb77..ccdaecc 100644 --- a/common/src/main/kotlin/quaedam/projection/misc/NoiseProjection.kt +++ b/common/src/main/kotlin/quaedam/projection/misc/NoiseProjection.kt @@ -70,18 +70,24 @@ object NoiseProjection { } private fun playRandomNoise(random: RandomSource, game: Minecraft) { + val volumeFactor = random.nextInt(100) val sound = SimpleSoundInstance( soundEvent.get().location, SoundSource.AMBIENT, - random.nextFloat() * 0.6f + 0.7f, + when (volumeFactor) { + in 0..8 -> random.nextFloat() * 0.65f + in 10..15 -> random.nextFloat() * 0.5f + 0.5f + in 21..50 -> random.nextFloat() * 0.3f + else -> random.nextFloat() * 0.2f + }, random.nextFloat() + 0.4f, RandomSource.create(random.nextLong()), false, 0, SoundInstance.Attenuation.NONE, - random.nextFloat() * 24.0 - 12, - random.nextFloat() * 24.0 - 12, + random.nextFloat() * 28.0 - 14, random.nextFloat() * 12.0 - 2, + random.nextFloat() * 28.0 - 14, true ) game.soundManager.playDelayed(sound, random.nextInt(3)) @@ -95,7 +101,7 @@ object NoiseProjectionBlock : EntityProjectionBlock(creat } -data class NoiseProjectionEffect(var rate: Int = 10, var amount: Int = 3) : ProjectionEffect(), +data class NoiseProjectionEffect(var rate: Int = 120, var amount: Int = 3) : ProjectionEffect(), ProjectionEffectShell.Provider { companion object { diff --git a/common/src/main/resources/assets/quaedam/sounds.json b/common/src/main/resources/assets/quaedam/sounds.json index ebc9d31..6853680 100644 --- a/common/src/main/resources/assets/quaedam/sounds.json +++ b/common/src/main/resources/assets/quaedam/sounds.json @@ -98,23 +98,55 @@ "quaedam.projection.noise": { "sounds": [ { - "name": "entity.villager.work_librarian", - "weight": 2, + "name": "entity.villager.work_armorer", + "type": "event" + }, + { + "name": "entity.villager.work_butcher", + "type": "event" + }, + { + "name": "entity.villager.work_cartographer", "type": "event" }, { "name": "entity.villager.work_cleric", - "weight": 2, + "type": "event" + }, + { + "name": "entity.villager.work_farmer", + "type": "event" + }, + { + "name": "entity.villager.work_fisherman", + "type": "event" + }, + { + "name": "entity.villager.work_fletcher", + "type": "event" + }, + { + "name": "entity.villager.work_leatherworker", + "type": "event" + }, + { + "name": "entity.villager.work_librarian", "type": "event" }, { "name": "entity.villager.work_mason", - "weight": 2, "type": "event" }, { "name": "entity.villager.work_shepherd", - "weight": 2, + "type": "event" + }, + { + "name": "entity.villager.work_toolsmith", + "type": "event" + }, + { + "name": "entity.villager.work_weaponsmith", "type": "event" } ]