aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main/java/kr/syeyoung
diff options
context:
space:
mode:
Diffstat (limited to 'mod/src/main/java/kr/syeyoung')
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java2
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java12
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/utils/AhUtils.java18
3 files changed, 14 insertions, 18 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java
index 5ec5b95a..59078bca 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/DungeonsGuide.java
@@ -114,7 +114,7 @@ public class DungeonsGuide implements DGInterface, CloseListener {
try {
List<IResourcePack> resourcePackList = ReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getMinecraft(),"defaultResourcePacks", "aA", "field_110449_ao");
- resourcePackList.add(new DGTexturePack(authenticator));
+ resourcePackList.add(new DGTexturePack());
Minecraft.getMinecraft().refreshResources();
} catch (Throwable t){
t.printStackTrace();
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
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/utils/AhUtils.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/utils/AhUtils.java
index a9aea9de..792f5ebc 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/utils/AhUtils.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/utils/AhUtils.java
@@ -56,15 +56,15 @@ public class AhUtils {
try {
Map<String, AuctionData> semi_auctions = new HashMap<String, AuctionData>();
- JsonElement object = DungeonsGuide.getDungeonsGuide().getAuthenticator().getJsonSecured("https://dungeons.guide/resource/keys");
- for (JsonElement element : object.getAsJsonArray()) {
- JsonObject object1 = element.getAsJsonObject();
- AuctionData auctionData = new AuctionData(object1.get("id").getAsString());
- auctionData.lowestBin = object1.get("lowestBin").getAsInt();
- auctionData.sellPrice = object1.get("sellPrice").getAsInt();
- auctionData.buyPrice = object1.get("buyPrice").getAsInt();
- semi_auctions.put(auctionData.id, auctionData);
- }
+// JsonElement object = DungeonsGuide.getDungeonsGuide().getAuthenticator().getJsonSecured("https://dungeons.guide/resource/keys");
+// for (JsonElement element : object.getAsJsonArray()) {
+// JsonObject object1 = element.getAsJsonObject();
+// AuctionData auctionData = new AuctionData(object1.get("id").getAsString());
+// auctionData.lowestBin = object1.get("lowestBin").getAsInt();
+// auctionData.sellPrice = object1.get("sellPrice").getAsInt();
+// auctionData.buyPrice = object1.get("buyPrice").getAsInt();
+// semi_auctions.put(auctionData.id, auctionData);
+// }
auctions = semi_auctions;
} catch (Throwable e) {
e.printStackTrace();