mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-25 06:27:41 +01:00
Quick Fix
- Replaced reference to String#toLowerCase in AllSoundEvents
This commit is contained in:
parent
6f06ebffa3
commit
e7b09dc63f
1 changed files with 19 additions and 22 deletions
|
@ -4,6 +4,7 @@ import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
import com.simibubi.create.foundation.utility.Lang;
|
||||||
import com.simibubi.create.foundation.utility.data.ICanGenerateJson;
|
import com.simibubi.create.foundation.utility.data.ICanGenerateJson;
|
||||||
import net.minecraft.data.DirectoryCache;
|
import net.minecraft.data.DirectoryCache;
|
||||||
import net.minecraft.data.IDataProvider;
|
import net.minecraft.data.IDataProvider;
|
||||||
|
@ -16,7 +17,6 @@ import net.minecraftforge.registries.IForgeRegistry;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
|
||||||
public enum AllSoundEvents implements ICanGenerateJson {
|
public enum AllSoundEvents implements ICanGenerateJson {
|
||||||
|
|
||||||
CUCKOO_PIG("creeperclock"),
|
CUCKOO_PIG("creeperclock"),
|
||||||
|
@ -32,7 +32,6 @@ public enum AllSoundEvents implements ICanGenerateJson {
|
||||||
BLOCKZAPPER_DENY(SoundEvents.BLOCK_NOTE_BLOCK_BASS),
|
BLOCKZAPPER_DENY(SoundEvents.BLOCK_NOTE_BLOCK_BASS),
|
||||||
BLOCK_FUNNEL_EAT(SoundEvents.ENTITY_GENERIC_EAT),
|
BLOCK_FUNNEL_EAT(SoundEvents.ENTITY_GENERIC_EAT),
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
String id;
|
String id;
|
||||||
|
@ -40,7 +39,7 @@ public enum AllSoundEvents implements ICanGenerateJson {
|
||||||
|
|
||||||
// For adding our own sounds at assets/create/sounds/name.ogg
|
// For adding our own sounds at assets/create/sounds/name.ogg
|
||||||
AllSoundEvents() {
|
AllSoundEvents() {
|
||||||
id = name().toLowerCase();
|
id = Lang.asId(name());
|
||||||
}
|
}
|
||||||
|
|
||||||
AllSoundEvents(String name) {
|
AllSoundEvents(String name) {
|
||||||
|
@ -49,7 +48,7 @@ public enum AllSoundEvents implements ICanGenerateJson {
|
||||||
|
|
||||||
// For wrapping a existing sound with new subtitle
|
// For wrapping a existing sound with new subtitle
|
||||||
AllSoundEvents(SoundEvent child) {
|
AllSoundEvents(SoundEvent child) {
|
||||||
id = name().toLowerCase();
|
this();
|
||||||
this.child = child;
|
this.child = child;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,8 +65,7 @@ public enum AllSoundEvents implements ICanGenerateJson {
|
||||||
public static void register(RegistryEvent.Register<SoundEvent> event) {
|
public static void register(RegistryEvent.Register<SoundEvent> event) {
|
||||||
IForgeRegistry<SoundEvent> registry = event.getRegistry();
|
IForgeRegistry<SoundEvent> registry = event.getRegistry();
|
||||||
|
|
||||||
for (AllSoundEvents entry :
|
for (AllSoundEvents entry : values()) {
|
||||||
values()) {
|
|
||||||
|
|
||||||
ResourceLocation rec = new ResourceLocation(Create.ID, entry.getName());
|
ResourceLocation rec = new ResourceLocation(Create.ID, entry.getName());
|
||||||
SoundEvent sound = new SoundEvent(rec).setRegistryName(rec);
|
SoundEvent sound = new SoundEvent(rec).setRegistryName(rec);
|
||||||
|
@ -82,8 +80,7 @@ public enum AllSoundEvents implements ICanGenerateJson {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
JsonObject json = new JsonObject();
|
JsonObject json = new JsonObject();
|
||||||
for (AllSoundEvents soundEvent :
|
for (AllSoundEvents soundEvent : values()) {
|
||||||
values()) {
|
|
||||||
JsonObject entry = new JsonObject();
|
JsonObject entry = new JsonObject();
|
||||||
JsonArray arr = new JsonArray();
|
JsonArray arr = new JsonArray();
|
||||||
if (soundEvent.child != null) {
|
if (soundEvent.child != null) {
|
||||||
|
|
Loading…
Reference in a new issue