Skip to content

Commit fd914d9

Browse files
committed
added sounds to 1996 stock, class 350/390/450 door
1 parent 3b05e14 commit fd914d9

File tree

12 files changed

+109
-1
lines changed

12 files changed

+109
-1
lines changed

common/src/main/java/net/adeptstack/Blocks/Doors/SlidingDoor/TrainSlidingDoorBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
public class TrainSlidingDoorBlock extends SlidingDoorBlock {
3434

35-
public static final IntegerProperty DOOR_SOUND = IntegerProperty.create("door_sound", 0, 18);
35+
public static final IntegerProperty DOOR_SOUND = IntegerProperty.create("door_sound", 0, 22);
3636

3737
public TrainSlidingDoorBlock(Properties properties, BlockSetType type, boolean isFolding, int defaultSound) {
3838
super(properties, type, isFolding);

common/src/main/java/net/adeptstack/registry/ModSounds.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ public class ModSounds {
6464
public static final RegistrySupplier<SoundEvent> DOOR_ICE_MODERN_OPEN = registerSoundEvents("door_ice_modern_open");
6565
public static final RegistrySupplier<SoundEvent> DOOR_ICE_MODERN_CLOSE = registerSoundEvents("door_ice_modern_close");
6666

67+
public static final RegistrySupplier<SoundEvent> DOOR_1996_STOCK_OPEN = registerSoundEvents("door_1996_stock_open");
68+
public static final RegistrySupplier<SoundEvent> DOOR_1996_STOCK_CLOSE = registerSoundEvents("door_1996_stock_close");
69+
70+
public static final RegistrySupplier<SoundEvent> DOOR_CLASS_350_OPEN = registerSoundEvents("door_class_350_open");
71+
public static final RegistrySupplier<SoundEvent> DOOR_CLASS_350_CLOSE = registerSoundEvents("door_class_350_close");
72+
73+
public static final RegistrySupplier<SoundEvent> DOOR_CLASS_390_OPEN = registerSoundEvents("door_class_390_open");
74+
public static final RegistrySupplier<SoundEvent> DOOR_CLASS_390_CLOSE = registerSoundEvents("door_class_390_close");
75+
76+
public static final RegistrySupplier<SoundEvent> DOOR_CLASS_450_OPEN = registerSoundEvents("door_class_450_open");
77+
public static final RegistrySupplier<SoundEvent> DOOR_CLASS_450_CLOSE = registerSoundEvents("door_class_450_close");
78+
6779
private static RegistrySupplier<SoundEvent> registerSoundEvents(String name) {
6880
return SOUND_EVENTS.register(new ResourceLocation(MOD_ID, name), () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(MOD_ID, name)));
6981
}

common/src/main/java/net/adeptstack/registry/TrainUtilitiesBuilderTransformers.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,18 @@ else if (variant == 17) {
279279
else if (variant == 18) {
280280
return new TrainSlidingDoorProperties(ModSounds.DOOR_ICE_MODERN_OPEN.get(), ModSounds.DOOR_ICE_MODERN_CLOSE.get(), .025f);
281281
}
282+
else if (variant == 19) {
283+
return new TrainSlidingDoorProperties(ModSounds.DOOR_CLASS_350_OPEN.get(), ModSounds.DOOR_CLASS_350_CLOSE.get(), .025f);
284+
}
285+
else if (variant == 20) {
286+
return new TrainSlidingDoorProperties(ModSounds.DOOR_CLASS_390_OPEN.get(), ModSounds.DOOR_CLASS_390_CLOSE.get(), .025f);
287+
}
288+
else if (variant == 21) {
289+
return new TrainSlidingDoorProperties(ModSounds.DOOR_CLASS_450_OPEN.get(), ModSounds.DOOR_CLASS_450_CLOSE.get(), .025f);
290+
}
291+
else if (variant == 22) {
292+
return new TrainSlidingDoorProperties(ModSounds.DOOR_1996_STOCK_OPEN.get(), ModSounds.DOOR_1996_STOCK_CLOSE.get(), .025f);
293+
}
282294
else {
283295
return new TrainSlidingDoorProperties(SoundEvents.IRON_DOOR_OPEN, SoundEvents.IRON_DOOR_CLOSE, .15f);
284296
}
@@ -336,6 +348,18 @@ else if (type == "warsaw_tram") {
336348
else if (type == "ice_modern_top" || type == "ice_modern") {
337349
return 18;
338350
}
351+
else if (type == "class_350") {
352+
return 19;
353+
}
354+
else if (type == "class_390") {
355+
return 20;
356+
}
357+
else if (type == "class_450") {
358+
return 21;
359+
}
360+
else if (type == "1996_stock") {
361+
return 22;
362+
}
339363
else {
340364
return 0;
341365
}

common/src/main/resources/assets/trainutilities/sounds.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,5 +304,77 @@
304304
"stream": true
305305
}
306306
]
307+
},
308+
"door_1996_stock_open": {
309+
"subtitle": "sound.trainutilities.door_1996_stock_open",
310+
"sounds": [
311+
{
312+
"name": "trainutilities:door_1996_stock_open",
313+
"stream": true
314+
}
315+
]
316+
},
317+
"door_1996_stock_close": {
318+
"subtitle": "sound.trainutilities.door_1996_stock_close",
319+
"sounds": [
320+
{
321+
"name": "trainutilities:door_1996_stock_close",
322+
"stream": true
323+
}
324+
]
325+
},
326+
"door_class_350_open": {
327+
"subtitle": "sound.trainutilities.door_class_350_open",
328+
"sounds": [
329+
{
330+
"name": "trainutilities:door_class_350_open",
331+
"stream": true
332+
}
333+
]
334+
},
335+
"door_class_350_close": {
336+
"subtitle": "sound.trainutilities.door_class_350_close",
337+
"sounds": [
338+
{
339+
"name": "trainutilities:door_class_350_close",
340+
"stream": true
341+
}
342+
]
343+
},
344+
"door_class_390_open": {
345+
"subtitle": "sound.trainutilities.door_class_390_open",
346+
"sounds": [
347+
{
348+
"name": "trainutilities:door_class_390_open",
349+
"stream": true
350+
}
351+
]
352+
},
353+
"door_class_390_close": {
354+
"subtitle": "sound.trainutilities.door_class_390_close",
355+
"sounds": [
356+
{
357+
"name": "trainutilities:door_class_390_close",
358+
"stream": true
359+
}
360+
]
361+
},
362+
"door_class_450_open": {
363+
"subtitle": "sound.trainutilities.door_class_450_open",
364+
"sounds": [
365+
{
366+
"name": "trainutilities:door_class_450_open",
367+
"stream": true
368+
}
369+
]
370+
},
371+
"door_class_450_close": {
372+
"subtitle": "sound.trainutilities.door_class_450_close",
373+
"sounds": [
374+
{
375+
"name": "trainutilities:door_class_450_close",
376+
"stream": true
377+
}
378+
]
307379
}
308380
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)