Skip to content

Commit

Permalink
haha yes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnupbups committed Mar 16, 2021
1 parent e61650e commit 0921036
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/main/java/com/shnupbups/redstonebits/ModSoundEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
4 changes: 3 additions & 1 deletion src/main/resources/assets/redstonebits/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
26 changes: 26 additions & 0 deletions src/main/resources/assets/redstonebits/sounds.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit 0921036

Please sign in to comment.