Skip to content

Commit

Permalink
Add mangrove bird ambience during the day
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor4t committed Sep 24, 2024
1 parent 68634c3 commit 29b275c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.tag.convention.v1.ConventionalBiomeTags;
import net.minecraft.registry.tag.BiomeTags;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeKeys;
Expand Down Expand Up @@ -44,6 +45,10 @@ public void onInitializeClient() {
AMBIENT_CONDITIONS.add(new AmbientCondition(EffectiveAmbienceSounds.ANIMAL_JUNGLE_NIGHT, AmbientCondition.Type.ANIMAL,
(world, pos, player) -> isInOverworld(world, pos) && !isInCave(world, pos) && (world.getBiome(pos).isIn(ConventionalBiomeTags.JUNGLE)) && Effective.isNightTime(world)));

// mangrove birds in mangroves during the day
AMBIENT_CONDITIONS.add(new AmbientCondition(EffectiveAmbienceSounds.ANIMAL_MANGROVE_BIRDS, AmbientCondition.Type.ANIMAL,
(world, pos, player) -> isInOverworld(world, pos) && !isInCave(world, pos) && (world.getBiome(pos).matchesKey(BiomeKeys.MANGROVE_SWAMP)) && !Effective.isNightTime(world)));

// owls in forests at night
AMBIENT_CONDITIONS.add(new AmbientCondition(EffectiveAmbienceSounds.ANIMAL_OWLS, AmbientCondition.Type.ANIMAL,
(world, pos, player) -> isInOverworld(world, pos) && !isInCave(world, pos) && (world.getBiome(pos).isIn(ConventionalBiomeTags.FOREST)) && Effective.isNightTime(world)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class EffectiveAmbienceSounds {
public static final SoundEvent ANIMAL_FROGS_AND_CRICKETS = create("ambient.animal.frogs_and_crickets");
public static final SoundEvent ANIMAL_JUNGLE_DAY = create("ambient.animal.jungle_day");
public static final SoundEvent ANIMAL_JUNGLE_NIGHT = create("ambient.animal.jungle_night");
public static final SoundEvent ANIMAL_MANGROVE_BIRDS = create("ambient.animal.mangrove_birds");
public static final SoundEvent ANIMAL_OWLS = create("ambient.animal.owls");
public static final SoundEvent FOLIAGE_LEAVES = create("ambient.foliage.leaves");
public static final SoundEvent WATER_DRIPSTONE_CAVES = create("ambient.water.dripstone_caves");
Expand Down
Binary file not shown.

0 comments on commit 29b275c

Please sign in to comment.