diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DGTexturePack.java | 66 | ||||
-rwxr-xr-x | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java | 1 | ||||
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/resources/DGTexturePack.java | 31 | ||||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/IBeamCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/IBeamCursor.cur) | bin | 8774 -> 8774 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/arrowCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/arrowCursor.cur) | bin | 136606 -> 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) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/crosshairCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/crosshairCursor.cur) | bin | 8774 -> 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) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/operationNotAllowedCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/operationNotAllowedCursor.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/pointingHandCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/pointingHandCursor.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeDownCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeDownCursor.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeLeftCursor.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftRightCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeLeftRightCursor.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeNE.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeNE.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeNESW.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeNESW.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeNW.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeNW.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeNWSE.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeNWSE.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeRightCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeRightCursor.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeSE.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeSE.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeSW.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeSW.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeUpCursor.cur) | bin | 136606 -> 136606 bytes | |||
-rwxr-xr-x | mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpDownCursor.cur (renamed from mod/src/main/resources/assets/dg/cursors/resizeUpDownCursor.cur) | bin | 136606 -> 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) | bin | 161265 -> 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) | bin | 3024 -> 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) | bin | 648 -> 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) | bin | 207 -> 207 bytes | |||
-rw-r--r-- | mod/src/main/resources/pack.mcmeta | 6 |
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 Binary files differindex 19f162df..19f162df 100755 --- a/mod/src/main/resources/assets/dg/cursors/IBeamCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/IBeamCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/arrowCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/arrowCursor.cur Binary files differindex 7d58eec1..7d58eec1 100755 --- a/mod/src/main/resources/assets/dg/cursors/arrowCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/arrowCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/closedHandCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/closedHandCursor.cur Binary files differindex 26d6ba9f..26d6ba9f 100644 --- a/mod/src/main/resources/assets/dg/cursors/closedHandCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/closedHandCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/crosshairCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/crosshairCursor.cur Binary files differindex 7d4589af..7d4589af 100755 --- a/mod/src/main/resources/assets/dg/cursors/crosshairCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/crosshairCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/openHandCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/openHandCursor.cur Binary files differindex 26d6ba9f..26d6ba9f 100644 --- a/mod/src/main/resources/assets/dg/cursors/openHandCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/openHandCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/operationNotAllowedCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/operationNotAllowedCursor.cur Binary files differindex 1bb62ed5..1bb62ed5 100755 --- a/mod/src/main/resources/assets/dg/cursors/operationNotAllowedCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/operationNotAllowedCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/pointingHandCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/pointingHandCursor.cur Binary files differindex 77313176..77313176 100755 --- a/mod/src/main/resources/assets/dg/cursors/pointingHandCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/pointingHandCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeDownCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeDownCursor.cur Binary files differindex bae2c237..bae2c237 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeDownCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeDownCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeLeftCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftCursor.cur Binary files differindex b904bc5c..b904bc5c 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeLeftCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeLeftRightCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftRightCursor.cur Binary files differindex b904bc5c..b904bc5c 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeLeftRightCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeLeftRightCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeNE.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNE.cur Binary files differindex ccaac220..ccaac220 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeNE.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNE.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeNESW.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNESW.cur Binary files differindex ccaac220..ccaac220 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeNESW.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNESW.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeNW.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNW.cur Binary files differindex f67aa78d..f67aa78d 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeNW.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNW.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeNWSE.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNWSE.cur Binary files differindex f67aa78d..f67aa78d 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeNWSE.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeNWSE.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeRightCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeRightCursor.cur Binary files differindex b904bc5c..b904bc5c 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeRightCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeRightCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeSE.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeSE.cur Binary files differindex f67aa78d..f67aa78d 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeSE.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeSE.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeSW.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeSW.cur Binary files differindex ccaac220..ccaac220 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeSW.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeSW.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeUpCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpCursor.cur Binary files differindex bae2c237..bae2c237 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeUpCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpCursor.cur diff --git a/mod/src/main/resources/assets/dg/cursors/resizeUpDownCursor.cur b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpDownCursor.cur Binary files differindex bae2c237..bae2c237 100755 --- a/mod/src/main/resources/assets/dg/cursors/resizeUpDownCursor.cur +++ b/mod/src/main/resources/assets/dungeonsguide/cursors/resizeUpDownCursor.cur 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 Binary files differindex 12470b8e..12470b8e 100644 --- a/mod/src/main/resources/assets/dg/sounds/readysetgo.ogg +++ b/mod/src/main/resources/assets/dungeonsguide/sounds/readysetgo.ogg diff --git a/mod/src/main/resources/assets/dg/textures/dglogox128.png b/mod/src/main/resources/assets/dungeonsguide/textures/dglogox128.png Binary files differindex 3558d9da..3558d9da 100644 --- a/mod/src/main/resources/assets/dg/textures/dglogox128.png +++ b/mod/src/main/resources/assets/dungeonsguide/textures/dglogox128.png diff --git a/mod/src/main/resources/assets/dg/textures/dglogox32.png b/mod/src/main/resources/assets/dungeonsguide/textures/dglogox32.png Binary files differindex 62962d7e..62962d7e 100644 --- a/mod/src/main/resources/assets/dg/textures/dglogox32.png +++ b/mod/src/main/resources/assets/dungeonsguide/textures/dglogox32.png diff --git a/mod/src/main/resources/assets/dg/textures/penguin.png b/mod/src/main/resources/assets/dungeonsguide/textures/penguin.png Binary files differindex 4b39154c..4b39154c 100644 --- a/mod/src/main/resources/assets/dg/textures/penguin.png +++ b/mod/src/main/resources/assets/dungeonsguide/textures/penguin.png 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 |