Add & implement spout & clipboard sfx (#5916)

* Add & implement spout sfx

* Add Clipboard Sounds

* Implement Clipboard Sounds

* Fix formatting for new sounds

---------

Co-authored-by: Starlotte <65743811+Starlotte@users.noreply.github.com>
This commit is contained in:
Starlotte 2024-03-16 12:38:04 -04:00 committed by GitHub
parent 5adb835502
commit b25b88c772
Failed to generate hash of commit
13 changed files with 72 additions and 6 deletions

View file

@ -582,8 +582,8 @@ bf2b0310500213ff853c748c236eb5d01f61658e assets/create/blockstates/yellow_toolbo
5616dda664dd106d576848124fc0fc1de18d0fd3 assets/create/blockstates/yellow_valve_handle.json 5616dda664dd106d576848124fc0fc1de18d0fd3 assets/create/blockstates/yellow_valve_handle.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
d09a8a181fa472e6ae66bdd8d937d1464aee102f assets/create/lang/en_ud.json 390244ea1a4e56fb33c66490a033bd0b4870d0b8 assets/create/lang/en_ud.json
71b5b55d73d5bd7fb39bd352338d9e1ad7184ea9 assets/create/lang/en_us.json 9d2ef7ec16aec62ac33b2c0debb6b368d0fdf7f8 assets/create/lang/en_us.json
487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json 487a511a01b2a4531fb672f917922312db78f958 assets/create/models/block/acacia_window.json
b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json b48060cba1a382f373a05bf0039054053eccf076 assets/create/models/block/acacia_window_pane_noside.json
3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json 3066db1bf03cffa1a9c7fbacf47ae586632f4eb3 assets/create/models/block/acacia_window_pane_noside_alt.json
@ -2294,7 +2294,7 @@ e66e4cbab3bd9c8338b032adba7a689e96d5b185 assets/create/models/threshold_switch/b
32cfe5661b8bf9886e7282c088d731883c38f1ec assets/create/models/threshold_switch/block_wall_3.json 32cfe5661b8bf9886e7282c088d731883c38f1ec assets/create/models/threshold_switch/block_wall_3.json
37b2f0f29bda5eadc84a147887ce7ba9fc0ef2d1 assets/create/models/threshold_switch/block_wall_4.json 37b2f0f29bda5eadc84a147887ce7ba9fc0ef2d1 assets/create/models/threshold_switch/block_wall_4.json
533746594ff508be13438cc3f297aa71dc48cec5 assets/create/models/threshold_switch/block_wall_5.json 533746594ff508be13438cc3f297aa71dc48cec5 assets/create/models/threshold_switch/block_wall_5.json
de7cdf8d734a067af32883e9d86a10e0542a0f5b assets/create/sounds.json aad3560056aded8dcda1704c9ecadd9c4d804b62 assets/create/sounds.json
7048adc6db09a949173a824b26569ade94081d3e data/create/advancements/andesite_alloy.json 7048adc6db09a949173a824b26569ade94081d3e data/create/advancements/andesite_alloy.json
595a47eb334ca5110fe30134d4aec87b97e53f42 data/create/advancements/andesite_casing.json 595a47eb334ca5110fe30134d4aec87b97e53f42 data/create/advancements/andesite_casing.json
faee191c4987a8b4152246a686a80c07610e6049 data/create/advancements/anvil_plough.json faee191c4987a8b4152246a686a80c07610e6049 data/create/advancements/anvil_plough.json

View file

@ -2513,6 +2513,7 @@
"create.subtitle.schematicannon_launch_block": "s\u01DD\u0279\u0131\u025F uouu\u0250\u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S", "create.subtitle.schematicannon_launch_block": "s\u01DD\u0279\u0131\u025F uouu\u0250\u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S",
"create.subtitle.scroll_value": "s\u029E\u0254\u0131\u05DF\u0254 \u0287ndu\u0131-\u05DF\u05DFo\u0279\u0254S", "create.subtitle.scroll_value": "s\u029E\u0254\u0131\u05DF\u0254 \u0287ndu\u0131-\u05DF\u05DFo\u0279\u0254S",
"create.subtitle.slime_added": "s\u01DD\u0265s\u0131nbs \u01DD\u026F\u0131\u05DFS", "create.subtitle.slime_added": "s\u01DD\u0265s\u0131nbs \u01DD\u026F\u0131\u05DFS",
"create.subtitle.spout": "s\u0287\u0279nds \u0287nodS",
"create.subtitle.steam": "s\u01DDs\u0131ou \u026F\u0250\u01DD\u0287S", "create.subtitle.steam": "s\u01DDs\u0131ou \u026F\u0250\u01DD\u0287S",
"create.subtitle.train": "\u01DD\u05DFq\u026Fn\u0279 s\u05DF\u01DD\u01DD\u0265\u028D \u028E\u01DDbo\u15FA", "create.subtitle.train": "\u01DD\u05DFq\u026Fn\u0279 s\u05DF\u01DD\u01DD\u0265\u028D \u028E\u01DDbo\u15FA",
"create.subtitle.train3": "p\u01DD\u05DF\u025F\u025Fn\u026F \u01DD\u05DFq\u026Fn\u0279 s\u05DF\u01DD\u01DD\u0265\u028D \u028E\u01DDbo\u15FA", "create.subtitle.train3": "p\u01DD\u05DF\u025F\u025Fn\u026F \u01DD\u05DFq\u026Fn\u0279 s\u05DF\u01DD\u01DD\u0265\u028D \u028E\u01DDbo\u15FA",

View file

@ -2513,6 +2513,7 @@
"create.subtitle.schematicannon_launch_block": "Schematicannon fires", "create.subtitle.schematicannon_launch_block": "Schematicannon fires",
"create.subtitle.scroll_value": "Scroll-input clicks", "create.subtitle.scroll_value": "Scroll-input clicks",
"create.subtitle.slime_added": "Slime squishes", "create.subtitle.slime_added": "Slime squishes",
"create.subtitle.spout": "Spout spurts",
"create.subtitle.steam": "Steam noises", "create.subtitle.steam": "Steam noises",
"create.subtitle.train": "Bogey wheels rumble", "create.subtitle.train": "Bogey wheels rumble",
"create.subtitle.train3": "Bogey wheels rumble muffled", "create.subtitle.train3": "Bogey wheels rumble muffled",

View file

@ -16,6 +16,22 @@
} }
] ]
}, },
"clipboard_check": {
"sounds": [
{
"name": "create:clipboard_check",
"type": "file"
}
]
},
"clipboard_erase": {
"sounds": [
{
"name": "create:clipboard_erase",
"type": "file"
}
]
},
"cogs": { "cogs": {
"sounds": [ "sounds": [
{ {
@ -388,6 +404,27 @@
], ],
"subtitle": "create.subtitle.slime_added" "subtitle": "create.subtitle.slime_added"
}, },
"spout": {
"sounds": [
{
"name": "create:spout",
"type": "file"
},
{
"name": "create:spout_1",
"type": "file"
},
{
"name": "create:spout_2",
"type": "file"
},
{
"name": "create:spout_3",
"type": "file"
}
],
"subtitle": "create.subtitle.spout"
},
"steam": { "steam": {
"sounds": [ "sounds": [
{ {

View file

@ -88,6 +88,13 @@ public class AllSoundEvents {
.category(SoundSource.BLOCKS) .category(SoundSource.BLOCKS)
.build(), .build(),
SPOUTING = create("spout").subtitle("Spout spurts")
.addVariant("spout_1")
.addVariant("spout_2")
.addVariant("spout_3")
.category(SoundSource.BLOCKS)
.build(),
CRANKING = create("cranking").subtitle("Hand Crank turns") CRANKING = create("cranking").subtitle("Hand Crank turns")
.playExisting(SoundEvents.WOOD_PLACE, .075f, .5f) .playExisting(SoundEvents.WOOD_PLACE, .075f, .5f)
.playExisting(SoundEvents.WOODEN_BUTTON_CLICK_OFF, .025f, .5f) .playExisting(SoundEvents.WOODEN_BUTTON_CLICK_OFF, .025f, .5f)
@ -297,6 +304,14 @@ public class AllSoundEvents {
.build(), .build(),
HAUNTED_BELL_USE = create("haunted_bell_use").subtitle("Haunted Bell tolls") HAUNTED_BELL_USE = create("haunted_bell_use").subtitle("Haunted Bell tolls")
.category(SoundSource.BLOCKS)
.build(),
CLIPBOARD_CHECKMARK = create("clipboard_check").noSubtitle()
.category(SoundSource.BLOCKS)
.build(),
CLIPBOARD_ERASE = create("clipboard_erase").noSubtitle()
.category(SoundSource.BLOCKS) .category(SoundSource.BLOCKS)
.build(); .build();

View file

@ -6,6 +6,12 @@ import java.util.List;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import com.simibubi.create.AllSoundEvents;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.sounds.SimpleSoundInstance;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.mutable.MutableBoolean; import org.apache.commons.lang3.mutable.MutableBoolean;
import org.apache.commons.lang3.mutable.MutableInt; import org.apache.commons.lang3.mutable.MutableInt;
@ -584,8 +590,11 @@ public class ClipboardScreen extends AbstractSimiScreen {
if (hoveredEntry != -1) { if (hoveredEntry != -1) {
if (hoveredCheck) { if (hoveredCheck) {
editingIndex = -1; editingIndex = -1;
if (hoveredEntry < currentEntries.size()) if (hoveredEntry < currentEntries.size()) {
currentEntries.get(hoveredEntry).checked ^= true; currentEntries.get(hoveredEntry).checked ^= true;
if (currentEntries.get(hoveredEntry).checked == true) Minecraft.getInstance().getSoundManager().play(SimpleSoundInstance.forUI(AllSoundEvents.CLIPBOARD_CHECKMARK.getMainEvent(), 0.95f + (float)Math.random() * 0.05f));
else Minecraft.getInstance().getSoundManager().play(SimpleSoundInstance.forUI(AllSoundEvents.CLIPBOARD_ERASE.getMainEvent(), 0.90f + (float)Math.random() * 0.2f));
}
sendIfEditingBlock(); sendIfEditingBlock();
return true; return true;
} }

View file

@ -7,6 +7,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.api.behaviour.BlockSpoutingBehaviour; import com.simibubi.create.api.behaviour.BlockSpoutingBehaviour;
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation; import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
import com.simibubi.create.content.fluids.FluidFX; import com.simibubi.create.content.fluids.FluidFX;
@ -105,6 +106,7 @@ public class SpoutBlockEntity extends SmartBlockEntity implements IHaveGoggleInf
if (processingTicks == -1) { if (processingTicks == -1) {
processingTicks = FILLING_TIME; processingTicks = FILLING_TIME;
notifyUpdate(); notifyUpdate();
AllSoundEvents.SPOUTING.playOnServer(level, worldPosition, 0.75f, 0.9f + 0.2f * (float)Math.random());
return HOLD; return HOLD;
} }
@ -221,9 +223,10 @@ public class SpoutBlockEntity extends SmartBlockEntity implements IHaveGoggleInf
} }
} }
if (processingTicks >= 8 && level.isClientSide) if (processingTicks >= 8 && level.isClientSide) {
spawnProcessingParticles(tank.getPrimaryTank() spawnProcessingParticles(tank.getPrimaryTank()
.getRenderedFluid()); .getRenderedFluid());
}
} }
protected void spawnProcessingParticles(FluidStack fluid) { protected void spawnProcessingParticles(FluidStack fluid) {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.