Skip to content

Commit c3a979d

Browse files
committed
new custom music, mars and glacio
1 parent 91859b0 commit c3a979d

File tree

5 files changed

+44
-13
lines changed

5 files changed

+44
-13
lines changed

src/main/java/com/github/ethanicuss/astraladditions/musicplayer/MusicPlayer.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,18 @@ public static MusicSound findMusic(MusicTracker musicTracker){
6363
if (Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:moon") && player.getY() < 95) {
6464
val = ModMusic.MOON;
6565
}
66+
if (Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:mars")) {
67+
val = ModMusic.MARS;
68+
}
69+
if (Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:glacio")) {
70+
val = ModMusic.GLACIO;
71+
}
6672
if (Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:mercury")) {
6773
val = ModMusic.MERCURY;
6874
}
6975
if (Objects.equals(player.world.getRegistryKey().getValue().toString(), "minecraft:the_nether") || Objects.equals(player.world.getRegistryKey().getValue().toString(), "createastral:moon_debris") || Objects.equals(player.world.getRegistryKey().getValue().toString(), "minecraft:the_end")) {
7076
val = ModMusic.END;
7177
}
72-
if (Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:mars") && player.getY() < 80) {
73-
val = ModMusic.MARS;
74-
}
7578
if (Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:moon_orbit") || Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:mars_orbit") || Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:mercury_orbit") || Objects.equals(player.world.getRegistryKey().getValue().toString(), "ad_astra:earth_orbit")) {
7679
val = ModMusic.ORBIT;
7780
}

src/main/java/com/github/ethanicuss/astraladditions/registry/ModMusic.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class ModMusic {
2525
public static final MusicSound ORBIT = new MusicSound(ModSounds.MUSIC_ORBIT, GAME_MIN_DELAY, GAME_MAX_DELAY, false);
2626
public static final MusicSound MERCURY = new MusicSound(ModSounds.MUSIC_MERCURY, GAME_MIN_DELAY, GAME_MAX_DELAY, false);
2727
public static final MusicSound MARS = new MusicSound(ModSounds.MUSIC_MARS, GAME_MIN_DELAY, GAME_MAX_DELAY, false);
28+
public static final MusicSound GLACIO = new MusicSound(ModSounds.MUSIC_GLACIO, GAME_MIN_DELAY, GAME_MAX_DELAY, false);
2829
public static final MusicSound END = new MusicSound(ModSounds.MUSIC_END, GAME_MIN_DELAY, GAME_MAX_DELAY, false);
2930
public static final MusicSound END_BOSS = new MusicSound(ModSounds.MUSIC_END_BOSS, 0, 0, true);
3031
public static final MusicSound WITHER = new MusicSound(ModSounds.MUSIC_WITHER, 0, 0, true);

src/main/java/com/github/ethanicuss/astraladditions/registry/ModSounds.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public class ModSounds {
3030
public static final SoundEvent MUSIC_MERCURY = new SoundEvent(MUSIC_MERCURY_ID);
3131
public static final Identifier MUSIC_MARS_ID = new Identifier(AstralAdditions.MOD_ID, "music_mars");
3232
public static final SoundEvent MUSIC_MARS = new SoundEvent(MUSIC_MARS_ID);
33+
public static final Identifier MUSIC_GLACIO_ID = new Identifier(AstralAdditions.MOD_ID, "music_glacio");
34+
public static final SoundEvent MUSIC_GLACIO = new SoundEvent(MUSIC_GLACIO_ID);
3335
public static final Identifier MUSIC_END_ID = new Identifier(AstralAdditions.MOD_ID, "music_end");
3436
public static final SoundEvent MUSIC_END = new SoundEvent(MUSIC_END_ID);
3537
public static final Identifier MUSIC_END_BOSS_ID = new Identifier(AstralAdditions.MOD_ID, "music_end_boss");

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

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,38 @@
3030
"music_mars": {
3131
"sounds": [
3232
{
33-
"name": "astraladditions:uneasy",
34-
"stream": true
33+
"name": "astraladditions:maybe_just_maybe",
34+
"stream": true,
35+
"weight": 2
36+
},
37+
{
38+
"name": "astraladditions:project_501",
39+
"stream": true,
40+
"weight": 2
41+
},
42+
{
43+
"name": "music/game/nether/nether3",
44+
"stream": true,
45+
"weight": 1
46+
},
47+
{
48+
"name": "music/game/nether/nether4",
49+
"stream": true,
50+
"weight": 1
51+
}
52+
]
53+
},
54+
"music_glacio": {
55+
"sounds": [
56+
{
57+
"name": "astraladditions:frosted_glass",
58+
"stream": true,
59+
"weight": 2
60+
},
61+
{
62+
"name": "astraladditions:so_cold",
63+
"stream": true,
64+
"weight": 2
3565
}
3666
]
3767
},
@@ -96,17 +126,17 @@
96126
{
97127
"name": "astraladditions:day",
98128
"stream": true,
99-
"weight": 3
129+
"weight": 2
100130
},
101131
{
102132
"name": "astraladditions:sunlight",
103133
"stream": true,
104-
"weight": 3
134+
"weight": 2
105135
},
106136
{
107137
"name": "astraladditions:they_will_listen",
108138
"stream": true,
109-
"weight": 3
139+
"weight": 2
110140
},
111141
{
112142
"name": "music/game/calm1",
@@ -204,11 +234,6 @@
204234
"name": "music/game/nether/nether3",
205235
"stream": true,
206236
"weight": 1
207-
},
208-
{
209-
"name": "music/game/nether/nether4",
210-
"stream": true,
211-
"weight": 1
212237
}
213238
]
214239
},

src/main/resources/assets/astraladditions/sounds/maybe_just_maybe....ogg renamed to src/main/resources/assets/astraladditions/sounds/maybe_just_maybe.ogg

File renamed without changes.

0 commit comments

Comments
 (0)