From 0921036b880dea36276dd22a8bdf9dd4702d70fd Mon Sep 17 00:00:00 2001 From: Shnupbups Date: Wed, 17 Mar 2021 05:43:17 +1100 Subject: [PATCH] haha yes --- .../redstonebits/ModSoundEvents.java | 13 +++++++--- .../assets/redstonebits/lang/en_us.json | 4 ++- .../resources/assets/redstonebits/sounds.json | 26 +++++++++++++++++++ 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 src/main/resources/assets/redstonebits/sounds.json diff --git a/src/main/java/com/shnupbups/redstonebits/ModSoundEvents.java b/src/main/java/com/shnupbups/redstonebits/ModSoundEvents.java index 13390e3..724b7f7 100644 --- a/src/main/java/com/shnupbups/redstonebits/ModSoundEvents.java +++ b/src/main/java/com/shnupbups/redstonebits/ModSoundEvents.java @@ -5,8 +5,13 @@ import net.minecraft.util.registry.Registry; public class ModSoundEvents { - public static final Identifier BLOCK_COPPER_BUTTON_CLICK_ON_ID = RedstoneBits.id("block.copper_button.click_on"); - public static final SoundEvent BLOCK_COPPER_BUTTON_CLICK_ON = Registry.register(Registry.SOUND_EVENT, BLOCK_COPPER_BUTTON_CLICK_ON_ID, new SoundEvent(BLOCK_COPPER_BUTTON_CLICK_ON_ID)); - public static final Identifier BLOCK_COPPER_BUTTON_CLICK_OFF_ID = RedstoneBits.id("block.copper_button.click_off"); - public static final SoundEvent BLOCK_COPPER_BUTTON_CLICK_OFF = Registry.register(Registry.SOUND_EVENT, BLOCK_COPPER_BUTTON_CLICK_OFF_ID, new SoundEvent(BLOCK_COPPER_BUTTON_CLICK_OFF_ID)); + public static final SoundEvent BLOCK_COPPER_BUTTON_CLICK_ON = register("block.copper_button.click_on"); + public static final SoundEvent BLOCK_COPPER_BUTTON_CLICK_OFF = register("block.copper_button.click_off"); + public static final SoundEvent BLOCK_COUNTER_CLICK = register("block.counter.click"); + public static final SoundEvent BLOCK_RESISTOR_CLICK = register("block.resistor.click"); + + public static SoundEvent register(String id) { + Identifier identifier = RedstoneBits.id(id); + return Registry.register(Registry.SOUND_EVENT, identifier, new SoundEvent(identifier)); + } } diff --git a/src/main/resources/assets/redstonebits/lang/en_us.json b/src/main/resources/assets/redstonebits/lang/en_us.json index a863be3..4851f83 100644 --- a/src/main/resources/assets/redstonebits/lang/en_us.json +++ b/src/main/resources/assets/redstonebits/lang/en_us.json @@ -14,5 +14,7 @@ "block.redstonebits.oxidized_copper_button": "Oxidized Copper Button", "block.redstonebits.waxed_copper_button": "Waxed Copper Button", "block.redstonebits.waxed_exposed_copper_button": "Waxed Exposed Copper Button", - "block.redstonebits.waxed_weathered_copper_button": "Waxed Weathered Copper Button" + "block.redstonebits.waxed_weathered_copper_button": "Waxed Weathered Copper Button", + "subtitles.block.counter.click": "Counter clicks", + "subtitles.block.resistor.click": "Resistor clicks" } \ No newline at end of file diff --git a/src/main/resources/assets/redstonebits/sounds.json b/src/main/resources/assets/redstonebits/sounds.json new file mode 100644 index 0000000..91870ac --- /dev/null +++ b/src/main/resources/assets/redstonebits/sounds.json @@ -0,0 +1,26 @@ +{ + "block.copper_button.click_on": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.button.click" + }, + "block.copper_button.click_off": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.button.click" + }, + "block.counter.click": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.counter.click" + }, + "block.resistor.click": { + "sounds": [ + "random/click" + ], + "subtitle": "subtitles.block.resistor.click" + } +}