aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main/java/kr/syeyoung/dungeonsguide/resources
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2022-08-05 19:03:21 +0900
committersyeyoung <cyoung06@naver.com>2022-08-05 22:20:15 +0900
commit2d094b7a8ca702f79dadc5e336c833a00de7129d (patch)
tree02bd3ee711750841da455086eee4174d6ffadf55 /mod/src/main/java/kr/syeyoung/dungeonsguide/resources
parent6b296876d7938df9bb7abbcc6ffdab9f36d7aee3 (diff)
downloadSkyblock-Dungeons-Guide-2d094b7a8ca702f79dadc5e336c833a00de7129d.tar.gz
Skyblock-Dungeons-Guide-2d094b7a8ca702f79dadc5e336c833a00de7129d.tar.bz2
Skyblock-Dungeons-Guide-2d094b7a8ca702f79dadc5e336c833a00de7129d.zip
- Create version field on IDGLoader
- Organize Main.java - Make AhUtils / DGTexturePack compatible with new loader - Keep checks consistent in Authenticator
Diffstat (limited to 'mod/src/main/java/kr/syeyoung/dungeonsguide/resources')
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java
index f8c15871..3fecfa35 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java
@@ -19,6 +19,7 @@
package kr.syeyoung.dungeonsguide.resources;
import kr.syeyoung.dungeonsguide.launcher.authentication.Authenticator;
+import kr.syeyoung.dungeonsguide.launcher.loader.IDGLoader;
import lombok.AllArgsConstructor;
import net.minecraft.client.resources.IResourcePack;
import net.minecraft.client.resources.data.IMetadataSection;
@@ -35,19 +36,14 @@ import java.util.Set;
@AllArgsConstructor
public class DGTexturePack implements IResourcePack {
- private final Authenticator authenticator;
-
@Override
- public InputStream getInputStream(ResourceLocation location) throws IOException {
- InputStream inputStream = this.getClass().getResourceAsStream("/assets/dg/"+location.getResourcePath());
- if (inputStream != null) return inputStream;
- return new ByteArrayInputStream(authenticator.getResources().get("assets/dg/"+location.getResourcePath()));
+ public InputStream getInputStream(ResourceLocation location) {
+ return this.getClass().getResourceAsStream("/assets/dg/"+location.getResourcePath());
}
@Override
public boolean resourceExists(ResourceLocation location) {
- return authenticator.getResources().containsKey("assets/dg/"+location.getResourcePath())
- || this.getClass().getResourceAsStream("/assets/dg/"+location.getResourcePath()) != null;
+ return this.getClass().getResource("/assets/dg/"+location.getResourcePath()) != null;
}
@Override