diff --git a/src/generated/resources/.cache/735031f3addf80804addae5e3f53249900116f1e b/src/generated/resources/.cache/735031f3addf80804addae5e3f53249900116f1e
new file mode 100644
index 00000000..37c1ebe0
--- /dev/null
+++ b/src/generated/resources/.cache/735031f3addf80804addae5e3f53249900116f1e
@@ -0,0 +1,2 @@
+// 1.20.4 2024-06-12T10:32:23.9830236 Sound Definitions
+33424544e6cf49e7ad5d1a6a9bc815d66be63114 assets/exdeorum/sounds.json
diff --git a/src/generated/resources/.cache/93943142017732f21fbc4fa325d116c728b69767 b/src/generated/resources/.cache/93943142017732f21fbc4fa325d116c728b69767
index 6f5fd76d..c8d697a6 100644
--- a/src/generated/resources/.cache/93943142017732f21fbc4fa325d116c728b69767
+++ b/src/generated/resources/.cache/93943142017732f21fbc4fa325d116c728b69767
@@ -1,2 +1,2 @@
-// 1.20.4 2024-06-12T10:12:55.8210228 ModKit Language: en_us for mod 'exdeorum'
-1c3e155c259b1fbba3d91755c10e202362f564af assets/exdeorum/lang/en_us.json
+// 1.20.4 2024-06-12T10:32:23.9770218 ModKit Language: en_us for mod 'exdeorum'
+1715a568c7ece192fb6306a2ea50ea7af7879e70 assets/exdeorum/lang/en_us.json
diff --git a/src/generated/resources/assets/exdeorum/lang/en_us.json b/src/generated/resources/assets/exdeorum/lang/en_us.json
index dee2a674..a7f61c9c 100644
--- a/src/generated/resources/assets/exdeorum/lang/en_us.json
+++ b/src/generated/resources/assets/exdeorum/lang/en_us.json
@@ -297,6 +297,17 @@
"item.exdeorum.wooden_watering_can": "Wooden Watering Can",
"item.exdeorum.zinc_ore_chunk": "Zinc Ore Chunk",
"itemGroup.exdeorum.main": "Ex Deorum",
+ "subtitles.exdeorum.barrel.add_compost": "Added barrel compost",
+ "subtitles.exdeorum.barrel.compost_finish": "Barrel compost finished",
+ "subtitles.exdeorum.barrel.fluid_transform": "Mechanical Hammer",
+ "subtitles.exdeorum.barrel.mixing_finish": "Barrel mixing finished",
+ "subtitles.exdeorum.grass_seeds.place": "Mechanical Hammer",
+ "subtitles.exdeorum.sculk_core.activate": "Mechanical Hammer",
+ "subtitles.exdeorum.silk_worm.drop": "Mechanical Hammer",
+ "subtitles.exdeorum.silk_worm.eat": "Mechanical Hammer",
+ "subtitles.exdeorum.silk_worm.infest": "Mechanical Hammer",
+ "subtitles.exdeorum.watering_can.stop": "Mechanical Hammer",
+ "subtitles.exdeorum.watering_can.use": "Mechanical Hammer",
"tag.item.exdeorum.barrels": "Barrels",
"tag.item.exdeorum.compressed.andesite": "Compressed Andesite",
"tag.item.exdeorum.compressed.blackstone": "Compressed Blackstone",
diff --git a/src/generated/resources/assets/exdeorum/sounds.json b/src/generated/resources/assets/exdeorum/sounds.json
new file mode 100644
index 00000000..2f21d04f
--- /dev/null
+++ b/src/generated/resources/assets/exdeorum/sounds.json
@@ -0,0 +1,106 @@
+{
+ "barrel_add_compost": {
+ "sounds": [
+ "block/composter/fill1",
+ "block/composter/fill2",
+ "block/composter/fill3",
+ "block/composter/fill4"
+ ],
+ "subtitle": "subtitles.exdeorum.barrel.add_compost"
+ },
+ "barrel_compost_finish": {
+ "sounds": [
+ "block/composter/ready1",
+ "block/composter/ready2",
+ "block/composter/ready3",
+ "block/composter/ready4"
+ ],
+ "subtitle": "subtitles.exdeorum.barrel.compost_finish"
+ },
+ "barrel_fluid_transform": {
+ "sounds": [
+ "block/brewing_stand/brew1",
+ "block/brewing_stand/brew2"
+ ],
+ "subtitle": "subtitles.exdeorum.barrel.fluid_transform"
+ },
+ "barrel_mixing": {
+ "sounds": [
+ "exdeorum:block/barrel/mix1",
+ "exdeorum:block/barrel/mix2",
+ "exdeorum:block/barrel/mix3"
+ ],
+ "subtitle": "subtitles.exdeorum.barrel.mixing_finish"
+ },
+ "grass_seeds_place": {
+ "sounds": [
+ "block/rooted_dirt/break1",
+ "block/rooted_dirt/break2",
+ "block/rooted_dirt/break3",
+ "block/rooted_dirt/break4"
+ ],
+ "subtitle": "subtitles.exdeorum.grass_seeds.place"
+ },
+ "sculk_core_activate": {
+ "sounds": [
+ "block/sculk_shrieker/shriek1",
+ "block/sculk_shrieker/shriek2",
+ "block/sculk_shrieker/shriek3",
+ "block/sculk_shrieker/shriek4",
+ "block/sculk_shrieker/shriek5"
+ ],
+ "subtitle": "subtitles.exdeorum.sculk_core.activate"
+ },
+ "silk_worm_drop": {
+ "sounds": [
+ "block/honeyblock/break1",
+ "block/honeyblock/break2",
+ "block/honeyblock/break3",
+ "block/honeyblock/break4",
+ "block/honeyblock/break5"
+ ],
+ "subtitle": "subtitles.exdeorum.silk_worm.drop"
+ },
+ "silk_worm_eat": {
+ "sounds": [
+ "block/roots/break1",
+ "block/roots/break2",
+ "block/roots/break3",
+ "block/roots/break4",
+ "block/roots/break5",
+ "block/roots/break6"
+ ],
+ "subtitle": "subtitles.exdeorum.silk_worm.eat"
+ },
+ "silk_worm_infest": {
+ "sounds": [
+ "block/honeyblock/break1",
+ "block/honeyblock/break2",
+ "block/honeyblock/break3",
+ "block/honeyblock/break4",
+ "block/honeyblock/break5"
+ ],
+ "subtitle": "subtitles.exdeorum.silk_worm.infest"
+ },
+ "watering_can_stop": {
+ "sounds": [
+ "item/bucket/fill1",
+ "item/bucket/fill2",
+ "item/bucket/fill3"
+ ],
+ "subtitle": "subtitles.exdeorum.watering_can.stop"
+ },
+ "watering_can_use": {
+ "sounds": [
+ "ambient/weather/rain1",
+ "ambient/weather/rain2",
+ "ambient/weather/rain3",
+ "ambient/weather/rain4",
+ "ambient/weather/rain5",
+ "ambient/weather/rain6",
+ "ambient/weather/rain7",
+ "ambient/weather/rain8"
+ ],
+ "subtitle": "subtitles.exdeorum.watering_can.use"
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/thedarkcolour/exdeorum/ExDeorum.java b/src/main/java/thedarkcolour/exdeorum/ExDeorum.java
index ff4a1c56..e291e652 100644
--- a/src/main/java/thedarkcolour/exdeorum/ExDeorum.java
+++ b/src/main/java/thedarkcolour/exdeorum/ExDeorum.java
@@ -79,6 +79,7 @@ public class ExDeorum {
EGlobalLootModifiers.GLOBAL_LOOT_MODIFIERS.register(modBus);
EItems.ITEMS.register(modBus);
ELootFunctions.LOOT_FUNCTIONS.register(modBus);
+ ESounds.SOUNDS.register(modBus);
EMenus.MENUS.register(modBus);
ERecipeSerializers.RECIPE_SERIALIZERS.register(modBus);
ERecipeTypes.RECIPE_TYPES.register(modBus);
diff --git a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java
index b324b731..8f9f10e1 100644
--- a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java
+++ b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java
@@ -64,6 +64,7 @@ import thedarkcolour.exdeorum.recipe.RecipeUtil;
import thedarkcolour.exdeorum.recipe.barrel.BarrelFluidMixingRecipe;
import thedarkcolour.exdeorum.recipe.barrel.FluidTransformationRecipe;
import thedarkcolour.exdeorum.registry.EBlockEntities;
+import thedarkcolour.exdeorum.registry.ESounds;
public class BarrelBlockEntity extends EBlockEntity {
private static final int MOSS_SPREAD_RANGE = 2;
@@ -372,7 +373,7 @@ public class BarrelBlockEntity extends EBlockEntity {
this.tank.drain(recipe.fluidAmount, IFluidHandler.FluidAction.EXECUTE);
// Replace fluid with result
setItem(new ItemStack(recipe.result));
- this.level.playSound(null, this.worldPosition, SoundEvents.AMBIENT_UNDERWATER_EXIT, SoundSource.BLOCKS, 0.8f, 0.8f);
+ this.level.playSound(null, this.worldPosition, ESounds.BARREL_MIXING.get(), SoundSource.BLOCKS, 0.8f, 1.0f);
}
// Mixing was successful, so return true
return true;
@@ -413,7 +414,7 @@ public class BarrelBlockEntity extends EBlockEntity {
this.b = (short) (weightNew * color.z + weightOld * this.b);
}
- this.level.playSound(null, this.worldPosition, SoundEvents.COMPOSTER_FILL, SoundSource.BLOCKS);
+ this.level.playSound(null, this.worldPosition, ESounds.BARREL_ADD_COMPOST.get(), SoundSource.BLOCKS);
}
/**
@@ -527,7 +528,7 @@ public class BarrelBlockEntity extends EBlockEntity {
if (barrel.progress >= 1.0f - Mth.EPSILON) {
// Reset progress
barrel.progress = 0.0f;
- level.playSound(null, pos, SoundEvents.BREWING_STAND_BREW, SoundSource.BLOCKS, 1.0f, 0.6f);
+ level.playSound(null, pos, ESounds.BARREL_FLUID_TRANSFORM.get(), SoundSource.BLOCKS, 1.0f, 0.6f);
tank.setFluid(FluidStack.EMPTY);
tank.fill(new FluidStack(recipe.resultFluid(), 1000), IFluidHandler.FluidAction.EXECUTE);
}
@@ -584,7 +585,7 @@ public class BarrelBlockEntity extends EBlockEntity {
this.progress = 0.0f;
this.compost = 0;
setItem(new ItemStack(Items.DIRT));
- this.level.playSound(null, this.worldPosition, SoundEvents.COMPOSTER_READY, SoundSource.BLOCKS);
+ this.level.playSound(null, this.worldPosition, ESounds.BARREL_COMPOST.get(), SoundSource.BLOCKS);
}
}
diff --git a/src/main/java/thedarkcolour/exdeorum/data/Data.java b/src/main/java/thedarkcolour/exdeorum/data/Data.java
index db938332..7ea5a98b 100644
--- a/src/main/java/thedarkcolour/exdeorum/data/Data.java
+++ b/src/main/java/thedarkcolour/exdeorum/data/Data.java
@@ -47,5 +47,6 @@ public class Data {
gen.addProvider(true, new LootTables(output));
gen.addProvider(true, new Advancements(output, lookup, helper));
+ gen.addProvider(true, new Sounds(output, helper));
}
}
diff --git a/src/main/java/thedarkcolour/exdeorum/data/English.java b/src/main/java/thedarkcolour/exdeorum/data/English.java
index ad864ab0..cca41cd2 100644
--- a/src/main/java/thedarkcolour/exdeorum/data/English.java
+++ b/src/main/java/thedarkcolour/exdeorum/data/English.java
@@ -116,6 +116,18 @@ class English {
english.add(TranslationKeys.REDSTONE_CONTROL_MODE, "Mode: ");
english.add(TranslationKeys.MECHANICAL_HAMMER_SCREEN_TITLE, "Mechanical Hammer");
+ english.add(TranslationKeys.BARREL_ADD_COMPOST_SUBTITLE, "Added barrel compost");
+ english.add(TranslationKeys.BARREL_COMPOST_SUBTITLE, "Barrel compost finished");
+ english.add(TranslationKeys.BARREL_MIXING_SUBTITLE, "Barrel mixing finished");
+ english.add(TranslationKeys.BARREL_FLUID_TRANSFORM_SUBTITLE, "Mechanical Hammer");
+ english.add(TranslationKeys.SILK_WORM_DROP_SUBTITLE, "Mechanical Hammer");
+ english.add(TranslationKeys.SILK_WORM_INFEST_SUBTITLE, "Mechanical Hammer");
+ english.add(TranslationKeys.SILK_WORM_EAT_SUBTITLE, "Mechanical Hammer");
+ english.add(TranslationKeys.GRASS_SEEDS_PLACE_SUBTITLE, "Mechanical Hammer");
+ english.add(TranslationKeys.SCULK_CORE_ACTIVATE_SUBTITLE, "Mechanical Hammer");
+ english.add(TranslationKeys.WATERING_CAN_USE_SUBTITLE, "Mechanical Hammer");
+ english.add(TranslationKeys.WATERING_CAN_STOP_SUBTITLE, "Mechanical Hammer");
+
english.add(DefaultMaterials.VEXING_ARCHWOOD_CRUCIBLE.getBlock(), "Vexing Archwood Crucible");
english.add(DefaultMaterials.CASCADING_ARCHWOOD_CRUCIBLE.getBlock(), "Cascading Archwood Crucible");
english.add(DefaultMaterials.BLAZING_ARCHWOOD_CRUCIBLE.getBlock(), "Blazing Archwood Crucible");
diff --git a/src/main/java/thedarkcolour/exdeorum/data/Sounds.java b/src/main/java/thedarkcolour/exdeorum/data/Sounds.java
new file mode 100644
index 00000000..d4b31fec
--- /dev/null
+++ b/src/main/java/thedarkcolour/exdeorum/data/Sounds.java
@@ -0,0 +1,56 @@
+/*
+ * Ex Deorum
+ * Copyright (c) 2024 thedarkcolour
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package thedarkcolour.exdeorum.data;
+
+import net.minecraft.data.PackOutput;
+import net.neoforged.neoforge.common.data.ExistingFileHelper;
+import net.neoforged.neoforge.common.data.SoundDefinition;
+import net.neoforged.neoforge.common.data.SoundDefinitionsProvider;
+import thedarkcolour.exdeorum.ExDeorum;
+import thedarkcolour.exdeorum.registry.ESounds;
+
+class Sounds extends SoundDefinitionsProvider {
+ protected Sounds(PackOutput output, ExistingFileHelper helper) {
+ super(output, ExDeorum.ID, helper);
+ }
+
+ @Override
+ public void registerSounds() {
+ add(ESounds.BARREL_ADD_COMPOST.getId(), withVariations(TranslationKeys.BARREL_ADD_COMPOST_SUBTITLE, "block/composter/fill", 4));
+ add(ESounds.BARREL_COMPOST.getId(), withVariations(TranslationKeys.BARREL_COMPOST_SUBTITLE, "block/composter/ready", 4));
+ add(ESounds.BARREL_MIXING.getId(), withVariations(TranslationKeys.BARREL_MIXING_SUBTITLE, ExDeorum.ID + ":block/barrel/mix", 3));
+ add(ESounds.BARREL_FLUID_TRANSFORM.getId(), withVariations(TranslationKeys.BARREL_FLUID_TRANSFORM_SUBTITLE, "block/brewing_stand/brew", 2));
+ add(ESounds.SILK_WORM_DROP.getId(), withVariations(TranslationKeys.SILK_WORM_DROP_SUBTITLE, "block/honeyblock/break", 5));
+ add(ESounds.SILK_WORM_INFEST.getId(), withVariations(TranslationKeys.SILK_WORM_INFEST_SUBTITLE, "block/honeyblock/break", 5));
+ add(ESounds.SILK_WORM_EAT.getId(), withVariations(TranslationKeys.SILK_WORM_EAT_SUBTITLE, "block/roots/break", 6));
+ add(ESounds.GRASS_SEEDS_PLACE.getId(), withVariations(TranslationKeys.GRASS_SEEDS_PLACE_SUBTITLE, "block/rooted_dirt/break", 4));
+ add(ESounds.SCULK_CORE_ACTIVATE.getId(), withVariations(TranslationKeys.SCULK_CORE_ACTIVATE_SUBTITLE, "block/sculk_shrieker/shriek", 5));
+ add(ESounds.WATERING_CAN_USE.getId(), withVariations(TranslationKeys.WATERING_CAN_USE_SUBTITLE, "ambient/weather/rain", 8));
+ add(ESounds.WATERING_CAN_STOP.getId(), withVariations(TranslationKeys.WATERING_CAN_STOP_SUBTITLE, "item/bucket/fill", 3));
+ }
+
+ private static SoundDefinition withVariations(String subtitleKey, String baseSoundPath, int variations) {
+ var definition = definition().subtitle(subtitleKey);
+ for (int i = 1; i <= variations; i++) {
+ definition.with(sound(baseSoundPath + i));
+ }
+
+ return definition;
+ }
+}
diff --git a/src/main/java/thedarkcolour/exdeorum/data/TranslationKeys.java b/src/main/java/thedarkcolour/exdeorum/data/TranslationKeys.java
index e19c5dbe..67d4f36e 100644
--- a/src/main/java/thedarkcolour/exdeorum/data/TranslationKeys.java
+++ b/src/main/java/thedarkcolour/exdeorum/data/TranslationKeys.java
@@ -32,7 +32,7 @@ public class TranslationKeys {
// Blocks
public static final String INFESTED_LEAVES_FULLY_INFESTED = "block." + ExDeorum.ID + ".infested_leaves.fully_infested";
-
+
// Items
public static final String RANDOM_TRIM_DOES_NOT_CONTAIN_UPGRADE = "item." + ExDeorum.ID + ".random_armor_trim.no_upgrade";
@@ -94,4 +94,17 @@ public class TranslationKeys {
public static final String REDSTONE_CONTROL_LABEL = "gui." + ExDeorum.ID + ".redstone_control.label";
public static final String REDSTONE_CONTROL_MODE = "gui." + ExDeorum.ID + ".redstone_control.mode";
public static final String MECHANICAL_HAMMER_SCREEN_TITLE = ExDeorum.ID + ".container.mechanical_hammer";
+
+ // Sounds
+ public static final String BARREL_ADD_COMPOST_SUBTITLE = "subtitles.exdeorum.barrel.add_compost";
+ public static final String BARREL_COMPOST_SUBTITLE = "subtitles.exdeorum.barrel.compost_finish";
+ public static final String BARREL_MIXING_SUBTITLE = "subtitles.exdeorum.barrel.mixing_finish";
+ public static final String BARREL_FLUID_TRANSFORM_SUBTITLE = "subtitles.exdeorum.barrel.fluid_transform";
+ public static final String SILK_WORM_DROP_SUBTITLE = "subtitles.exdeorum.silk_worm.drop";
+ public static final String SILK_WORM_INFEST_SUBTITLE = "subtitles.exdeorum.silk_worm.infest";
+ public static final String SILK_WORM_EAT_SUBTITLE = "subtitles.exdeorum.silk_worm.eat";
+ public static final String GRASS_SEEDS_PLACE_SUBTITLE = "subtitles.exdeorum.grass_seeds.place";
+ public static final String SCULK_CORE_ACTIVATE_SUBTITLE = "subtitles.exdeorum.sculk_core.activate";
+ public static final String WATERING_CAN_USE_SUBTITLE = "subtitles.exdeorum.watering_can.use";
+ public static final String WATERING_CAN_STOP_SUBTITLE = "subtitles.exdeorum.watering_can.stop";
}
diff --git a/src/main/java/thedarkcolour/exdeorum/event/EventHandler.java b/src/main/java/thedarkcolour/exdeorum/event/EventHandler.java
index ce8f2c8f..d8d04d00 100644
--- a/src/main/java/thedarkcolour/exdeorum/event/EventHandler.java
+++ b/src/main/java/thedarkcolour/exdeorum/event/EventHandler.java
@@ -90,7 +90,6 @@ public final class EventHandler {
fmlBus.addListener(EventHandler::serverShutdown);
fmlBus.addListener(EventHandler::serverTick);
modBus.addListener(EventHandler::registerCapabilities);
- //fmlBus.addListener(EventHandler::onDatapackChanged);
if (ExDeorum.DEBUG) {
fmlBus.addListener(EventHandler::handleDebugCommands);
diff --git a/src/main/java/thedarkcolour/exdeorum/item/CookedSilkWormItem.java b/src/main/java/thedarkcolour/exdeorum/item/CookedSilkWormItem.java
index 7b7f0cbc..43bca500 100644
--- a/src/main/java/thedarkcolour/exdeorum/item/CookedSilkWormItem.java
+++ b/src/main/java/thedarkcolour/exdeorum/item/CookedSilkWormItem.java
@@ -19,8 +19,8 @@
package thedarkcolour.exdeorum.item;
import net.minecraft.sounds.SoundEvent;
-import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.item.Item;
+import thedarkcolour.exdeorum.registry.ESounds;
public class CookedSilkWormItem extends Item {
public CookedSilkWormItem(Properties properties) {
@@ -30,6 +30,6 @@ public class CookedSilkWormItem extends Item {
// Yummy silk worms :)
@Override
public SoundEvent getEatingSound() {
- return SoundEvents.WEEPING_VINES_PLACE;
+ return ESounds.SILK_WORM_EAT.get();
}
}
diff --git a/src/main/java/thedarkcolour/exdeorum/item/GrassSpreaderItem.java b/src/main/java/thedarkcolour/exdeorum/item/GrassSpreaderItem.java
index 039decb5..8f953f60 100644
--- a/src/main/java/thedarkcolour/exdeorum/item/GrassSpreaderItem.java
+++ b/src/main/java/thedarkcolour/exdeorum/item/GrassSpreaderItem.java
@@ -34,6 +34,7 @@ import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.block.state.BlockState;
import thedarkcolour.exdeorum.registry.EItems;
+import thedarkcolour.exdeorum.registry.ESounds;
import java.util.function.Supplier;
@@ -56,7 +57,7 @@ public class GrassSpreaderItem extends Item {
if (canSpread(state) && grass != state) {
if (!level.isClientSide) {
level.setBlock(pos, grass, 3);
- level.playSound(null, pos, SoundEvents.ROOTED_DIRT_PLACE, SoundSource.BLOCKS);
+ level.playSound(null, pos, ESounds.GRASS_SEEDS_PLACE.get(), SoundSource.BLOCKS);
if (player == null || !player.getAbilities().instabuild) {
ctx.getItemInHand().shrink(1);
@@ -97,8 +98,9 @@ public class GrassSpreaderItem extends Item {
mushroomCow.setInvulnerable(cow.isInvulnerable());
cow.level().addFreshEntity(mushroomCow);
- if (!cow.level().isClientSide)
+ if (!cow.level().isClientSide) {
((ServerLevel)cow.level()).sendParticles(ParticleTypes.EXPLOSION, cow.getX(), cow.getY(0.5D), cow.getZ(), 1, 0.0D, 0.0D, 0.0D, 0.0D);
+ }
cow.playSound(SoundEvents.MOOSHROOM_CONVERT, 2.0F, 1.0F);
}
diff --git a/src/main/java/thedarkcolour/exdeorum/item/SculkCoreItem.java b/src/main/java/thedarkcolour/exdeorum/item/SculkCoreItem.java
index ee10eb45..b81fe4a0 100644
--- a/src/main/java/thedarkcolour/exdeorum/item/SculkCoreItem.java
+++ b/src/main/java/thedarkcolour/exdeorum/item/SculkCoreItem.java
@@ -19,7 +19,6 @@
package thedarkcolour.exdeorum.item;
import net.minecraft.core.particles.ParticleTypes;
-import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.item.Item;
@@ -27,6 +26,7 @@ import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SculkShriekerBlock;
import org.joml.Math;
+import thedarkcolour.exdeorum.registry.ESounds;
public class SculkCoreItem extends Item {
public SculkCoreItem(Properties properties) {
@@ -59,7 +59,7 @@ public class SculkCoreItem extends Item {
}
}
}
- level.playSound(null, pos, SoundEvents.SCULK_SHRIEKER_SHRIEK, SoundSource.BLOCKS, 1.0f, 1.0f);
+ level.playSound(null, pos, ESounds.SCULK_CORE_ACTIVATE.get(), SoundSource.BLOCKS, 1.0f, 1.0f);
return InteractionResult.sidedSuccess(level.isClientSide);
}
diff --git a/src/main/java/thedarkcolour/exdeorum/item/SilkWormItem.java b/src/main/java/thedarkcolour/exdeorum/item/SilkWormItem.java
index 75a0a672..ebbc89c6 100644
--- a/src/main/java/thedarkcolour/exdeorum/item/SilkWormItem.java
+++ b/src/main/java/thedarkcolour/exdeorum/item/SilkWormItem.java
@@ -18,7 +18,6 @@
package thedarkcolour.exdeorum.item;
-import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.InteractionResult;
@@ -29,6 +28,7 @@ import net.minecraft.world.item.context.UseOnContext;
import net.minecraft.world.level.block.LeavesBlock;
import thedarkcolour.exdeorum.blockentity.InfestedLeavesBlockEntity;
import thedarkcolour.exdeorum.registry.EBlocks;
+import thedarkcolour.exdeorum.registry.ESounds;
public class SilkWormItem extends Item {
public SilkWormItem(Item.Properties properties) {
@@ -49,7 +49,7 @@ public class SilkWormItem extends Item {
.setValue(LeavesBlock.DISTANCE, state.getValue(LeavesBlock.DISTANCE))
.setValue(LeavesBlock.PERSISTENT, state.getValue(LeavesBlock.PERSISTENT)), 2);
- level.playSound(null, pos, SoundEvents.HONEY_BLOCK_HIT, SoundSource.BLOCKS);
+ level.playSound(null, pos, ESounds.SILK_WORM_INFEST.get(), SoundSource.BLOCKS);
// Set mimic
if (level.getBlockEntity(pos) instanceof InfestedLeavesBlockEntity leaves) {
@@ -69,7 +69,7 @@ public class SilkWormItem extends Item {
public boolean onEntityItemUpdate(ItemStack stack, ItemEntity entity) {
// play a gross noise when you discover a silk worm
if (entity.tickCount == 1 && entity.getOwner() == null) {
- entity.level().playSound(null, entity, SoundEvents.HONEY_BLOCK_PLACE, SoundSource.BLOCKS, 1.0f, 1.0f);
+ entity.level().playSound(null, entity, ESounds.SILK_WORM_DROP.get(), SoundSource.BLOCKS, 1.0f, 1.0f);
}
return false;
}
diff --git a/src/main/java/thedarkcolour/exdeorum/item/WateringCanItem.java b/src/main/java/thedarkcolour/exdeorum/item/WateringCanItem.java
index a971023d..b45fa6a5 100644
--- a/src/main/java/thedarkcolour/exdeorum/item/WateringCanItem.java
+++ b/src/main/java/thedarkcolour/exdeorum/item/WateringCanItem.java
@@ -27,7 +27,6 @@ import net.minecraft.core.Direction;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.network.chat.Component;
import net.minecraft.server.level.ServerLevel;
-import net.minecraft.sounds.SoundEvents;
import net.minecraft.tags.BlockTags;
import net.minecraft.util.Mth;
import net.minecraft.world.InteractionHand;
@@ -60,6 +59,7 @@ import net.neoforged.neoforge.fluids.capability.templates.FluidHandlerItemStack;
import org.jetbrains.annotations.Nullable;
import thedarkcolour.exdeorum.blockentity.BarrelBlockEntity;
import thedarkcolour.exdeorum.data.TranslationKeys;
+import thedarkcolour.exdeorum.registry.ESounds;
import thedarkcolour.exdeorum.tag.EBlockTags;
import java.util.List;
@@ -214,7 +214,7 @@ public class WateringCanItem extends Item {
waterParticles(level, pos, state);
}
if ((useTicks - STARTUP_TIME) % 20 == 0) {
- level.playSound(null, pos, SoundEvents.WEATHER_RAIN, living.getSoundSource(), this.getClass() == WideWateringCanItem.class ? 0.6f : 0.3f, 1.5f);
+ level.playSound(null, pos, ESounds.WATERING_CAN_USE.get(), living.getSoundSource(), this.getClass() == WideWateringCanItem.class ? 0.6f : 0.3f, 1.5f);
}
} else {
isWatering = true;
@@ -233,7 +233,7 @@ public class WateringCanItem extends Item {
@Override
public void releaseUsing(ItemStack stack, Level level, LivingEntity living, int timeCharged) {
if (timeCharged > STARTUP_TIME) {
- level.playLocalSound(living.getX(), living.getY(), living.getZ(), SoundEvents.BUCKET_FILL, living.getSoundSource(), 0.6f, 0.7f, false);
+ level.playLocalSound(living.getX(), living.getY(), living.getZ(), ESounds.WATERING_CAN_STOP.get(), living.getSoundSource(), 0.6f, 0.7f, false);
}
}
diff --git a/src/main/java/thedarkcolour/exdeorum/registry/EItems.java b/src/main/java/thedarkcolour/exdeorum/registry/EItems.java
index 7eb77fe9..6e8477a5 100644
--- a/src/main/java/thedarkcolour/exdeorum/registry/EItems.java
+++ b/src/main/java/thedarkcolour/exdeorum/registry/EItems.java
@@ -38,7 +38,7 @@ import java.util.List;
public class EItems {
public static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(ExDeorum.ID);
- // Silk Worm
+ // Silk Worm (todo rename to "silkworm" in 1.21)
public static final DeferredItem SILK_WORM = ITEMS.register("silk_worm", () -> new SilkWormItem(props()));
public static final DeferredItem- COOKED_SILK_WORM = ITEMS.register("cooked_silk_worm", () -> new CookedSilkWormItem(props().food(new FoodProperties.Builder().nutrition(2).saturationMod(0.6f).build())));
diff --git a/src/main/java/thedarkcolour/exdeorum/registry/ESounds.java b/src/main/java/thedarkcolour/exdeorum/registry/ESounds.java
new file mode 100644
index 00000000..330e49ff
--- /dev/null
+++ b/src/main/java/thedarkcolour/exdeorum/registry/ESounds.java
@@ -0,0 +1,56 @@
+/*
+ * Ex Deorum
+ * Copyright (c) 2024 thedarkcolour
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package thedarkcolour.exdeorum.registry;
+
+import net.minecraft.core.registries.Registries;
+import net.minecraft.sounds.SoundEvent;
+import net.neoforged.neoforge.registries.DeferredHolder;
+import net.neoforged.neoforge.registries.DeferredRegister;
+import thedarkcolour.exdeorum.ExDeorum;
+
+// These sounds are all copies of vanilla sounds, just with their own names so players can easily muffle them
+public class ESounds {
+ public static final DeferredRegister SOUNDS = DeferredRegister.create(Registries.SOUND_EVENT, ExDeorum.ID);
+
+ // original sound: SoundEvents.COMPOSTER_FILL
+ public static final DeferredHolder BARREL_ADD_COMPOST = SOUNDS.register("barrel_add_compost", () -> SoundEvent.createVariableRangeEvent(ESounds.BARREL_ADD_COMPOST.getId()));
+ // original sound: SoundEvents.COMPOSTER_READY
+ public static final DeferredHolder BARREL_COMPOST = SOUNDS.register("barrel_compost_finish", () -> SoundEvent.createVariableRangeEvent(ESounds.BARREL_COMPOST.getId()));
+ // original sound: SoundEvents.AMBIENT_UNDERWATER_EXIT
+ public static final DeferredHolder BARREL_MIXING = SOUNDS.register("barrel_mixing", () -> SoundEvent.createVariableRangeEvent(ESounds.BARREL_MIXING.getId()));
+ // original sound: SoundEvents.BREWING_STAND_BREW
+ public static final DeferredHolder BARREL_FLUID_TRANSFORM = SOUNDS.register("barrel_fluid_transform", () -> SoundEvent.createVariableRangeEvent(ESounds.BARREL_FLUID_TRANSFORM.getId()));
+
+ // original sound: SoundEvents.HONEY_BLOCK_PLACE
+ public static final DeferredHolder SILK_WORM_DROP = SOUNDS.register("silk_worm_drop", () -> SoundEvent.createVariableRangeEvent(ESounds.SILK_WORM_DROP.getId()));
+ // original sound: SoundEvents.HONEY_BLOCK_HIT
+ public static final DeferredHolder SILK_WORM_INFEST = SOUNDS.register("silk_worm_infest", () -> SoundEvent.createVariableRangeEvent(ESounds.SILK_WORM_INFEST.getId()));
+ // original sound: SoundEvents.WEEPING_VINES_PLACE
+ public static final DeferredHolder SILK_WORM_EAT = SOUNDS.register("silk_worm_eat", () -> SoundEvent.createVariableRangeEvent(ESounds.SILK_WORM_EAT.getId()));
+
+ // original sound: SoundEvents.ROOTED_DIRT_PLACE
+ public static final DeferredHolder GRASS_SEEDS_PLACE = SOUNDS.register("grass_seeds_place", () -> SoundEvent.createVariableRangeEvent(ESounds.GRASS_SEEDS_PLACE.getId()));
+ // original sound: SoundEvents.SCULK_SHRIEKER_SHRIEK
+ public static final DeferredHolder SCULK_CORE_ACTIVATE = SOUNDS.register("sculk_core_activate", () -> SoundEvent.createVariableRangeEvent(ESounds.SCULK_CORE_ACTIVATE.getId()));
+
+ // original sound: SoundEvents.WEATHER_RAIN
+ public static final DeferredHolder WATERING_CAN_USE = SOUNDS.register("watering_can_use", () -> SoundEvent.createVariableRangeEvent(ESounds.WATERING_CAN_USE.getId()));
+ // original sound: SoundEvents.BUCKET_FILL
+ public static final DeferredHolder WATERING_CAN_STOP = SOUNDS.register("watering_can_stop", () -> SoundEvent.createVariableRangeEvent(ESounds.WATERING_CAN_STOP.getId()));
+}
diff --git a/src/main/resources/assets/exdeorum/sounds/block/barrel/mix1.ogg b/src/main/resources/assets/exdeorum/sounds/block/barrel/mix1.ogg
new file mode 100644
index 00000000..2cd87c23
Binary files /dev/null and b/src/main/resources/assets/exdeorum/sounds/block/barrel/mix1.ogg differ
diff --git a/src/main/resources/assets/exdeorum/sounds/block/barrel/mix2.ogg b/src/main/resources/assets/exdeorum/sounds/block/barrel/mix2.ogg
new file mode 100644
index 00000000..c75f5438
Binary files /dev/null and b/src/main/resources/assets/exdeorum/sounds/block/barrel/mix2.ogg differ
diff --git a/src/main/resources/assets/exdeorum/sounds/block/barrel/mix3.ogg b/src/main/resources/assets/exdeorum/sounds/block/barrel/mix3.ogg
new file mode 100644
index 00000000..942a8503
Binary files /dev/null and b/src/main/resources/assets/exdeorum/sounds/block/barrel/mix3.ogg differ