diff --git a/NightX.ipr b/NightX.ipr
index 0bb7c825..f3ddcec6 100644
--- a/NightX.ipr
+++ b/NightX.ipr
@@ -391,20 +391,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/NightX.iws b/NightX.iws
index db3e04ee..9174a74a 100644
--- a/NightX.iws
+++ b/NightX.iws
@@ -5,57 +5,38 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -168,6 +149,7 @@
+
@@ -181,7 +163,7 @@
-
+
@@ -196,7 +178,7 @@
-
+
@@ -211,7 +193,7 @@
-
+
@@ -226,7 +208,7 @@
-
+
@@ -241,7 +223,7 @@
-
+
@@ -256,7 +238,7 @@
-
+
@@ -301,7 +283,7 @@
-
+
@@ -316,7 +298,7 @@
-
+
@@ -343,7 +325,7 @@
-
+
@@ -358,7 +340,7 @@
-
+
@@ -373,7 +355,7 @@
-
+
@@ -388,7 +370,7 @@
-
+
@@ -403,7 +385,7 @@
-
+
@@ -418,7 +400,7 @@
-
+
@@ -463,7 +445,7 @@
-
+
@@ -478,7 +460,7 @@
-
+
diff --git a/src/main/java/net/aspw/client/Client.kt b/src/main/java/net/aspw/client/Client.kt
index 33a7e9f9..7709ffc5 100644
--- a/src/main/java/net/aspw/client/Client.kt
+++ b/src/main/java/net/aspw/client/Client.kt
@@ -100,6 +100,9 @@ object Client {
// Create command manager
commandManager = CommandManager()
+ // Load client fonts
+ Fonts.loadFonts()
+
// Init SoundManager
tipSoundManager = TipSoundManager()
@@ -157,9 +160,6 @@ object Client {
}
}
- // Load client fonts
- Fonts.loadFonts()
-
ClientUtils.getLogger().info("Successfully loaded $CLIENT_BEST in ${System.currentTimeMillis() - lastTick}ms.")
if (CheckConnection.isAvailable) {
diff --git a/src/main/java/net/aspw/client/util/connection/CheckConnection.kt b/src/main/java/net/aspw/client/util/connection/CheckConnection.kt
index dd3673a6..d78a52c9 100644
--- a/src/main/java/net/aspw/client/util/connection/CheckConnection.kt
+++ b/src/main/java/net/aspw/client/util/connection/CheckConnection.kt
@@ -13,7 +13,6 @@ object CheckConnection {
var announcement = ""
var discord = ""
var apiKey = ""
- var fontDownloader = ""
var changeLog1 = ""
var changeLog2 = ""
var changeLog3 = ""
@@ -76,7 +75,6 @@ object CheckConnection {
response.close()
httpClient.close()
val details = content.split("~")
- fontDownloader = details[5]
announcement = details[4]
discord = details[3]
apiKey = details[2]
@@ -84,7 +82,7 @@ object CheckConnection {
isLatest = true
if (details[0] == "True")
isAvailable = true
- val slashLog = details[6].split("---")
+ val slashLog = details[5].split("---")
changeLog1 = slashLog[0]
changeLog2 = slashLog[1]
changeLog3 = slashLog[2]
diff --git a/src/main/java/net/aspw/client/util/newfont/FontLoaders.java b/src/main/java/net/aspw/client/util/newfont/FontLoaders.java
index f915bd81..71827e08 100644
--- a/src/main/java/net/aspw/client/util/newfont/FontLoaders.java
+++ b/src/main/java/net/aspw/client/util/newfont/FontLoaders.java
@@ -106,7 +106,7 @@ private static Font getSF(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/insfui.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/sfui.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
@@ -121,7 +121,7 @@ private static Font getExhibition(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/inicons.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/Icons.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
@@ -137,7 +137,7 @@ private static Font getTahoma(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/intahoma.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/Tahoma.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
@@ -152,7 +152,7 @@ private static Font getTahomaBold(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/intahomabold.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/TahomaBold.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
@@ -167,7 +167,7 @@ private static Font getLog2go(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/incheck.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/marks.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
@@ -182,7 +182,7 @@ private static Font getLoggo(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/innovicon.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/novicon.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
@@ -197,7 +197,7 @@ private static Font getLogo(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/inother.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/other.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
@@ -212,7 +212,7 @@ private static Font getClickgui(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/inlatobold.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/latobold.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
@@ -227,7 +227,7 @@ private static Font getKiona(int size) {
Font font;
try {
InputStream is = Minecraft.getMinecraft().getResourceManager()
- .getResource(new ResourceLocation("client/font/inraleway.ttf")).getInputStream();
+ .getResource(new ResourceLocation("client/font/raleway.ttf")).getInputStream();
font = Font.createFont(0, is);
font = font.deriveFont(Font.PLAIN, size);
} catch (Exception ex) {
diff --git a/src/main/java/net/aspw/client/visual/font/Fonts.java b/src/main/java/net/aspw/client/visual/font/Fonts.java
index 13ed8cd2..b5d7e475 100644
--- a/src/main/java/net/aspw/client/visual/font/Fonts.java
+++ b/src/main/java/net/aspw/client/visual/font/Fonts.java
@@ -71,30 +71,28 @@ public static void loadFonts() {
ClientUtils.getLogger().info("Loading Fonts...");
- downloadFonts();
-
- font35 = new GameFontRenderer(getFont("Roboto-Medium.ttf", 35));
- font40 = new GameFontRenderer(getFont("Roboto-Medium.ttf", 40));
- font72 = new GameFontRenderer(getFont("Roboto-Medium.ttf", 72));
- fontSmall = new GameFontRenderer(getFont("Roboto-Medium.ttf", 30));
- fontTiny = new GameFontRenderer(getFont("Roboto-Medium.ttf", 24));
- fontLarge = new GameFontRenderer(getFont("Roboto-Medium.ttf", 60));
- fontSFUI35 = new GameFontRenderer(getFont("sfui.ttf", 35));
- fontSFUI37 = new GameFontRenderer(getFont("sfui.ttf", 37));
- fontSFUI40 = new GameFontRenderer(getFont("sfui.ttf", 40));
- jelloRegular40 = new GameFontRenderer(getFont("jelloregular.ttf", 40));
- fontBold180 = new GameFontRenderer(getFont("Roboto-Bold.ttf", 180));
- fontTahoma = new GameFontRenderer(getFont("TahomaBold.ttf", 35));
- fontTahoma30 = new GameFontRenderer(getFont("TahomaBold.ttf", 30));
- fontTahoma38 = new GameFontRenderer(getFont("TahomaBold.ttf", 38));
- fontTahomaSmall = new TTFFontRenderer(getFont("Tahoma.ttf", 11));
- fontBangers = new GameFontRenderer(getFont("Bangers-Regular.ttf", 45));
- fontPixel = new GameFontRenderer(getFont("Pixel.ttf", 48));
- mojangles = new GameFontRenderer(getFont("Mojangles.ttf", 60));
- mojanglesBold = new GameFontRenderer(getFont("MojanglesBold.ttf", 60));
- niSans = new GameFontRenderer(getFont("NiSans.ttf", 60));
- icons = new GameFontRenderer(getFont("Icons.ttf", 52));
- marks = new GameFontRenderer(getFont("marks.ttf", 52));
+ font35 = new GameFontRenderer(getRobotoMedium("Roboto-Medium.ttf", 35));
+ font40 = new GameFontRenderer(getRobotoMedium("Roboto-Medium.ttf", 40));
+ font72 = new GameFontRenderer(getRobotoMedium("Roboto-Medium.ttf", 72));
+ fontSmall = new GameFontRenderer(getRobotoMedium("Roboto-Medium.ttf", 30));
+ fontTiny = new GameFontRenderer(getRobotoMedium("Roboto-Medium.ttf", 24));
+ fontLarge = new GameFontRenderer(getRobotoMedium("Roboto-Medium.ttf", 60));
+ fontSFUI35 = new GameFontRenderer(getSFUI("sfui.ttf", 35));
+ fontSFUI37 = new GameFontRenderer(getSFUI("sfui.ttf", 37));
+ fontSFUI40 = new GameFontRenderer(getSFUI("sfui.ttf", 40));
+ jelloRegular40 = new GameFontRenderer(getJelloRegular("jelloregular.ttf", 40));
+ fontBold180 = new GameFontRenderer(getRobotoBold("Roboto-Bold.ttf", 180));
+ fontTahoma = new GameFontRenderer(getTahomaBold("TahomaBold.ttf", 35));
+ fontTahoma30 = new GameFontRenderer(getTahomaBold("TahomaBold.ttf", 30));
+ fontTahoma38 = new GameFontRenderer(getTahomaBold("TahomaBold.ttf", 38));
+ fontTahomaSmall = new TTFFontRenderer(getTahoma("Tahoma.ttf", 11));
+ fontBangers = new GameFontRenderer(getBangersRegular("Bangers-Regular.ttf", 45));
+ fontPixel = new GameFontRenderer(getPixel("Pixel.ttf", 48));
+ mojangles = new GameFontRenderer(getMojangles("Mojangles.ttf", 60));
+ mojanglesBold = new GameFontRenderer(getMojanglesBold("MojanglesBold.ttf", 60));
+ niSans = new GameFontRenderer(getNiSans("NiSans.ttf", 60));
+ icons = new GameFontRenderer(getIcons("Icons.ttf", 52));
+ marks = new GameFontRenderer(getMarks("marks.ttf", 52));
try {
CUSTOM_FONT_RENDERERS.clear();
@@ -115,7 +113,19 @@ public static void loadFonts() {
final JsonObject fontObject = (JsonObject) element;
- CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getFont(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getRobotoMedium(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getSFUI(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getJelloRegular(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getRobotoBold(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getTahomaBold(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getTahoma(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getBangersRegular(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getPixel(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getMojangles(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getMojanglesBold(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getNiSans(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getIcons(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
+ CUSTOM_FONT_RENDERERS.add(new GameFontRenderer(getMarks(fontObject.get("fontFile").getAsString(), fontObject.get("fontSize").getAsInt())));
}
} else {
fontsFile.createNewFile();
@@ -131,29 +141,6 @@ public static void loadFonts() {
ClientUtils.getLogger().info("Loaded Fonts. (" + (System.currentTimeMillis() - l) + "ms)");
}
- private static void downloadFonts() {
- try {
- final File outputFile = new File(Client.fileManager.fontsDir, "roboto.zip");
- final File sfuiFile = new File(Client.fileManager.fontsDir, "sfui.ttf");
- final File jelloFile = new File(Client.fileManager.fontsDir, "jelloregular.ttf");
- final File prodSansFile = new File(Client.fileManager.fontsDir, "Roboto-Medium.ttf");
- final File prodBoldFile = new File(Client.fileManager.fontsDir, "Roboto-Bold.ttf");
- final File tahomaFile = new File(Client.fileManager.fontsDir, "TahomaBold.ttf");
- final File tahomaReFile = new File(Client.fileManager.fontsDir, "Tahoma.ttf");
- final File bangersFile = new File(Client.fileManager.fontsDir, "Bangers-Regular.ttf");
- final File pixelFile = new File(Client.fileManager.fontsDir, "Pixel.ttf");
-
- if (!outputFile.exists() || !sfuiFile.exists() || !jelloFile.exists() || !prodSansFile.exists() || !prodBoldFile.exists() || !tahomaFile.exists() || !tahomaReFile.exists() || !bangersFile.exists() || !pixelFile.exists()) {
- ClientUtils.getLogger().info("Downloading fonts...");
- HttpUtils.download(CheckConnection.INSTANCE.getFontDownloader(), outputFile);
- ClientUtils.getLogger().info("Extract fonts...");
- extractZip(outputFile.getPath(), Client.fileManager.fontsDir.getPath());
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
public static FontRenderer getFontRenderer(final String name, final int size) {
for (final Field field : Fonts.class.getDeclaredFields()) {
try {
@@ -228,49 +215,237 @@ public static List getFonts() {
return fonts;
}
- private static Font getFont(final String fontName, final int size) {
+ private static Font getSFUI(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/sfui.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+
+ private static Font getNiSans(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/NiSans.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+
+ private static Font getRobotoMedium(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/Roboto-Medium.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+
+ private static Font getJelloRegular(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/jelloregular.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+
+ private static Font getRobotoBold(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/Roboto-Bold.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+
+ private static Font getTahomaBold(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/TahomaBold.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+
+ private static Font getTahoma(final String fontName, final int size) {
try {
- final InputStream inputStream = new FileInputStream(new File(Client.fileManager.fontsDir, fontName));
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/Tahoma.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
inputStream.close();
return awtClientFont;
} catch (final Exception e) {
e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+
+ private static Font getBangersRegular(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/Bangers-Regular.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
return new Font("default", Font.PLAIN, size);
}
}
- private static void extractZip(final String zipFile, final String outputFolder) {
- final byte[] buffer = new byte[1024];
+ private static Font getPixel(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/Pixel.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+ private static Font getMojangles(final String fontName, final int size) {
try {
- final File folder = new File(outputFolder);
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/Mojangles.ttf");
- if (!folder.exists()) folder.mkdir();
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
- final ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(zipFile));
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
+
+ private static Font getMojanglesBold(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/MojanglesBold.ttf");
+
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
- ZipEntry zipEntry = zipInputStream.getNextEntry();
- while (zipEntry != null) {
- File newFile = new File(outputFolder + File.separator + zipEntry.getName());
- new File(newFile.getParent()).mkdirs();
+ private static Font getIcons(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/Icons.ttf");
- FileOutputStream fileOutputStream = new FileOutputStream(newFile);
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
+ }
+
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
+ e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
+ }
+ }
- int i;
- while ((i = zipInputStream.read(buffer)) > 0)
- fileOutputStream.write(buffer, 0, i);
+ private static Font getMarks(final String fontName, final int size) {
+ try {
+ InputStream inputStream = Fonts.class.getResourceAsStream("/assets/minecraft/client/font/fonts/marks.ttf");
- fileOutputStream.close();
- zipEntry = zipInputStream.getNextEntry();
+ if (inputStream == null) {
+ throw new FileNotFoundException("Font file not found: " + fontName);
}
- zipInputStream.closeEntry();
- zipInputStream.close();
- } catch (final IOException e) {
+ Font awtClientFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ awtClientFont = awtClientFont.deriveFont(Font.PLAIN, size);
+ inputStream.close();
+ return awtClientFont;
+ } catch (final Exception e) {
e.printStackTrace();
+ return new Font("default", Font.PLAIN, size);
}
}
}
\ No newline at end of file
diff --git a/src/main/resources/assets/minecraft/client/font/Bangers-Regular.ttf b/src/main/resources/assets/minecraft/client/font/Bangers-Regular.ttf
new file mode 100644
index 00000000..0bba4967
Binary files /dev/null and b/src/main/resources/assets/minecraft/client/font/Bangers-Regular.ttf differ
diff --git a/src/main/resources/assets/minecraft/client/font/inicons.ttf b/src/main/resources/assets/minecraft/client/font/Icons.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/inicons.ttf
rename to src/main/resources/assets/minecraft/client/font/Icons.ttf
diff --git a/src/main/resources/assets/minecraft/client/font/Mojangles.ttf b/src/main/resources/assets/minecraft/client/font/Mojangles.ttf
new file mode 100644
index 00000000..da89fa78
Binary files /dev/null and b/src/main/resources/assets/minecraft/client/font/Mojangles.ttf differ
diff --git a/src/main/resources/assets/minecraft/client/font/MojanglesBold.ttf b/src/main/resources/assets/minecraft/client/font/MojanglesBold.ttf
new file mode 100644
index 00000000..fc71ca35
Binary files /dev/null and b/src/main/resources/assets/minecraft/client/font/MojanglesBold.ttf differ
diff --git a/src/main/resources/assets/minecraft/client/font/NiSans.ttf b/src/main/resources/assets/minecraft/client/font/NiSans.ttf
new file mode 100644
index 00000000..2b03db51
Binary files /dev/null and b/src/main/resources/assets/minecraft/client/font/NiSans.ttf differ
diff --git a/src/main/resources/assets/minecraft/client/font/Pixel.ttf b/src/main/resources/assets/minecraft/client/font/Pixel.ttf
new file mode 100644
index 00000000..bf09e04b
Binary files /dev/null and b/src/main/resources/assets/minecraft/client/font/Pixel.ttf differ
diff --git a/src/main/resources/assets/minecraft/client/font/Roboto-Bold.ttf b/src/main/resources/assets/minecraft/client/font/Roboto-Bold.ttf
new file mode 100644
index 00000000..d847195c
Binary files /dev/null and b/src/main/resources/assets/minecraft/client/font/Roboto-Bold.ttf differ
diff --git a/src/main/resources/assets/minecraft/client/font/Roboto-Medium.ttf b/src/main/resources/assets/minecraft/client/font/Roboto-Medium.ttf
new file mode 100644
index 00000000..c0442ee2
Binary files /dev/null and b/src/main/resources/assets/minecraft/client/font/Roboto-Medium.ttf differ
diff --git a/src/main/resources/assets/minecraft/client/font/intahoma.ttf b/src/main/resources/assets/minecraft/client/font/Tahoma.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/intahoma.ttf
rename to src/main/resources/assets/minecraft/client/font/Tahoma.ttf
diff --git a/src/main/resources/assets/minecraft/client/font/intahomabold.ttf b/src/main/resources/assets/minecraft/client/font/TahomaBold.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/intahomabold.ttf
rename to src/main/resources/assets/minecraft/client/font/TahomaBold.ttf
diff --git a/src/main/resources/assets/minecraft/client/font/jelloregular.ttf b/src/main/resources/assets/minecraft/client/font/jelloregular.ttf
new file mode 100644
index 00000000..7864fce5
Binary files /dev/null and b/src/main/resources/assets/minecraft/client/font/jelloregular.ttf differ
diff --git a/src/main/resources/assets/minecraft/client/font/inlatobold.ttf b/src/main/resources/assets/minecraft/client/font/latobold.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/inlatobold.ttf
rename to src/main/resources/assets/minecraft/client/font/latobold.ttf
diff --git a/src/main/resources/assets/minecraft/client/font/incheck.ttf b/src/main/resources/assets/minecraft/client/font/marks.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/incheck.ttf
rename to src/main/resources/assets/minecraft/client/font/marks.ttf
diff --git a/src/main/resources/assets/minecraft/client/font/innovicon.ttf b/src/main/resources/assets/minecraft/client/font/novicon.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/innovicon.ttf
rename to src/main/resources/assets/minecraft/client/font/novicon.ttf
diff --git a/src/main/resources/assets/minecraft/client/font/inother.ttf b/src/main/resources/assets/minecraft/client/font/other.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/inother.ttf
rename to src/main/resources/assets/minecraft/client/font/other.ttf
diff --git a/src/main/resources/assets/minecraft/client/font/inraleway.ttf b/src/main/resources/assets/minecraft/client/font/raleway.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/inraleway.ttf
rename to src/main/resources/assets/minecraft/client/font/raleway.ttf
diff --git a/src/main/resources/assets/minecraft/client/font/insfui.ttf b/src/main/resources/assets/minecraft/client/font/sfui.ttf
similarity index 100%
rename from src/main/resources/assets/minecraft/client/font/insfui.ttf
rename to src/main/resources/assets/minecraft/client/font/sfui.ttf
diff --git a/web/beta.txt b/web/beta.txt
index b26db786..4b2943af 100644
--- a/web/beta.txt
+++ b/web/beta.txt
@@ -1 +1 @@
-True~Beta B63~NoApiIsHere~https://discord.gg/SGBccUXFK~It's Beta Build!~https://cdn.discordapp.com/attachments/1064470103019765790/1143466170306023444/fonts.zip~ - Removed ProtocolFixer (always on)--- * Fixed Block Sounds & Attack Packet when using Protocol 1.9+--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
\ No newline at end of file
+True~Beta B63~NoApiIsHere~https://discord.gg/SGBccUXFK~It's Beta Build!~ - Removed ProtocolFixer (always on)--- * Fixed Block Sounds & Attack Packet when using Protocol 1.9+--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
\ No newline at end of file