mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 20:22:33 +00:00
Fix bergamutes silencing ambient and record sounds, remove them from the set more eagerly
This commit is contained in:
1 parent
bdde235bf9
commit
34956960b6
2 files changed
+8
No files matched your search
+2
@@ -58,6 +58,8 @@ public class BergamuteEventHandler {
|
||||
private static boolean shouldSilence(ISound sound) {
|
||||
return sound.getCategory() != SoundCategory.VOICE
|
||||
&& sound.getCategory() != SoundCategory.MUSIC
|
||||
&& sound.getCategory() != SoundCategory.RECORDS
|
||||
&& sound.getCategory() != SoundCategory.AMBIENT
|
||||
&& sound.getClass().getName().startsWith("net.minecraft.client.audio");
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,12 @@ public class SubTileBergamute extends TileEntityFunctionalFlower {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
super.remove();
|
||||
existingFlowers.remove(this);
|
||||
}
|
||||
|
||||
// todo seems expensive when we have lots of sounds cache maybe?
|
||||
protected static SubTileBergamute getBergamuteNearby(double x, double y, double z) {
|
||||
return existingFlowers.stream()
|
||||
|
||||
Reference in new issue
Block a user