Skip to content

Commit

Permalink
feat: rename sound events
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenterius committed Feb 8, 2024
1 parent 7079b3a commit 7211edf
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ public void registerSounds() {
addSimpleSounds(ModSoundEvents.FLESHKIN_CHEST_CLOSE, 2);
addSimpleRedirect(ModSoundEvents.FLESHKIN_CHEST_BITE_ATTACK, SoundEvents.GOAT_SCREAMING_RAM_IMPACT, 1f, 0.5f);

addSimpleRedirect(ModSoundEvents.CREATOR_SPIKE_ATTACK, SoundEvents.GOAT_SCREAMING_RAM_IMPACT, 1f, 0.5f);
addSimpleRedirect(ModSoundEvents.CREATOR_CRAFTING_RANDOM, SoundEvents.PLAYER_BURP, 1f, 0.5f);
addSimpleRedirect(ModSoundEvents.CREATOR_SPAWN_MOB, SoundEvents.PLAYER_BURP, 1f, 0.5f);
addSimpleRedirect(ModSoundEvents.CREATOR_BECAME_FULL, SoundEvents.PLAYER_BURP, 1f, 0.25f);
addSimpleRedirect(ModSoundEvents.CREATOR_EAT, SoundEvents.GOAT_SCREAMING_EAT, 1f, 0.25f);
addSimpleRedirect(ModSoundEvents.CREATOR_NO, SoundEvents.VILLAGER_NO, 0.75f, 0.3f);
addSimpleRedirect(ModSoundEvents.CRADLE_SPIKE_ATTACK, SoundEvents.GOAT_SCREAMING_RAM_IMPACT, 1f, 0.5f);
addSimpleRedirect(ModSoundEvents.CRADLE_CRAFTING_RANDOM, SoundEvents.PLAYER_BURP, 1f, 0.5f);
addSimpleRedirect(ModSoundEvents.CRADLE_SPAWN_MOB, SoundEvents.PLAYER_BURP, 1f, 0.5f);
addSimpleRedirect(ModSoundEvents.CRADLE_BECAME_FULL, SoundEvents.PLAYER_BURP, 1f, 0.25f);
addSimpleRedirect(ModSoundEvents.CRADLE_EAT, SoundEvents.GOAT_SCREAMING_EAT, 1f, 0.25f);
addSimpleRedirect(ModSoundEvents.CRADLE_NO, SoundEvents.VILLAGER_NO, 0.75f, 0.3f);

addSimpleRedirect(ModSoundEvents.UI_BUTTON_CLICK, SoundEvents.UI_BUTTON_CLICK.get());
addSimpleSound(ModSoundEvents.UI_MENU_OPEN);
Expand Down Expand Up @@ -91,8 +91,8 @@ public void registerSounds() {
addSimpleRedirect(ModSoundEvents.FLESH_BLOB_HURT, ModSoundEvents.FLESH_BLOCK_BREAK, 0.8f, 0.9f);
addSimpleRedirect(ModSoundEvents.FLESH_BLOB_DEATH, SoundEvents.GENERIC_DEATH);
addSimpleSounds(ModSoundEvents.FLESH_BLOB_AMBIENT, 3, 0.8f, 0.9f);
addSimpleSound(ModSoundEvents.GENERIC_MEW_PURR, 0.7f, 0.45f);
addSimpleSound(ModSoundEvents.GENERIC_GROWL, 0.9f, 0.55f);
addSimpleSound(ModSoundEvents.FLESH_BLOB_MEW_PURR, 0.7f, 0.45f);
addSimpleSound(ModSoundEvents.FLESH_BLOB_GROWL, 0.9f, 0.55f);
}

public String translationKey(RegistryObject<SoundEvent> soundHolder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private void addSoundTranslations() {

addSound(ModSoundEvents.CLAWS_ATTACK_STRONG, "Strong Claw Attack");
addSound(ModSoundEvents.CLAWS_ATTACK_BLEED_PROC, "Eviscerating Slash triggers");
addSound(ModSoundEvents.FLESHKIN_NO, "Fleshkin says No");
addSound(ModSoundEvents.FLESHKIN_NO, "Fleshkin disagrees");
addSound(ModSoundEvents.FLESHKIN_BREAK, "Fleshkin Break");
addSound(ModSoundEvents.FLESHKIN_BECOME_DORMANT, "Fleshkin becomes Dormant");
addSound(ModSoundEvents.FLESHKIN_BECOME_AWAKENED, "Fleshkin becomes Awakened");
Expand All @@ -296,10 +296,12 @@ private void addSoundTranslations() {
addSound(ModSoundEvents.FLESHKIN_CHEST_CLOSE, "Close Fleshy Chest");
addSound(ModSoundEvents.FLESHKIN_CHEST_BITE_ATTACK, "Fleshy Chest Bite Attack");

addSound(ModSoundEvents.CREATOR_SPAWN_MOB, "Primordial Cradle Spawns a Mob");
addSound(ModSoundEvents.CREATOR_BECAME_FULL, "Primordial Cradle became full");
addSound(ModSoundEvents.CREATOR_EAT, "Primordial Cradle Eating");
addSound(ModSoundEvents.CREATOR_NO, "Primordial Cradle says No");
addSound(ModSoundEvents.CRADLE_SPAWN_MOB, "Primordial Cradle Spawns a Mob");
addSound(ModSoundEvents.CRADLE_BECAME_FULL, "Primordial Cradle became full");
addSound(ModSoundEvents.CRADLE_EAT, "Primordial Cradle Eating");
addSound(ModSoundEvents.CRADLE_NO, "Primordial Cradle disagrees");
addSound(ModSoundEvents.CRADLE_CRAFTING_RANDOM, "Primordial Cradle is summoning");
addSound(ModSoundEvents.CRADLE_SPIKE_ATTACK, "Primordial Cradle attacks");

addSound(ModSoundEvents.UI_STORAGE_SAC_OPEN, "Open Menu of Storage Sac");
addSound(ModSoundEvents.UI_BIO_FORGE_OPEN, "Open Menu of Bio-Forge");
Expand All @@ -324,11 +326,10 @@ private void addSoundTranslations() {

addSound(ModSoundEvents.FLESH_BLOB_JUMP, "Flesh Blob Jump");
addSound(ModSoundEvents.FLESH_BLOB_HURT, "Flesh Blob Hurt");
addSound(ModSoundEvents.FLESH_BLOB_AMBIENT, "Flesh Blob Ambient");
addSound(ModSoundEvents.FLESH_BLOB_DEATH, "Flesh Blob Death");

addSound(ModSoundEvents.GENERIC_GROWL, "Mob Growls");
addSound(ModSoundEvents.GENERIC_MEW_PURR, "Mob Purrs");
addSound(ModSoundEvents.FLESH_BLOB_AMBIENT, "Flesh Blob Ambient");
addSound(ModSoundEvents.FLESH_BLOB_GROWL, "Flesh Blob Growls");
addSound(ModSoundEvents.FLESH_BLOB_MEW_PURR, "Flesh Blob Purrs");
}

private void addDamageTranslations() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,12 @@ private void addSoundTranslations() {
addSound(ModSoundEvents.FLESHKIN_CHEST_CLOSE, "Close Squidgy Chest");
addSound(ModSoundEvents.FLESHKIN_CHEST_BITE_ATTACK, "Squidgy Chest Bites Somethin'");

addSound(ModSoundEvents.CREATOR_SPAWN_MOB, "Summonin' Cauldron Spawns a Mob");
addSound(ModSoundEvents.CREATOR_BECAME_FULL, "Summonin' Cauldron is full");
addSound(ModSoundEvents.CREATOR_EAT, "Summonin' Cauldron Munchin'");
addSound(ModSoundEvents.CREATOR_NO, "Summonin' Cauldron sayin' Nay");
addSound(ModSoundEvents.CRADLE_SPAWN_MOB, "Summonin' Cauldron Spawns a Mob");
addSound(ModSoundEvents.CRADLE_BECAME_FULL, "Summonin' Cauldron is full");
addSound(ModSoundEvents.CRADLE_EAT, "Summonin' Cauldron Munchin'");
addSound(ModSoundEvents.CRADLE_NO, "Summonin' Cauldron sayin' Nay");
addSound(ModSoundEvents.CRADLE_CRAFTING_RANDOM, "Summonin' Cauldron is summonin'");
addSound(ModSoundEvents.CRADLE_SPIKE_ATTACK, "Summonin' Cauldron attacks");

addSound(ModSoundEvents.UI_STORAGE_SAC_OPEN, "Open Menu of Lootin' Sac");
addSound(ModSoundEvents.UI_BIO_FORGE_OPEN, "Open Menu of Forge o' Flesh");
Expand All @@ -324,6 +326,10 @@ private void addSoundTranslations() {

addSound(ModSoundEvents.FLESH_BLOB_JUMP, "Cube o' Flesh Jump");
addSound(ModSoundEvents.FLESH_BLOB_HURT, "Cube o' Flesh Hurt");
addSound(ModSoundEvents.FLESH_BLOB_DEATH, "Cube o' Flesh Death");
addSound(ModSoundEvents.FLESH_BLOB_AMBIENT, "Cube o' Flesh Ambient");
addSound(ModSoundEvents.FLESH_BLOB_GROWL, "Cube o' Flesh Growls");
addSound(ModSoundEvents.FLESH_BLOB_MEW_PURR, "Cube o' Flesh Purrs");
}

private void addDamageTranslations() {
Expand Down
14 changes: 10 additions & 4 deletions src/generated/resources/assets/biomancy/lang/en_pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,12 @@
"sounds.biomancy.fleshkin_chest.open": "Open Squidgy Chest",
"sounds.biomancy.fleshkin_chest.close": "Close Squidgy Chest",
"sounds.biomancy.fleshkin_chest.bite_attack": "Squidgy Chest Bites Somethin'",
"sounds.biomancy.block.creator.spawn_mob": "Summonin' Cauldron Spawns a Mob",
"sounds.biomancy.block.creator.became_full": "Summonin' Cauldron is full",
"sounds.biomancy.block.creator.eat": "Summonin' Cauldron Munchin'",
"sounds.biomancy.block.creator.no": "Summonin' Cauldron sayin' Nay",
"sounds.biomancy.block.cradle.spawn_mob": "Summonin' Cauldron Spawns a Mob",
"sounds.biomancy.block.cradle.became_full": "Summonin' Cauldron is full",
"sounds.biomancy.block.cradle.eat": "Summonin' Cauldron Munchin'",
"sounds.biomancy.block.cradle.no": "Summonin' Cauldron sayin' Nay",
"sounds.biomancy.block.cradle.crafting_random": "Summonin' Cauldron is summonin'",
"sounds.biomancy.cradle.spike_attack": "Summonin' Cauldron attacks",
"sounds.biomancy.ui.storage_sac.open": "Open Menu of Lootin' Sac",
"sounds.biomancy.ui.bio_forge.open": "Open Menu of Forge o' Flesh",
"sounds.biomancy.ui.bio_forge.select_recipe": "Choose yer Recipe in Forge o' Flesh",
Expand All @@ -369,6 +371,10 @@
"sounds.biomancy.block.digester.crafting_completed": "Stomach Rumbler be finished craftin'",
"sounds.biomancy.entity.flesh_blob.jump": "Cube o' Flesh Jump",
"sounds.biomancy.entity.flesh_blob.hurt": "Cube o' Flesh Hurt",
"sounds.biomancy.entity.flesh_blob.death": "Cube o' Flesh Death",
"sounds.biomancy.entity.flesh_blob.ambient": "Cube o' Flesh Ambient",
"sounds.biomancy.entity.flesh_blob.growl": "Cube o' Flesh Growls",
"sounds.biomancy.entity.flesh_blob.mew_purr": "Cube o' Flesh Purrs",
"block.minecraft.banner.biomancy.mascot_base.white": "White Mascot Base",
"block.minecraft.banner.biomancy.mascot_base.orange": "Orange Mascot Base",
"block.minecraft.banner.biomancy.mascot_base.magenta": "Magenta Mascot Base",
Expand Down
16 changes: 11 additions & 5 deletions src/generated/resources/assets/biomancy/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,17 +339,19 @@
"sounds.biomancy.flesh_door.close": "Close Fleshy Door",
"sounds.biomancy.claws.attack.strong": "Strong Claw Attack",
"sounds.biomancy.claws.attack.bleed_proc": "Eviscerating Slash triggers",
"sounds.biomancy.fleshkin.no": "Fleshkin says No",
"sounds.biomancy.fleshkin.no": "Fleshkin disagrees",
"sounds.biomancy.fleshkin.break": "Fleshkin Break",
"sounds.biomancy.fleshkin.dormant": "Fleshkin becomes Dormant",
"sounds.biomancy.fleshkin.awakened": "Fleshkin becomes Awakened",
"sounds.biomancy.fleshkin_chest.open": "Open Fleshy Chest",
"sounds.biomancy.fleshkin_chest.close": "Close Fleshy Chest",
"sounds.biomancy.fleshkin_chest.bite_attack": "Fleshy Chest Bite Attack",
"sounds.biomancy.block.creator.spawn_mob": "Primordial Cradle Spawns a Mob",
"sounds.biomancy.block.creator.became_full": "Primordial Cradle became full",
"sounds.biomancy.block.creator.eat": "Primordial Cradle Eating",
"sounds.biomancy.block.creator.no": "Primordial Cradle says No",
"sounds.biomancy.block.cradle.spawn_mob": "Primordial Cradle Spawns a Mob",
"sounds.biomancy.block.cradle.became_full": "Primordial Cradle became full",
"sounds.biomancy.block.cradle.eat": "Primordial Cradle Eating",
"sounds.biomancy.block.cradle.no": "Primordial Cradle disagrees",
"sounds.biomancy.block.cradle.crafting_random": "Primordial Cradle is summoning",
"sounds.biomancy.cradle.spike_attack": "Primordial Cradle attacks",
"sounds.biomancy.ui.storage_sac.open": "Open Menu of Storage Sac",
"sounds.biomancy.ui.bio_forge.open": "Open Menu of Bio-Forge",
"sounds.biomancy.ui.bio_forge.select_recipe": "Select Recipe in Bio-Forge",
Expand All @@ -369,6 +371,10 @@
"sounds.biomancy.block.digester.crafting_completed": "Digester finished crafting",
"sounds.biomancy.entity.flesh_blob.jump": "Flesh Blob Jump",
"sounds.biomancy.entity.flesh_blob.hurt": "Flesh Blob Hurt",
"sounds.biomancy.entity.flesh_blob.death": "Flesh Blob Death",
"sounds.biomancy.entity.flesh_blob.ambient": "Flesh Blob Ambient",
"sounds.biomancy.entity.flesh_blob.growl": "Flesh Blob Growls",
"sounds.biomancy.entity.flesh_blob.mew_purr": "Flesh Blob Purrs",
"block.minecraft.banner.biomancy.mascot_base.white": "White Mascot Base",
"block.minecraft.banner.biomancy.mascot_base.orange": "Orange Mascot Base",
"block.minecraft.banner.biomancy.mascot_base.magenta": "Magenta Mascot Base",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ else if (isPotion && stack.isEmpty()) {
return InteractionResult.SUCCESS;
}
if (!level.isClientSide) {
SoundUtil.broadcastBlockSound((ServerLevel) level, pos, ModSoundEvents.CREATOR_NO);
SoundUtil.broadcastBlockSound((ServerLevel) level, pos, ModSoundEvents.CRADLE_NO);
}

return InteractionResult.CONSUME;
Expand Down Expand Up @@ -187,7 +187,7 @@ private boolean increaseFillLevel(@Nullable Entity player, Level level, BlockPos
if (player instanceof ServerPlayer serverPlayer) {
ModTriggers.SACRIFICED_ITEM_TRIGGER.trigger(serverPlayer, copyOfStack);
}
SoundEvent soundEvent = creator.isFull() ? ModSoundEvents.CREATOR_BECAME_FULL.get() : ModSoundEvents.CREATOR_EAT.get();
SoundEvent soundEvent = creator.isFull() ? ModSoundEvents.CRADLE_BECAME_FULL.get() : ModSoundEvents.CRADLE_EAT.get();
SoundUtil.broadcastBlockSound((ServerLevel) level, pos, soundEvent);
return true;
}
Expand Down Expand Up @@ -217,7 +217,7 @@ public void animateTick(BlockState state, Level level, BlockPos pos, RandomSourc
level.addParticle(ParticleTypes.ENTITY_EFFECT, pos.getX() + ((random.nextFloat() * 0.60625) + 0.13125f), pos.getY() + 0.5f, pos.getZ() + ((random.nextFloat() * 0.60625) + 0.13125f), r, g, b);
}
if (random.nextInt(3) == 0) {
SoundUtil.clientPlayBlockSound(level, pos, ModSoundEvents.CREATOR_CRAFTING_RANDOM, 0.85f);
SoundUtil.clientPlayBlockSound(level, pos, ModSoundEvents.CRADLE_CRAFTING_RANDOM, 0.85f);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void onSacrifice(ServerLevel level) {
}

addPrimalEnergy(Math.round(2048 * energyMultiplier));
SoundUtil.broadcastBlockSound(level, pos, ModSoundEvents.CREATOR_SPAWN_MOB);
SoundUtil.broadcastBlockSound(level, pos, ModSoundEvents.CRADLE_SPAWN_MOB);
}

PrimordialEcosystem.tryToReplaceBlock(level, pos.below(), ModBlocks.MALIGNANT_FLESH.get().defaultBlockState());
Expand All @@ -199,7 +199,7 @@ public void onSacrifice(ServerLevel level) {
}
else {
attackAOE(level, pos);
SoundUtil.broadcastBlockSound(level, pos, ModSoundEvents.CREATOR_SPIKE_ATTACK);
SoundUtil.broadcastBlockSound(level, pos, ModSoundEvents.CRADLE_SPIKE_ATTACK);

PrimordialEcosystem.tryToReplaceBlock(level, pos.below(), ModBlocks.MALIGNANT_FLESH.get().defaultBlockState());
PrimordialEcosystem.spreadMalignantVeinsFromSource(level, pos, PrimordialEcosystem.MAX_CHARGE_SUPPLIER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected boolean isValidTarget(LevelReader level, BlockPos pos) {

private boolean sacrificeItem(Level level, BlockPos pos, PrimordialCradleBlockEntity cradle, ItemStack stack) {
if (!cradle.isFull() && cradle.insertItem(stack)) {
SoundEvent soundEvent = cradle.isFull() ? ModSoundEvents.CREATOR_BECAME_FULL.get() : ModSoundEvents.CREATOR_EAT.get();
SoundEvent soundEvent = cradle.isFull() ? ModSoundEvents.CRADLE_BECAME_FULL.get() : ModSoundEvents.CRADLE_EAT.get();
SoundUtil.broadcastBlockSound((ServerLevel) level, pos, soundEvent);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,12 @@ protected InteractionResult mobInteract(Player player, InteractionHand hand) {
pettingDelay = random.nextIntBetweenInclusive(10, 20);

if (this instanceof Enemy) {
playSound(ModSoundEvents.GENERIC_GROWL.get(), getSoundVolume(), getVoicePitch());
playSound(ModSoundEvents.FLESH_BLOB_GROWL.get(), getSoundVolume(), getVoicePitch());
double offset = getBbWidth() * 0.5d;
((ServerLevel) level()).sendParticles(ParticleTypes.ANGRY_VILLAGER, getX(), getY(1d) - 0.2d, getZ(), 3, offset, 0.1d, offset, 1);
}
else {
playSound(ModSoundEvents.GENERIC_MEW_PURR.get(), getSoundVolume(), getVoicePitch());
playSound(ModSoundEvents.FLESH_BLOB_MEW_PURR.get(), getSoundVolume(), getVoicePitch());
double offset = getBbWidth() * 0.5d;
((ServerLevel) level()).sendParticles(ParticleTypes.HEART, getX(), getY(1d) - 0.2d, getZ(), 3, offset, 0.1d, offset, 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public final class ModSoundEvents {
public static final RegistryObject<SoundEvent> FLESHKIN_CHEST_OPEN = register("fleshkin_chest.open");
public static final RegistryObject<SoundEvent> FLESHKIN_CHEST_CLOSE = register("fleshkin_chest.close");
public static final RegistryObject<SoundEvent> FLESHKIN_CHEST_BITE_ATTACK = register("fleshkin_chest.bite_attack");
public static final RegistryObject<SoundEvent> CREATOR_SPIKE_ATTACK = register("creator.spike_attack");
public static final RegistryObject<SoundEvent> CREATOR_CRAFTING_RANDOM = register("block.creator.crafting_random");
public static final RegistryObject<SoundEvent> CREATOR_SPAWN_MOB = register("block.creator.spawn_mob");
public static final RegistryObject<SoundEvent> CREATOR_BECAME_FULL = register("block.creator.became_full");
public static final RegistryObject<SoundEvent> CREATOR_EAT = register("block.creator.eat");
public static final RegistryObject<SoundEvent> CREATOR_NO = register("block.creator.no");
public static final RegistryObject<SoundEvent> CRADLE_SPIKE_ATTACK = register("cradle.spike_attack");
public static final RegistryObject<SoundEvent> CRADLE_CRAFTING_RANDOM = register("block.cradle.crafting_random");
public static final RegistryObject<SoundEvent> CRADLE_SPAWN_MOB = register("block.cradle.spawn_mob");
public static final RegistryObject<SoundEvent> CRADLE_BECAME_FULL = register("block.cradle.became_full");
public static final RegistryObject<SoundEvent> CRADLE_EAT = register("block.cradle.eat");
public static final RegistryObject<SoundEvent> CRADLE_NO = register("block.cradle.no");

//## Crafting
public static final RegistryObject<SoundEvent> DECOMPOSER_CRAFTING = register("block.decomposer.crafting");
Expand Down Expand Up @@ -82,10 +82,8 @@ public final class ModSoundEvents {
public static final RegistryObject<SoundEvent> FLESH_BLOB_HURT = register("entity.flesh_blob.hurt");
public static final RegistryObject<SoundEvent> FLESH_BLOB_DEATH = register("entity.flesh_blob.death");
public static final RegistryObject<SoundEvent> FLESH_BLOB_AMBIENT = register("entity.flesh_blob.ambient");

//## Generic
public static final RegistryObject<SoundEvent> GENERIC_MEW_PURR = register("entity.generic.mew_purr");
public static final RegistryObject<SoundEvent> GENERIC_GROWL = register("entity.generic.growl");
public static final RegistryObject<SoundEvent> FLESH_BLOB_MEW_PURR = register("entity.flesh_blob.mew_purr");
public static final RegistryObject<SoundEvent> FLESH_BLOB_GROWL = register("entity.flesh_blob.growl");

private ModSoundEvents() {}

Expand Down

0 comments on commit 7211edf

Please sign in to comment.