Skip to content

Commit

Permalink
Re-add fish ambient sound support for resource packs. (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
sscards55 committed Dec 5, 2021
1 parent a40fbed commit 9d43cf0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ protected SoundEvent getFlopSound() {
}
return AquaSounds.FISH_FLOP;
}


@Override
protected SoundEvent getAmbientSound() {
return AquaSounds.FISH_AMBIENT;
}

@Override
protected SoundEvent getDeathSound() {
return AquaSounds.FISH_DEATH;
Expand Down Expand Up @@ -115,4 +120,4 @@ private static boolean isSourceBlock(LevelAccessor world, BlockPos pos) {
BlockState state = world.getBlockState(pos);
return state.getBlock() instanceof LiquidBlock && world.getBlockState(pos).is(Blocks.WATER) && state.getValue(LiquidBlock.LEVEL) == 0;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public final class AquaSounds {
public static final SoundEvent BOBBER_LAND_IN_LAVA = registerSound("bobber_land_lava");
public static final SoundEvent JELLYFISH_FLOP = registerSound("jellyfish_flop");
public static final SoundEvent FISH_FLOP = registerSound("fish_flop");
public static final SoundEvent FISH_AMBIENT = registerSound("fish_ambient");
public static final SoundEvent FISH_DEATH = registerSound("fish_death");
public static final SoundEvent FISH_HURT = registerSound("fish_hurt");
public static final SoundEvent JELLYFISH_COLLIDE = registerSound("jellyfish_collide");
Expand All @@ -47,6 +48,7 @@ public static void registerSounds(Register<SoundEvent> event) {
registry.register(BOBBER_LAND_IN_LAVA);
registry.register(JELLYFISH_FLOP);
registry.register(FISH_FLOP);
registry.register(FISH_AMBIENT);
registry.register(FISH_DEATH);
registry.register(FISH_HURT);
registry.register(JELLYFISH_COLLIDE);
Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/assets/aquaculture/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@
],
"subtitle": "aquaculture.subtitles.fish_flop"
},
"fish_ambient": {
"sounds": [
{
"type": "event",
"name": "aquaculture:silence"
}
],
"subtitle": "aquaculture.subtitles.fish_ambient"
},
"fish_death": {
"sounds": [
{
Expand Down
Binary file not shown.

0 comments on commit 9d43cf0

Please sign in to comment.