From f7f1c17779dcb6f9fa183cc9d3179649cb9dfa98 Mon Sep 17 00:00:00 2001 From: dags- Date: Tue, 17 Mar 2020 23:30:43 +0000 Subject: [PATCH] a few tweaks to ui elements --- TerraForgedMod/build.gradle | 2 +- .../java/com/terraforged/mod/chunk/TerraChunkGenerator.java | 3 ++- .../src/main/java/com/terraforged/mod/gui/OverlayScreen.java | 4 ++-- .../src/main/java/com/terraforged/mod/gui/ScrollPane.java | 2 +- .../main/java/com/terraforged/mod/gui/element/CheckBox.java | 2 +- .../java/com/terraforged/mod/gui/element/TerraButton.java | 4 ++-- .../src/main/java/com/terraforged/mod/gui/page/Page.java | 2 +- .../src/main/java/com/terraforged/mod/util/Environment.java | 5 +++++ 8 files changed, 15 insertions(+), 9 deletions(-) diff --git a/TerraForgedMod/build.gradle b/TerraForgedMod/build.gradle index 9749444..793201e 100644 --- a/TerraForgedMod/build.gradle +++ b/TerraForgedMod/build.gradle @@ -42,7 +42,7 @@ minecraft { workingDirectory project.file("run/client") property "forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP" property "forge.logging.console.level", "debug" - jvmArgs "-Xmx8G", "-Xms6G", "-Ddev" + jvmArgs "-Xmx8G", "-Xms6G", "-Ddev", "-DvanillaBiomes" mods { terraforged { source sourceSets.main diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/TerraChunkGenerator.java b/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/TerraChunkGenerator.java index c951ffc..bf09d7e 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/TerraChunkGenerator.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/chunk/TerraChunkGenerator.java @@ -65,6 +65,7 @@ import com.terraforged.mod.feature.TerrainHelper; import com.terraforged.mod.feature.predicate.TreeLine; import com.terraforged.mod.material.Materials; import com.terraforged.mod.material.geology.GeoManager; +import com.terraforged.mod.util.Environment; import com.terraforged.mod.util.setup.SetupHooks; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.ChunkPos; @@ -208,7 +209,7 @@ public class TerraChunkGenerator extends ObfHelperChunkGenerator implements option.y = top; option.visible = true; option.setWidth(optionWidth); - option.setHeight(height); + option.setHeight(height - 1); if (option instanceof Preview) { option.setHeight(option.getWidth()); } diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/gui/element/CheckBox.java b/TerraForgedMod/src/main/java/com/terraforged/mod/gui/element/CheckBox.java index 5a6cfeb..bf68624 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/gui/element/CheckBox.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/gui/element/CheckBox.java @@ -33,7 +33,7 @@ public class CheckBox extends TerraButton implements Element { super(displayString); this.visible = true; this.width = 70; - this.height = 16; + this.height = 20; checked = isChecked; } diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/gui/element/TerraButton.java b/TerraForgedMod/src/main/java/com/terraforged/mod/gui/element/TerraButton.java index aa6c651..8628c84 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/gui/element/TerraButton.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/gui/element/TerraButton.java @@ -25,13 +25,13 @@ package com.terraforged.mod.gui.element; -import net.minecraftforge.fml.client.gui.widget.ExtendedButton; +import net.minecraft.client.gui.widget.button.Button; import java.util.Arrays; import java.util.Collections; import java.util.List; -public class TerraButton extends ExtendedButton implements Element { +public class TerraButton extends Button implements Element { private final List tooltip; diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/gui/page/Page.java b/TerraForgedMod/src/main/java/com/terraforged/mod/gui/page/Page.java index 3bc71f0..f806fad 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/gui/page/Page.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/gui/page/Page.java @@ -195,7 +195,7 @@ public abstract class Page implements IGuiEventListener, OverlayRenderer { this.bottom = height - hpad; this.width = width; this.height = height; - this.scrollPane = new ScrollPane(22); + this.scrollPane = new ScrollPane(25); this.scrollPane.updateSize(width, height, 30, height - 30); this.scrollPane.setLeftPos(this.left); } diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/util/Environment.java b/TerraForgedMod/src/main/java/com/terraforged/mod/util/Environment.java index d539ac0..5d57520 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/util/Environment.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/util/Environment.java @@ -30,11 +30,16 @@ import com.terraforged.mod.Log; public class Environment { private static final boolean dev = System.getProperty("dev") != null; + private static final boolean vanillaBiomes = System.getProperty("vanillaBiomes") != null; public static boolean isDev() { return dev; } + public static boolean isVanillaBiomes() { + return vanillaBiomes; + } + static { if (dev) { Log.info("Running in developer mode!");