Skip to content

Commit

Permalink
changed font system
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Aug 22, 2023
1 parent 7bcb37c commit 465695c
Show file tree
Hide file tree
Showing 24 changed files with 300 additions and 159 deletions.
14 changes: 0 additions & 14 deletions NightX.ipr
Original file line number Diff line number Diff line change
Expand Up @@ -391,20 +391,6 @@
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Minecraft Client" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="1.8 (3)" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="MAIN_CLASS_NAME" value="GradleStart" />
<module name="NightX-Client.NightX.main" />
<option name="PROGRAM_PARAMETERS" value="-Xmx8G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -Djavax.net.ssl.trustStoreType=Windows-ROOT" />
<option name="VM_PARAMETERS" value="-Dfml.coreMods.load=net.aspw.client.injection.forge.TransformerLoader -Ddev-mode" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run" />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Run" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration default="false" name="Minecraft Server" type="Application" factoryName="Application">
<option name="ALTERNATIVE_JRE_PATH" value="1.8 (3)" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
Expand Down
104 changes: 43 additions & 61 deletions NightX.iws

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/main/java/net/aspw/client/Client.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ object Client {
// Create command manager
commandManager = CommandManager()

// Load client fonts
Fonts.loadFonts()

// Init SoundManager
tipSoundManager = TipSoundManager()

Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ object CheckConnection {
var announcement = ""
var discord = ""
var apiKey = ""
var fontDownloader = ""
var changeLog1 = ""
var changeLog2 = ""
var changeLog3 = ""
Expand Down Expand Up @@ -76,15 +75,14 @@ object CheckConnection {
response.close()
httpClient.close()
val details = content.split("~")
fontDownloader = details[5]
announcement = details[4]
discord = details[3]
apiKey = details[2]
if (details[1] == Client.CLIENT_VERSION)
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]
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/net/aspw/client/util/newfont/FontLoaders.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down
Loading

0 comments on commit 465695c

Please sign in to comment.