Skip to content

Commit

Permalink
Fix #333
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrodynamite18 committed Aug 20, 2024
1 parent 979de56 commit 85ccb00
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21 2024-08-18T11:58:27.6414734 Languages: en_us for mod: deeperdarker
917830f4a7056c3e7430de1fef94adbcf77e58a9 assets/deeperdarker/lang/en_us.json
// 1.21 2024-08-20T17:04:58.8202874 Languages: en_us for mod: deeperdarker
cb9bfc49a8f622e909c1963cb4006a4703852713 assets/deeperdarker/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21 2024-07-09T22:13:00.7719735 Sound Definitions
320837c146a0579577a07a9e8264b2aa14ba6aaa assets/deeperdarker/sounds.json
// 1.21 2024-08-20T17:01:41.2820268 Sound Definitions
945abb0f69d9cfdea8808e45af287b12373c3ccd assets/deeperdarker/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
"subtitles.entity.shattered.ambient": "Shattered growls",
"subtitles.entity.shattered.death": "Shattered dies",
"subtitles.entity.shattered.hurt": "Shattered hurts",
"subtitles.entity.shattered.notice": "Shattered notices",
"subtitles.entity.shriek_worm.ambient": "Shriek Worm cries",
"subtitles.entity.shriek_worm.death": "Shriek Worm dies",
"subtitles.entity.shriek_worm.hurt": "Shriek Worm hurts",
Expand Down
11 changes: 11 additions & 0 deletions src/generated/resources/assets/deeperdarker/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@
],
"subtitle": "subtitles.entity.shattered.hurt"
},
"entity.shattered.notice": {
"sounds": [
"mob/warden/tendril_clicks_1",
"mob/warden/tendril_clicks_2",
"mob/warden/tendril_clicks_3",
"mob/warden/tendril_clicks_4",
"mob/warden/tendril_clicks_5",
"mob/warden/tendril_clicks_6"
],
"subtitle": "subtitles.entity.shattered.notice"
},
"entity.shriek_worm.ambient": {
"sounds": [
"deeperdarker:entity/shriek_worm/ambient1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import com.kyanite.deeperdarker.content.entities.goals.DisturbanceGoal;
import com.kyanite.deeperdarker.content.entities.goals.DisturbanceListener;
import com.kyanite.deeperdarker.util.DDTags;
import java.util.function.BiConsumer;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.tags.GameEventTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.damagesource.DamageSource;
Expand All @@ -30,8 +30,6 @@
import net.minecraft.world.level.gameevent.vibrations.VibrationSystem;
import net.minecraft.world.level.pathfinder.PathType;

import java.util.function.BiConsumer;

@SuppressWarnings("NullableProblems")
public class Shattered extends Monster implements DisturbanceListener, VibrationSystem {
public final AnimationState idleState = new AnimationState();
Expand Down Expand Up @@ -182,7 +180,7 @@ public boolean canReceiveVibration(ServerLevel level, BlockPos pPos, Holder<Game
@Override
public void onReceiveVibration(ServerLevel level, BlockPos pos, Holder<GameEvent> gameEvent, Entity entity, Entity playerEntity, float distance) {
if(isDeadOrDying()) return;
playSound(SoundEvents.WARDEN_TENDRIL_CLICKS, 2, 1);
playSound(DDSounds.SHATTERED_NOTICES.get(), 2, 1);
if(entity != null && canTargetEntity(entity)) {
if(entity instanceof LivingEntity target && !target.getType().is(DDTags.Misc.SCULK)) setTarget(target);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void registerSounds() {
add(DDSounds.SHATTERED_AMBIENT, subtitle("entity.shattered.ambient").with(sound("entity/shattered/ambient1"), sound("entity/shattered/ambient2"), sound("entity/shattered/ambient3")));
add(DDSounds.SHATTERED_DEATH, subtitle("entity.shattered.death").with(sound("entity/shattered/death")));
add(DDSounds.SHATTERED_HURT, subtitle("entity.shattered.hurt").with(sound("entity/shattered/hurt1"), sound("entity/shattered/hurt2"), sound("entity/shattered/hurt3")));
// add(DDSounds.SHATTERED_NOTICES, subtitle("entity.warden.tendril_clicks").with(vanillaSound("entity/warden/tendril_clicks"), )
add(DDSounds.SHATTERED_NOTICES, subtitle("entity.shattered.notice").with(vanillaSound("mob/warden/tendril_clicks_1"), vanillaSound("mob/warden/tendril_clicks_2"), vanillaSound("mob/warden/tendril_clicks_3"), vanillaSound("mob/warden/tendril_clicks_4"), vanillaSound("mob/warden/tendril_clicks_5"), vanillaSound("mob/warden/tendril_clicks_6")));
add(DDSounds.SHRIEK_WORM_AMBIENT, subtitle("entity.shriek_worm.ambient").with(sound("entity/shriek_worm/ambient1"), sound("entity/shriek_worm/ambient2"), sound("entity/shriek_worm/ambient3")));
add(DDSounds.SHRIEK_WORM_DEATH, subtitle("entity.shriek_worm.death").with(sound("entity/shriek_worm/death")));
add(DDSounds.SHRIEK_WORM_HURT, subtitle("entity.shriek_worm.hurt").with(sound("entity/shriek_worm/hurt1"), sound("entity/shriek_worm/hurt2"), sound("entity/shriek_worm/hurt3")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ protected void addTranslations() {
add("subtitles.entity.shattered.ambient", "Shattered growls");
add("subtitles.entity.shattered.death", "Shattered dies");
add("subtitles.entity.shattered.hurt", "Shattered hurts");
add("subtitles.entity.shattered.notice", "Shattered notices");
add("subtitles.entity.shriek_worm.ambient", "Shriek Worm cries");
add("subtitles.entity.shriek_worm.death", "Shriek Worm dies");
add("subtitles.entity.shriek_worm.hurt", "Shriek Worm hurts");
Expand Down

0 comments on commit 85ccb00

Please sign in to comment.