-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
CodenameRevy
committed
Sep 20, 2019
1 parent
7d758ad
commit dfc9ce7
Showing
13 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties. | ||
# This is required to provide enough memory for the Minecraft decompilation process. | ||
org.gradle.jvmargs=-Xmx3G | ||
org.gradle.jvmargs=-Xmx2G | ||
org.gradle.daemon=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 2 additions & 13 deletions
15
src/main/java/com/codenamerevy/magicmirror/init/SoundInit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
package com.codenamerevy.magicmirror.init; | ||
|
||
import com.codenamerevy.magicmirror.util.Reference; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraft.util.SoundEvent; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class SoundInit | ||
{ | ||
public static final List<SoundEvent> SOUNDS = new ArrayList<SoundEvent>(); | ||
|
||
public static final SoundEvent SOUND_TELEPORT = new SoundEvent(location("teleport")).setRegistryName("teleport"); | ||
|
||
private static ResourceLocation location(String name) | ||
{ | ||
return new ResourceLocation(Reference.MODID, name); | ||
} | ||
public static SoundEvent TELEPORT; | ||
public static SoundEvent MIRROR_DISCHARGE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/com/codenamerevy/magicmirror/util/handler/SoundHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.codenamerevy.magicmirror.util.handler; | ||
|
||
import com.codenamerevy.magicmirror.util.Reference; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraft.util.SoundEvent; | ||
import net.minecraftforge.event.RegistryEvent; | ||
import net.minecraftforge.eventbus.api.SubscribeEvent; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.registries.ForgeRegistries; | ||
|
||
import static com.codenamerevy.magicmirror.init.SoundInit.TELEPORT; | ||
import static com.codenamerevy.magicmirror.init.SoundInit.MIRROR_DISCHARGE; | ||
|
||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) | ||
public class SoundHandler | ||
{ | ||
@SubscribeEvent | ||
public static void registerSounds(RegistryEvent.Register<SoundEvent> event) | ||
{ | ||
TELEPORT = registerSound("teleport"); | ||
MIRROR_DISCHARGE = registerSound("mirror_discharge"); | ||
Reference.LOGGER.info("Registered sound(s)!"); | ||
} | ||
|
||
private static SoundEvent registerSound(String name) | ||
{ | ||
ResourceLocation location = new ResourceLocation(Reference.MODID, name); | ||
SoundEvent event = new SoundEvent(location); | ||
event.setRegistryName(location); | ||
ForgeRegistries.SOUND_EVENTS.register(event); | ||
return event; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
{ | ||
"item.magicmirror.magic_mirror": "Magic Mirror", | ||
"chat.magicmirror.bednotfound": "Bed not found! Make sure you sleep in the bed before you can use the mirror!" | ||
"chat.magicmirror.bednotfound": "Bed not found! Make sure you sleep in the bed before you can use the mirror!", | ||
"chat.magicmirror.power": "This mirror is not powerful enough for cross-dimension travel!", | ||
"chat.magicmirror.nether": "This mirror is not powerful enough to travel trough Nether!", | ||
"subtitle.magicmirror.teleport": "Teleport", | ||
"subtitle.magicmirror.mirror_discharge": "Mirror Discharge" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.