From d83c8dfa2e1ed6762a3243d5b35d840cc53d8c0c Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 10 Jun 2024 21:37:12 +0100 Subject: [PATCH] Fixed #312 --- src/main/java/eu/ha3/presencefootsteps/world/Association.java | 2 +- src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java | 2 +- src/main/java/eu/ha3/presencefootsteps/world/SoundsKey.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/ha3/presencefootsteps/world/Association.java b/src/main/java/eu/ha3/presencefootsteps/world/Association.java index 5c860351..62147aa4 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/Association.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/Association.java @@ -32,7 +32,7 @@ public boolean isResult() { } public boolean isSilent() { - return this == NOT_EMITTER; + return this == NOT_EMITTER || state.isAir(); } public boolean dataEquals(Association other) { diff --git a/src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java b/src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java index 420b0883..d6bdffa9 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/PFSolver.java @@ -216,7 +216,7 @@ private Association findAssociation(AssociationPool associations, LivingEntity p return Association.of(state, pos.down(), player, SoundsKey.WATERFINE, SoundsKey.NON_EMITTER, SoundsKey.NON_EMITTER); } - return Association.NOT_EMITTER; + return association; } private Association findAssociation(AssociationPool associations, LivingEntity entity, BlockPos.Mutable pos, Box collider) { diff --git a/src/main/java/eu/ha3/presencefootsteps/world/SoundsKey.java b/src/main/java/eu/ha3/presencefootsteps/world/SoundsKey.java index 96e23db9..ed04adf9 100644 --- a/src/main/java/eu/ha3/presencefootsteps/world/SoundsKey.java +++ b/src/main/java/eu/ha3/presencefootsteps/world/SoundsKey.java @@ -41,6 +41,6 @@ public boolean isSilent() { } public boolean isEmitter() { - return isResult() && !isSilent(); + return !isSilent(); } }