Skip to content

Commit 62b9073

Browse files
committed
Three new sounds
1 parent e813b7a commit 62b9073

7 files changed

Lines changed: 29 additions & 3 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ yarn_mappings=1.21+build.7
99
loader_version=0.15.11
1010

1111
# Mod Properties
12-
mod_version=1.2.1
12+
mod_version=1.3
1313
maven_group=net.morceaudebois.apolloparrot
1414
archives_base_name=apolloparrot
1515

src/main/java/net/morceaudebois/apolloparrot/mixin/ParrotMixin.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,19 @@ private static void injected(CallbackInfoReturnable<SoundEvent> cir) {
6565
ModSounds.BALL,
6666
ModSounds.BURP,
6767
ModSounds.FIRE,
68-
ModSounds.HAT
68+
ModSounds.HAT,
69+
70+
ModSounds.TOUCH_OH,
71+
ModSounds.DROPLET,
72+
ModSounds.SNAPCHAT
6973
};
7074

7175
// Create a Random object
7276
Random random = new Random();
7377

7478
if (random.nextInt(3) < 1) {
7579
// Generate a random number from 0 to 2 (inclusive) to select one of three values
76-
int randomNumber = random.nextInt(46);
80+
int randomNumber = random.nextInt(50);
7781
cir.setReturnValue(ApolloSounds[randomNumber]);
7882
}
7983

src/main/java/net/morceaudebois/apolloparrot/sound/ModSounds.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ public class ModSounds {
5959
public static SoundEvent HAT = registerSound("hat");
6060
public static SoundEvent SHROCK_QUESTION = registerSound("shrock_question");
6161

62+
public static SoundEvent TOUCH_OH = registerSound("touch_oh");
63+
public static SoundEvent SNAPCHAT = registerSound("snapchat");
64+
public static SoundEvent DROPLET = registerSound("droplet");
65+
6266
// actual registration of all the custom SoundEvents
6367
static SoundEvent registerSound(String id) {
6468
Identifier identifier = Identifier.of(ApolloParrot.MOD_ID, id);

src/main/resources/assets/apolloparrot/sounds.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,5 +278,23 @@
278278
"sounds": [
279279
"apolloparrot:ball"
280280
]
281+
},
282+
"droplet": {
283+
"subtitle": "Parrot imitates droplet sound",
284+
"sounds": [
285+
"apolloparrot:droplet"
286+
]
287+
},
288+
"snapchat": {
289+
"subtitle": "Parrot imitates Snapchat sound",
290+
"sounds": [
291+
"apolloparrot:snapchat"
292+
]
293+
},
294+
"touch_oh": {
295+
"subtitle": "Parrot touches something",
296+
"sounds": [
297+
"apolloparrot:touch_oh"
298+
]
281299
}
282300
}
33.5 KB
Binary file not shown.
14.5 KB
Binary file not shown.
59 KB
Binary file not shown.

0 commit comments

Comments
 (0)