aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'mod/src/main')
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DGTexturePack.java66
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java1
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/resources/DGTexturePack.java31
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/IBeamCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/IBeamCursor.cur)bin8774 -> 8774 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/arrowCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/arrowCursor.cur)bin136606 -> 136606 bytes
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/cursors/closedHandCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/closedHandCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/crosshairCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/crosshairCursor.cur)bin8774 -> 8774 bytes
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/cursors/openHandCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/openHandCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/operationNotAllowedCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/operationNotAllowedCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/pointingHandCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/pointingHandCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeDownCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeDownCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeLeftCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftRightCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeLeftRightCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeNE.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeNE.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeNESW.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeNESW.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeNW.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeNW.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeNWSE.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeNWSE.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeRightCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeRightCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeSE.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeSE.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeSW.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeSW.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeUpCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeUpCursor.cur)bin136606 -> 136606 bytes
-rwxr-xr-xmod/src/main/resources/assets/dungeonsguide/cursors/resizeUpDownCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeUpDownCursor.cur)bin136606 -> 136606 bytes
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/models/penguin.mtl (renamed from mod/src/main/resources/assets/dg/models/penguin.mtl)0
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/models/penguin.obj (renamed from mod/src/main/resources/assets/dg/models/penguin.obj)0
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/sounds.json (renamed from mod/src/main/resources/assets/dg/sounds.json)0
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/sounds/readysetgo.ogg (renamed from mod/src/main/resources/assets/dg/sounds/readysetgo.ogg)bin161265 -> 161265 bytes
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/textures/dglogox128.png (renamed from mod/src/main/resources/assets/dg/textures/dglogox128.png)bin3024 -> 3024 bytes
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/textures/dglogox32.png (renamed from mod/src/main/resources/assets/dg/textures/dglogox32.png)bin648 -> 648 bytes
-rw-r--r--mod/src/main/resources/assets/dungeonsguide/textures/penguin.png (renamed from mod/src/main/resources/assets/dg/textures/penguin.png)bin207 -> 207 bytes
-rw-r--r--mod/src/main/resources/pack.mcmeta6
30 files changed, 18 insertions, 86 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DGTexturePack.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DGTexturePack.java
deleted file mode 100644
index 78949d5f..00000000
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DGTexturePack.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
- * Copyright (C) 2021 cyoung06
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-package kr.syeyoung.dungeonsguide.mod;
-
-import kr.syeyoung.dungeonsguide.launcher.authentication.Authenticator;
-import lombok.AllArgsConstructor;
-import net.minecraft.client.resources.IResourcePack;
-import net.minecraft.client.resources.data.IMetadataSection;
-import net.minecraft.client.resources.data.IMetadataSerializer;
-import net.minecraft.util.ResourceLocation;
-
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.Set;
-
-@AllArgsConstructor
-public class DGTexturePack implements IResourcePack {
-
- @Override
- public InputStream getInputStream(ResourceLocation location) {
- return this.getClass().getResourceAsStream("/assets/dg/"+location.getResourcePath());
- }
-
- @Override
- public boolean resourceExists(ResourceLocation location) {
- return this.getClass().getResource("/assets/dg/"+location.getResourcePath()) != null;
- }
-
- @Override
- public Set<String> getResourceDomains() {
- return Collections.singleton("dungeonsguide");
- }
-
- @Override
- public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException {
- return null;
- }
-
- @Override
- public BufferedImage getPackImage() throws IOException {
- return new BufferedImage(512,512, BufferedImage.TYPE_INT_RGB);
- }
-
- @Override
- public String getPackName() {
- return "Dungeons Guide Default Pack";
- }
-}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
index 408ae9d7..aee07553 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
@@ -34,6 +34,7 @@ import kr.syeyoung.dungeonsguide.mod.events.listener.FeatureListener;
import kr.syeyoung.dungeonsguide.mod.events.listener.PacketListener;
import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
import kr.syeyoung.dungeonsguide.mod.party.PartyManager;
+import kr.syeyoung.dungeonsguide.mod.resources.DGTexturePack;
import kr.syeyoung.dungeonsguide.mod.utils.AhUtils;
import kr.syeyoung.dungeonsguide.mod.utils.BlockCache;
import kr.syeyoung.dungeonsguide.mod.utils.TimeScoreUtil;
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/resources/DGTexturePack.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/resources/DGTexturePack.java
index 873ce17b..d23f2444 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/resources/DGTexturePack.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/resources/DGTexturePack.java
@@ -19,33 +19,34 @@
package kr.syeyoung.dungeonsguide.mod.resources;
import lombok.AllArgsConstructor;
+import net.minecraft.client.resources.AbstractResourcePack;
import net.minecraft.client.resources.IResourcePack;
import net.minecraft.client.resources.data.IMetadataSection;
import net.minecraft.client.resources.data.IMetadataSerializer;
import net.minecraft.util.ResourceLocation;
+import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
+import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.Set;
-@AllArgsConstructor
-public class DGTexturePack implements IResourcePack {
-
+public class DGTexturePack extends AbstractResourcePack {
+ public DGTexturePack() {
+ super(null);
+ }
@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(ResourceManager.getInstance().getResources().get("assets/dg/"+location.getResourcePath()));
+ protected InputStream getInputStreamByName(String name) {
+ return this.getClass().getResourceAsStream("/"+name);
}
@Override
- public boolean resourceExists(ResourceLocation location) {
- return ResourceManager.getInstance().getResources().containsKey("assets/dg/"+location.getResourcePath())
- || this.getClass().getResourceAsStream("/assets/dg/"+location.getResourcePath()) != null;
+ protected boolean hasResourceName(String name) {
+ return getInputStreamByName(name) != null;
}
@Override
@@ -54,16 +55,6 @@ public class DGTexturePack implements IResourcePack {
}
@Override
- public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException {
- return null;
- }
-
- @Override
- public BufferedImage getPackImage() throws IOException {
- return new BufferedImage(512,512, BufferedImage.TYPE_INT_RGB);
- }
-
- @Override
public String getPackName() {
return "Dungeons Guide Default Pack";
}
diff --git a/mod/src/main/resources/assets/dg/cursors/IBeamCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/IBeamCursor.cur
index 19f162df..19f162df 100755
--- a/mod/src/main/resources/assets/dg/cursors/IBeamCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/IBeamCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/arrowCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/arrowCursor.cur
index 7d58eec1..7d58eec1 100755
--- a/mod/src/main/resources/assets/dg/cursors/arrowCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/arrowCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/closedHandCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/closedHandCursor.cur
index 26d6ba9f..26d6ba9f 100644
--- a/mod/src/main/resources/assets/dg/cursors/closedHandCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/closedHandCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/crosshairCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/crosshairCursor.cur
index 7d4589af..7d4589af 100755
--- a/mod/src/main/resources/assets/dg/cursors/crosshairCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/crosshairCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/openHandCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/openHandCursor.cur
index 26d6ba9f..26d6ba9f 100644
--- a/mod/src/main/resources/assets/dg/cursors/openHandCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/openHandCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/operationNotAllowedCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/operationNotAllowedCursor.cur
index 1bb62ed5..1bb62ed5 100755
--- a/mod/src/main/resources/assets/dg/cursors/operationNotAllowedCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/operationNotAllowedCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/pointingHandCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/pointingHandCursor.cur
index 77313176..77313176 100755
--- a/mod/src/main/resources/assets/dg/cursors/pointingHandCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/pointingHandCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeDownCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeDownCursor.cur
index bae2c237..bae2c237 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeDownCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeDownCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeLeftCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftCursor.cur
index b904bc5c..b904bc5c 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeLeftCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeLeftRightCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftRightCursor.cur
index b904bc5c..b904bc5c 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeLeftRightCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftRightCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeNE.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNE.cur
index ccaac220..ccaac220 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeNE.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNE.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeNESW.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNESW.cur
index ccaac220..ccaac220 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeNESW.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNESW.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeNW.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNW.cur
index f67aa78d..f67aa78d 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeNW.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNW.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeNWSE.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNWSE.cur
index f67aa78d..f67aa78d 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeNWSE.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNWSE.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeRightCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeRightCursor.cur
index b904bc5c..b904bc5c 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeRightCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeRightCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeSE.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeSE.cur
index f67aa78d..f67aa78d 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeSE.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeSE.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeSW.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeSW.cur
index ccaac220..ccaac220 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeSW.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeSW.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeUpCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpCursor.cur
index bae2c237..bae2c237 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeUpCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/cursors/resizeUpDownCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpDownCursor.cur
index bae2c237..bae2c237 100755
--- a/mod/src/main/resources/assets/dg/cursors/resizeUpDownCursor.cur
+++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpDownCursor.cur
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/models/penguin.mtl b/mod/src/main/resources/assets/dungeonsguide/models/penguin.mtl
index 1fc14a2f..1fc14a2f 100644
--- a/mod/src/main/resources/assets/dg/models/penguin.mtl
+++ b/mod/src/main/resources/assets/dungeonsguide/models/penguin.mtl
diff --git a/mod/src/main/resources/assets/dg/models/penguin.obj b/mod/src/main/resources/assets/dungeonsguide/models/penguin.obj
index 29fe4680..29fe4680 100644
--- a/mod/src/main/resources/assets/dg/models/penguin.obj
+++ b/mod/src/main/resources/assets/dungeonsguide/models/penguin.obj
diff --git a/mod/src/main/resources/assets/dg/sounds.json b/mod/src/main/resources/assets/dungeonsguide/sounds.json
index 5c28a55b..5c28a55b 100644
--- a/mod/src/main/resources/assets/dg/sounds.json
+++ b/mod/src/main/resources/assets/dungeonsguide/sounds.json
diff --git a/mod/src/main/resources/assets/dg/sounds/readysetgo.ogg b/mod/src/main/resources/assets/dungeonsguide/sounds/readysetgo.ogg
index 12470b8e..12470b8e 100644
--- a/mod/src/main/resources/assets/dg/sounds/readysetgo.ogg
+++ b/mod/src/main/resources/assets/dungeonsguide/sounds/readysetgo.ogg
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/textures/dglogox128.png b/mod/src/main/resources/assets/dungeonsguide/textures/dglogox128.png
index 3558d9da..3558d9da 100644
--- a/mod/src/main/resources/assets/dg/textures/dglogox128.png
+++ b/mod/src/main/resources/assets/dungeonsguide/textures/dglogox128.png
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/textures/dglogox32.png b/mod/src/main/resources/assets/dungeonsguide/textures/dglogox32.png
index 62962d7e..62962d7e 100644
--- a/mod/src/main/resources/assets/dg/textures/dglogox32.png
+++ b/mod/src/main/resources/assets/dungeonsguide/textures/dglogox32.png
Binary files differ
diff --git a/mod/src/main/resources/assets/dg/textures/penguin.png b/mod/src/main/resources/assets/dungeonsguide/textures/penguin.png
index 4b39154c..4b39154c 100644
--- a/mod/src/main/resources/assets/dg/textures/penguin.png
+++ b/mod/src/main/resources/assets/dungeonsguide/textures/penguin.png
Binary files differ
diff --git a/mod/src/main/resources/pack.mcmeta b/mod/src/main/resources/pack.mcmeta
new file mode 100644
index 00000000..246c3f42
--- /dev/null
+++ b/mod/src/main/resources/pack.mcmeta
@@ -0,0 +1,6 @@
+{
+ "pack": {
+ "description": "Dungeons Guide Resources",
+ "pack_format": 1
+ }
+} \ No newline at end of file