This commit is contained in:
Anuken
2020-04-07 14:08:42 -04:00
parent 5fbe925429
commit 7b25b09c18
4 changed files with 5 additions and 3 deletions

View File

@@ -90,6 +90,8 @@ public class ContentParser{
String name = "sounds/" + data.asString();
String path = Vars.tree.get(name + ".ogg").exists() && !Vars.ios ? name + ".ogg" : name + ".mp3";
if(Core.assets.contains(path, Sound.class)) return Core.assets.get(path, Sound.class);
ModLoadingSound sound = new ModLoadingSound();
AssetDescriptor<?> desc = Core.assets.load(path, Sound.class);
desc.loaded = result -> sound.sound = (Sound)result;