Skip to content

Commit

Permalink
added subtitles for when the sonorous staff is used
Browse files Browse the repository at this point in the history
  • Loading branch information
NewJumper committed Dec 10, 2024
1 parent 7e11a8f commit cc4f399
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21 2024-12-10T14:51:37.7261823 Languages: en_us for mod: deeperdarker
8c8843796958a3b9ec880bdf0ae51858ed4b7632 assets/deeperdarker/lang/en_us.json
// 1.21 2024-12-10T15:46:45.4226519 Languages: en_us for mod: deeperdarker
0351b41695d9aa1d036e8184a6732bc8facf7940 assets/deeperdarker/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.21 2024-08-26T18:36:59.639381 Sound Definitions
ee33d1b15ecbcd4337cbb50e9a85b14d8adf6d15 assets/deeperdarker/sounds.json
// 1.21 2024-12-10T15:46:45.4270759 Sound Definitions
4dfd9091b7d7704f502047fddf1e9001a9b35a89 assets/deeperdarker/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
"subtitles.entity.stalker.death": "Stalker dies",
"subtitles.entity.stalker.hurt": "Stalker hurts",
"subtitles.entity.stalker.notice": "Stalker takes notice",
"subtitles.item.sonorous_staff.sonic_boom": "Staff booms",
"subtitles.item.transmitter.error": "Transmitter fails",
"subtitles.item.transmitter.link": "Transmitter links",
"subtitles.item.transmitter.open": "Transmitter transmits",
Expand Down
9 changes: 9 additions & 0 deletions src/generated/resources/assets/deeperdarker/sounds.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,15 @@
],
"subtitle": "subtitles.entity.stalker.notice"
},
"item.sonorous_staff.sonic_boom": {
"sounds": [
"mob/warden/sonic_boom1",
"mob/warden/sonic_boom2",
"mob/warden/sonic_boom3",
"mob/warden/sonic_boom4"
],
"subtitle": "subtitles.item.sonorous_staff.sonic_boom"
},
"item.transmitter.error": {
"sounds": [
"deeperdarker:item/transmitter/error"
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/kyanite/deeperdarker/content/DDSounds.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public class DDSounds {
public static final DeferredHolder<SoundEvent, SoundEvent> TRANSMITTER_OPEN = register("item.transmitter.open");
public static final DeferredHolder<SoundEvent, SoundEvent> TRANSMITTER_UNLINK = register("item.transmitter.unlink");

public static final DeferredHolder<SoundEvent, SoundEvent> STAFF_SONIC_BOOM = register("item.sonorous_staff.sonic_boom");

private static DeferredHolder<SoundEvent, SoundEvent> register(String sound) {
return SOUND_EVENTS.register(sound, () -> SoundEvent.createVariableRangeEvent(DeeperDarker.rl(sound)));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.kyanite.deeperdarker.content.items;

import com.kyanite.deeperdarker.content.DDItems;
import com.kyanite.deeperdarker.content.DDSounds;
import net.minecraft.core.BlockPos;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
Expand Down Expand Up @@ -63,7 +63,7 @@ public void releaseUsing(ItemStack stack, Level level, LivingEntity livingEntity
}
}

player.playSound(SoundEvents.WARDEN_SONIC_BOOM);
player.playSound(DDSounds.STAFF_SONIC_BOOM.get());
stack.hurtAndBreak(1, player, LivingEntity.getSlotForHand(player.getUsedItemHand()));
player.awardStat(Stats.ITEM_USED.get(this));
player.getCooldowns().addCooldown(this, 20);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public void registerSounds() {
add(DDSounds.MUSIC_BIOME_DEEPLANDS, definition().with(sound("ambience/otherside/deeplands")));
add(DDSounds.MUSIC_BIOME_ECHOING_FOREST, definition().with(sound("ambience/otherside/echoing_forest")));
add(DDSounds.MUSIC_BIOME_OVERCAST_COLUMNS, definition().with(sound("ambience/otherside/overcast_columns")));

add(DDSounds.PORTAL_GROAN, subtitle("ambient.portal.groan").with(sound("ambience/portal/groan1"), sound("ambience/portal/groan2"), sound("ambience/portal/groan3"), sound("ambience/portal/groan4")));
add(DDSounds.SCULK_STONE_BREAK, subtitle("block.generic.break").with(sound("block/sculk_stone/break1"), sound("block/sculk_stone/break2"), sound("block/sculk_stone/break3"), sound("block/sculk_stone/break4"), sound("block/sculk_stone/break5"), sound("block/sculk_stone/break6"), sound("block/sculk_stone/break7")));
add(DDSounds.SCULK_STONE_FALL, definition().with(sound("block/sculk_stone/step1"), sound("block/sculk_stone/step2"), sound("block/sculk_stone/step3"), sound("block/sculk_stone/step4"), sound("block/sculk_stone/step5"), sound("block/sculk_stone/step6")));
Expand All @@ -30,6 +31,7 @@ public void registerSounds() {
add(DDSounds.VASE_HIT, subtitle("block.generic.hit").with(sound("block/vase/step1"), sound("block/vase/step2"), sound("block/vase/step3")));
add(DDSounds.VASE_PLACE, subtitle("block.generic.place").with(sound("block/vase/place1"), sound("block/vase/place2"), sound("block/vase/place3"), sound("block/vase/place4")));
add(DDSounds.VASE_STEP, subtitle("block.generic.footsteps").with(sound("block/vase/step1"), sound("block/vase/step2"), sound("block/vase/step3")));

add(DDSounds.ANGLER_FISH_DEATH, subtitle("entity.angler_fish.death").with(mcSound("entity/fish/hurt1"), mcSound("entity/fish/hurt2"), mcSound("entity/fish/hurt3"), mcSound("entity/fish/hurt4")));
add(DDSounds.ANGLER_FISH_FLOP, subtitle("entity.angler_fish.flop").with(mcSound("entity/fish/flop1"), mcSound("entity/fish/flop2"), mcSound("entity/fish/flop3"), mcSound("entity/fish/flop4")));
add(DDSounds.ANGLER_FISH_HURT, subtitle("entity.angler_fish.hurt").with(mcSound("entity/fish/hurt1"), mcSound("entity/fish/hurt2"), mcSound("entity/fish/hurt3"), mcSound("entity/fish/hurt4")));
Expand All @@ -49,10 +51,12 @@ public void registerSounds() {
add(DDSounds.STALKER_DEATH, subtitle("entity.stalker.death").with(sound("entity/stalker/death")));
add(DDSounds.STALKER_HURT, subtitle("entity.stalker.hurt").with(sound("entity/stalker/hurt1"), sound("entity/stalker/hurt2"), sound("entity/stalker/hurt3"), sound("entity/stalker/hurt4")));
add(DDSounds.STALKER_NOTICE, subtitle("entity.stalker.notice").with(mcSound("mob/warden/tendril_clicks_1"), mcSound("mob/warden/tendril_clicks_2"), mcSound("mob/warden/tendril_clicks_3"), mcSound("mob/warden/tendril_clicks_4"), mcSound("mob/warden/tendril_clicks_5"), mcSound("mob/warden/tendril_clicks_6")));

add(DDSounds.TRANSMITTER_ERROR, subtitle("item.transmitter.error").with(sound("item/transmitter/error")));
add(DDSounds.TRANSMITTER_LINK, subtitle("item.transmitter.link").with(sound("item/transmitter/link")));
add(DDSounds.TRANSMITTER_OPEN, subtitle("item.transmitter.open").with(sound("item/transmitter/open")));
add(DDSounds.TRANSMITTER_UNLINK, subtitle("item.transmitter.unlink").with(sound("item/transmitter/unlink")));
add(DDSounds.STAFF_SONIC_BOOM, subtitle("item.sonorous_staff.sonic_boom").with(mcSound("mob/warden/sonic_boom1"), mcSound("mob/warden/sonic_boom2"), mcSound("mob/warden/sonic_boom3"), mcSound("mob/warden/sonic_boom4")));
}

private SoundDefinition subtitle(String subtitle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ protected void addTranslations() {
add("subtitles.item.transmitter.link", "Transmitter links");
add("subtitles.item.transmitter.open", "Transmitter transmits");
add("subtitles.item.transmitter.unlink", "Transmitter unlinks");
add("subtitles.item.sonorous_staff.sonic_boom", "Staff booms");

add("tag.item." + DeeperDarker.MOD_ID + ".bloom_stems", "Blooming Stems");
add("tag.item." + DeeperDarker.MOD_ID + ".echo_logs", "Echo Logs");
Expand Down

0 comments on commit cc4f399

Please sign in to comment.