From 470514f054b29466229edb5d9083cc9277d363fa Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 31 Mar 2024 00:37:56 +0000 Subject: [PATCH 1/3] Fix footsteps in midair. Fixes #288 --- .../sound/generator/TerrestrialStepSoundGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java b/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java index 7eb67c54..5edd9b64 100644 --- a/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java +++ b/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java @@ -80,7 +80,7 @@ protected void simulateStationary() { if (isImmobile && (entity.isOnGround() || !entity.isSubmergedInWater()) && playbackImmobile()) { Association assos = associations.findAssociation(0d, isRightFoot); - if (!assos.isSilent() || !isImmobile) { + if (assos.isResult() && (!assos.isSilent() || !isImmobile)) { playStep(assos, State.STAND); } } From fc6c15e7eadc37fbe87058954d1a22bfdb82190e Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 31 Mar 2024 02:01:43 +0100 Subject: [PATCH 2/3] Change the wander sound for soul soil to distenguish from the other states. Fixes #292 --- .../assets/presencefootsteps/config/acoustics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/resourcepacks/default_sound_pack/assets/presencefootsteps/config/acoustics.json b/src/main/resources/resourcepacks/default_sound_pack/assets/presencefootsteps/config/acoustics.json index 21d78048..02a5dfc1 100644 --- a/src/main/resources/resourcepacks/default_sound_pack/assets/presencefootsteps/config/acoustics.json +++ b/src/main/resources/resourcepacks/default_sound_pack/assets/presencefootsteps/config/acoustics.json @@ -1829,7 +1829,7 @@ }, "souls": { "type": "events", - "wander": "@minecraft:block.soul_soil.place", + "wander": "@minecraft:block.soul_soil.step", "land": "@minecraft:block.soul_soil.place", "walk": "@minecraft:block.soul_soil.place", "run": "@minecraft:block.soul_soil.place" From 4a6ab4e07d829ef522f153328eb00b23ea57f7ff Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 31 Mar 2024 02:17:53 +0100 Subject: [PATCH 3/3] Fixed slow footsteps when sprinting. Fixes #294 --- .../sound/generator/TerrestrialStepSoundGenerator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java b/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java index 5edd9b64..30a8e880 100644 --- a/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java +++ b/src/main/java/eu/ha3/presencefootsteps/sound/generator/TerrestrialStepSoundGenerator.java @@ -3,6 +3,7 @@ import net.minecraft.client.network.OtherClientPlayerEntity; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.passive.AbstractHorseEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ArmorItem; import net.minecraft.util.math.BlockPos; @@ -177,7 +178,7 @@ protected void simulateFootsteps() { } // Fix high speed footsteps (i.e. horse riding) - if (motionTracker.getHorizontalSpeed() > 0.1) { + if ((entity instanceof AbstractHorseEntity) && motionTracker.getHorizontalSpeed() > 0.1) { distance *= 3; }