Skip to content

Commit

Permalink
Fix issue causing LogBlock results to not render
Browse files Browse the repository at this point in the history
  • Loading branch information
bermudalocket committed Jul 9, 2020
1 parent d71a867 commit 990ebe7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
7 changes: 2 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
archives_base_name = euclid
21 changes: 4 additions & 17 deletions src/main/java/com/bermudalocket/euclid/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down Expand Up @@ -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();
}
Expand All @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/bermudalocket/euclid/EuclidMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 990ebe7

Please sign in to comment.