diff options
| author | syeyoung <cyoung06@naver.com> | 2022-05-21 21:18:14 +0900 |
|---|---|---|
| committer | syeyoung <cyoung06@naver.com> | 2022-05-21 21:28:52 +0900 |
| commit | 20dd3f99a7b139b5848128246c622fd9cfefa478 (patch) | |
| tree | 78e5f84ad22fd53876d488f6b58c3528aebe6501 /src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java | |
| parent | 50de034c046c4ddea033b73793c8825ecb5bb86f (diff) | |
| download | Skyblock-Dungeons-Guide-20dd3f99a7b139b5848128246c622fd9cfefa478.tar.gz Skyblock-Dungeons-Guide-20dd3f99a7b139b5848128246c622fd9cfefa478.tar.bz2 Skyblock-Dungeons-Guide-20dd3f99a7b139b5848128246c622fd9cfefa478.zip | |
- Project separation
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java')
| -rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java b/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java deleted file mode 100644 index b9646993..00000000 --- a/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java +++ /dev/null @@ -1,72 +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.resources; - -import kr.syeyoung.dungeonsguide.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.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Collections; -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())); - } - - @Override - public boolean resourceExists(ResourceLocation location) { - return authenticator.getResources().containsKey("assets/dg/"+location.getResourcePath()) - || this.getClass().getResourceAsStream("/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"; - } -} |
