From 990ebe778ea00dbf2bdbfb967aba8e892fae8be2 Mon Sep 17 00:00:00 2001 From: bermudalocket Date: Wed, 8 Jul 2020 22:02:59 -0400 Subject: [PATCH] Fix issue causing LogBlock results to not render --- gradle.properties | 7 ++----- .../bermudalocket/euclid/Configuration.java | 21 ++++--------------- .../com/bermudalocket/euclid/EuclidMenu.java | 2 +- .../bermudalocket/euclid/logblock/Result.java | 1 + 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/gradle.properties b/gradle.properties index 1d23655..213a200 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,4 @@ # Mod Properties - mod_version = 1.2 + mod_version = 1.2.1 maven_group = com.bermudalocket - archives_base_name = euclid - -# Dependencies - fabric_version=0.13.1+build.370-1.16 \ No newline at end of file + archives_base_name = euclid \ No newline at end of file diff --git a/src/main/java/com/bermudalocket/euclid/Configuration.java b/src/main/java/com/bermudalocket/euclid/Configuration.java index cec89f7..3a36aec 100644 --- a/src/main/java/com/bermudalocket/euclid/Configuration.java +++ b/src/main/java/com/bermudalocket/euclid/Configuration.java @@ -20,7 +20,6 @@ public class Configuration { private final File configFile; - public boolean SEND_INIT_HANDSHAKE_AUTOMATICALLY = true; public int WIREFRAME_RED = 255; public int WIREFRAME_GREEN = 0; public int WIREFRAME_BLUE = 0; @@ -39,15 +38,6 @@ private Configuration() { ConfigBuilder builder = ConfigBuilder.create().setTitle(new LiteralText("Euclid Configuration")); ConfigEntryBuilder entryBuilder = ConfigEntryBuilder.create(); - ConfigCategory mainCategory = builder.getOrCreateCategory(new LiteralText("Euclid")); - mainCategory.addEntry(entryBuilder - .startBooleanToggle(new LiteralText("Automatic handshake (/we cui) upon login"), this.SEND_INIT_HANDSHAKE_AUTOMATICALLY) - .setSaveConsumer(b -> { - this.SEND_INIT_HANDSHAKE_AUTOMATICALLY = b; - this.save(); - }) - .build() - ); ConfigCategory wireframeCategory = builder.getOrCreateCategory(new LiteralText("Wireframe")); wireframeCategory.addEntry(entryBuilder .startIntSlider(new LiteralText("Red"), 255, 0, 255) @@ -94,11 +84,10 @@ public void load() { Properties props = new Properties(); props.load(in); in.close(); - SEND_INIT_HANDSHAKE_AUTOMATICALLY = Boolean.parseBoolean((String) props.computeIfAbsent("auto-handshake", i -> "false")); - WIREFRAME_RED = Integer.parseInt((String) props.computeIfAbsent("wireframe-red", i -> "255")); - WIREFRAME_GREEN = Integer.parseInt((String) props.computeIfAbsent("wireframe-green", i -> "0")); - WIREFRAME_BLUE = Integer.parseInt((String) props.computeIfAbsent("wireframe-blue", i -> "0")); - WIREFRAME_ALPHA = Integer.parseInt((String) props.computeIfAbsent("wireframe-alpha", i -> "37")); + WIREFRAME_RED = Integer.parseInt((String) props.computeIfAbsent("wireframe-red", __ -> "255")); + WIREFRAME_GREEN = Integer.parseInt((String) props.computeIfAbsent("wireframe-green", __ -> "0")); + WIREFRAME_BLUE = Integer.parseInt((String) props.computeIfAbsent("wireframe-blue", __ -> "0")); + WIREFRAME_ALPHA = Integer.parseInt((String) props.computeIfAbsent("wireframe-alpha", __ -> "37")); } catch (IOException e) { e.printStackTrace(); } @@ -107,8 +96,6 @@ public void load() { public void save() { try { FileOutputStream out = new FileOutputStream(configFile, false); - out.write(("auto-handshake=" + SEND_INIT_HANDSHAKE_AUTOMATICALLY).getBytes()); - out.write("\n".getBytes()); out.write(("wireframe-red=" + WIREFRAME_RED).getBytes()); out.write("\n".getBytes()); out.write(("wireframe-green=" + WIREFRAME_GREEN).getBytes()); diff --git a/src/main/java/com/bermudalocket/euclid/EuclidMenu.java b/src/main/java/com/bermudalocket/euclid/EuclidMenu.java index 7067eef..d939e87 100644 --- a/src/main/java/com/bermudalocket/euclid/EuclidMenu.java +++ b/src/main/java/com/bermudalocket/euclid/EuclidMenu.java @@ -40,7 +40,7 @@ public class EuclidMenu { public static Text LB_FAVS = new LiteralText("LB Shortcuts: ").setStyle(Style.EMPTY.withBold(true)); - public static Text VERSION = new LiteralText("Euclid v1.1").setStyle(Style.EMPTY.withColor(Formatting.GREEN).withBold(true)); + public static Text VERSION = new LiteralText("Euclid v1.2.1").setStyle(Style.EMPTY.withColor(Formatting.GREEN)); public static Text INFO_MSG = new LiteralText("Click here to report a bug on GitHub.") diff --git a/src/main/java/com/bermudalocket/euclid/logblock/Result.java b/src/main/java/com/bermudalocket/euclid/logblock/Result.java index db622d0..8e21b6b 100644 --- a/src/main/java/com/bermudalocket/euclid/logblock/Result.java +++ b/src/main/java/com/bermudalocket/euclid/logblock/Result.java @@ -18,6 +18,7 @@ public Result(int id, String player, Block block, BlockPos pos, long timestamp) this.block = block; this.blockPos = pos; this.timestamp = timestamp; + this.visible = true; } public long getTimestamp() {