Skip to content

Commit

Permalink
Use || instead of |
Browse files Browse the repository at this point in the history
Signed-off-by: djpadbit <[email protected]>
  • Loading branch information
djpadbit committed Aug 12, 2019
1 parent 82031bf commit 7e61fa9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/com/sonicether/soundphysics/SoundPhysics.java
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ public static void onPlaySound(final float posX, final float posY, final float p
*/
public static SoundBuffer onLoadSound(SoundBuffer buff, String filename) {
if (buff == null || buff.audioFormat.getChannels() == 1 || !Config.autoSteroDownmix) return buff;
if (mc.player == null | mc.world == null | lastSoundCategory == SoundCategory.RECORDS
| lastSoundCategory == SoundCategory.MUSIC | uiPattern.matcher(filename).matches() | clickPattern.matcher(filename).matches()) {
if (mc.player == null || mc.world == null || lastSoundCategory == SoundCategory.RECORDS
| lastSoundCategory == SoundCategory.MUSIC || uiPattern.matcher(filename).matches() || clickPattern.matcher(filename).matches()) {
if (Config.autoSteroDownmixLogging) log("Not converting sound '"+filename+"'("+buff.audioFormat.toString()+")");
return buff;
}
Expand Down Expand Up @@ -500,7 +500,7 @@ else if (mc.world.getPrecipitationHeight(position).getY() > position.getY())
if (mc.world.getBiome(position).getEnableSnow() && cansnow) return true;
else if (cansnow) return true;
else return false;*/
return mc.world.canSnowAt(position, false) | mc.world.getBiome(position).getEnableSnow();
return mc.world.canSnowAt(position, false) || mc.world.getBiome(position).getEnableSnow();
}
}

Expand Down Expand Up @@ -596,8 +596,8 @@ private static Vec3d offsetSoundByName(final double soundX, final double soundY,
@SuppressWarnings("deprecation")
private static void evaluateEnvironment(final int sourceID, final float posX, final float posY, final float posZ, final SoundCategory category, final String name) {
try {
if (mc.player == null | mc.world == null | posY <= 0 | category == SoundCategory.RECORDS
| category == SoundCategory.MUSIC) {
if (mc.player == null || mc.world == null || posY <= 0 || category == SoundCategory.RECORDS
|| category == SoundCategory.MUSIC) {
// posY <= 0 as a condition has to be there: Ingame
// menu clicks do have a player and world present
setEnvironment(sourceID, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f);
Expand Down

0 comments on commit 7e61fa9

Please sign in to comment.