diff options
author | syeyoung <cyong06@naver.com> | 2021-03-11 21:03:14 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-03-11 21:03:14 +0900 |
commit | 1e7761c2a495add7bbd896a64544374f8ca702b4 (patch) | |
tree | 8e6e2fedd9bcda5ea894ff485dcd5384be162d45 /src/main/java/kr/syeyoung/dungeonsguide/e.java | |
parent | 45098cc47769c0a7edeacd587c355e99f97e11c9 (diff) | |
download | Skyblock-Dungeons-Guide-1e7761c2a495add7bbd896a64544374f8ca702b4.tar.gz Skyblock-Dungeons-Guide-1e7761c2a495add7bbd896a64544374f8ca702b4.tar.bz2 Skyblock-Dungeons-Guide-1e7761c2a495add7bbd896a64544374f8ca702b4.zip |
resources
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/e.java')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/e.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/e.java b/src/main/java/kr/syeyoung/dungeonsguide/e.java index 3855a5d1..a06d2b29 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/e.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/e.java @@ -11,12 +11,14 @@ import kr.syeyoung.dungeonsguide.events.StompConnectedEvent; import kr.syeyoung.dungeonsguide.features.FeatureRegistry; import kr.syeyoung.dungeonsguide.party.PartyInviteViewer; import kr.syeyoung.dungeonsguide.party.PartyManager; +import kr.syeyoung.dungeonsguide.resources.DGTexturePack; import kr.syeyoung.dungeonsguide.stomp.CloseListener; import kr.syeyoung.dungeonsguide.stomp.StompClient; import kr.syeyoung.dungeonsguide.stomp.StompInterface; import kr.syeyoung.dungeonsguide.utils.AhUtils; import lombok.Getter; import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.IResourcePack; import net.minecraft.command.ICommand; import net.minecraft.launchwrapper.LaunchClassLoader; import net.minecraft.launchwrapper.LogWrapper; @@ -45,6 +47,7 @@ import java.net.URL; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.Executors; @@ -81,6 +84,7 @@ public class e implements c, CloseListener { public void init(FMLInitializationEvent event) { ProgressManager.ProgressBar progressbar = ProgressManager.push("DungeonsGuide", 4); + try { Set<String> invalid = ReflectionHelper.getPrivateValue(LaunchClassLoader.class, (LaunchClassLoader) a.class.getClassLoader(), "invalidClasses"); ((LaunchClassLoader)a.class.getClassLoader()).clearNegativeEntries(Sets.newHashSet("org.slf4j.LoggerFactory")); @@ -141,6 +145,7 @@ public class e implements c, CloseListener { e.printStackTrace(); } + ProgressManager.pop(progressbar); } public void pre(FMLPreInitializationEvent event) { @@ -151,6 +156,13 @@ public class e implements c, CloseListener { } Config.f = configFile; Minecraft.getMinecraft().getFramebuffer().enableStencil(); + + try { + List<IResourcePack> resourcePackList = ReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getMinecraft(),"defaultResourcePacks"); + resourcePackList.add(new DGTexturePack(authenticator)); + } catch (Throwable t){ + t.printStackTrace(); + } } private void copy(InputStream inputStream, File f) throws IOException { FileOutputStream fos = new FileOutputStream(f); |