From 8a9e9451b717ccbfb72a439b9627bb142d2154b7 Mon Sep 17 00:00:00 2001 From: Sen Date: Mon, 30 Jun 2025 21:06:13 +0200 Subject: [PATCH] change defaults, add texture --- client/src/main/java/client/Client.java | 10 +- client/src/main/java/client/gui/Font.java | 2 +- .../textures/blocks/concrete_plate.png | Bin 0 -> 252 bytes .../block/tech/BlockRedstoneComparator.java | 40 ++--- .../block/tech/BlockRedstoneRepeater.java | 160 +++++++++--------- 5 files changed, 107 insertions(+), 105 deletions(-) create mode 100644 client/src/main/resources/textures/blocks/concrete_plate.png diff --git a/client/src/main/java/client/Client.java b/client/src/main/java/client/Client.java index 8d7024cc..0750d823 100755 --- a/client/src/main/java/client/Client.java +++ b/client/src/main/java/client/Client.java @@ -432,7 +432,7 @@ public class Client implements IThreadListener { private int scale = 1; @Variable(name = "gui_scale", category = CVarCategory.GUI, min = 1, max = 5, display = "Skalierung", unit = "x", callback = RedrawFunction.class) - private int scaleVar = 1; + private int scaleVar = 2; @Variable(name = "phy_sensitivity", category = CVarCategory.INPUT, min = 0.01f, max = 10.0f, display = "Mausempfindlichkeit", precision = 2, unit = "%") public float sensitivity = 1.0f; @@ -475,10 +475,10 @@ public class Client implements IThreadListener { @Variable(name = "gui_scroll_lines", category = CVarCategory.GUI, min = 1, max = 10, display = "Scrollbreite", unit = "Zeilen") public int scrollLines = 3; @Variable(name = "gui_font", category = CVarCategory.GUI, display = "Schriftart", callback = FontFunction.class) - public Font font = Font.LARGE; + public Font font = Font.SMALL; @Variable(name = "draw_downfall_range", category = CVarCategory.RENDER, min = 0, max = 15, display = "Niederschlag-Radius") - public int downfallRange = 10; + public int downfallRange = 4; @Variable(name = "draw_rain_particle_range", category = CVarCategory.RENDER, min = 0, max = 25, display = "Regen-Partikel-Radius") public int rainParticleRange = 10; @@ -636,6 +636,8 @@ public class Client implements IThreadListener { public void refreshResources() { + Font.unload(); + Font.load(this.font); this.textureManager.onReload(); ColormapLoader.reload(); this.modelManager.onReload(); @@ -2250,7 +2252,7 @@ public class Client implements IThreadListener { this.registerDebug(); System.gc(); System.gc(); - Font.load(Font.LARGE); + Font.load(this.font); GlState.enableBlend(); GlState.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); this.initConsole(); diff --git a/client/src/main/java/client/gui/Font.java b/client/src/main/java/client/gui/Font.java index e2b8fe8e..75e911b3 100644 --- a/client/src/main/java/client/gui/Font.java +++ b/client/src/main/java/client/gui/Font.java @@ -103,7 +103,7 @@ public enum Font implements Identifyable, Displayable { img = null; } if(img == null) - throw new IllegalStateException("Konnte erforderliche Schriftart nicht laden"); + img = new BufferedImage(XGLYPH * 16, YGLYPH * 16, BufferedImage.TYPE_INT_ARGB); int[] data = new int[XGLYPH * 16 * YGLYPH * 16]; img.getRGB(0, 0, XGLYPH * 16, YGLYPH * 16, data, 0, XGLYPH * 16); calculate(data, SIZES, XGLYPH, YGLYPH, 0); diff --git a/client/src/main/resources/textures/blocks/concrete_plate.png b/client/src/main/resources/textures/blocks/concrete_plate.png new file mode 100644 index 0000000000000000000000000000000000000000..090657d35ab2345c4c0c10b69fc3646bf5278d85 GIT binary patch literal 252 zcmVO}OlM>)nY}zfV&-}Tu(twP=S)8(zAln?Tht$HZ^P7)d!8_z~s!a)cFrlz|U|{@sU$8=O}F0000