a few tweaks to ui elements

This commit is contained in:
dags- 2020-03-17 23:30:43 +00:00
parent f76af105fd
commit f7f1c17779
8 changed files with 15 additions and 9 deletions

View File

@ -42,7 +42,7 @@ minecraft {
workingDirectory project.file("run/client") workingDirectory project.file("run/client")
property "forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP" property "forge.logging.markers", "SCAN,REGISTRIES,REGISTRYDUMP"
property "forge.logging.console.level", "debug" property "forge.logging.console.level", "debug"
jvmArgs "-Xmx8G", "-Xms6G", "-Ddev" jvmArgs "-Xmx8G", "-Xms6G", "-Ddev", "-DvanillaBiomes"
mods { mods {
terraforged { terraforged {
source sourceSets.main source sourceSets.main

View File

@ -65,6 +65,7 @@ import com.terraforged.mod.feature.TerrainHelper;
import com.terraforged.mod.feature.predicate.TreeLine; import com.terraforged.mod.feature.predicate.TreeLine;
import com.terraforged.mod.material.Materials; import com.terraforged.mod.material.Materials;
import com.terraforged.mod.material.geology.GeoManager; import com.terraforged.mod.material.geology.GeoManager;
import com.terraforged.mod.util.Environment;
import com.terraforged.mod.util.setup.SetupHooks; import com.terraforged.mod.util.setup.SetupHooks;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.ChunkPos; import net.minecraft.util.math.ChunkPos;
@ -208,7 +209,7 @@ public class TerraChunkGenerator extends ObfHelperChunkGenerator<GenerationSetti
postProcess(container.getChunkReader(), container, context); postProcess(container.getChunkReader(), container, context);
// bake biome array & discard gen data // bake biome array & discard gen data
((ChunkPrimer) chunk).func_225548_a_(container.bakeBiomes(false)); ((ChunkPrimer) chunk).func_225548_a_(container.bakeBiomes(Environment.isVanillaBiomes()));
} }
@Override @Override

View File

@ -78,8 +78,8 @@ public class OverlayScreen extends Screen implements OverlayRenderer {
@Override @Override
public void render(int mouseX, int mouseY, float partial) { public void render(int mouseX, int mouseY, float partial) {
this.x = OverlayScreen.this.width - width - 12; this.x = OverlayScreen.this.width - width - 13;
this.y = 8; this.y = 6;
super.render(mouseX, mouseY, partial); super.render(mouseX, mouseY, partial);
} }
}); });

View File

@ -113,7 +113,7 @@ public class ScrollPane extends AbstractOptionList<ScrollPane.Entry> implements
option.y = top; option.y = top;
option.visible = true; option.visible = true;
option.setWidth(optionWidth); option.setWidth(optionWidth);
option.setHeight(height); option.setHeight(height - 1);
if (option instanceof Preview) { if (option instanceof Preview) {
option.setHeight(option.getWidth()); option.setHeight(option.getWidth());
} }

View File

@ -33,7 +33,7 @@ public class CheckBox extends TerraButton implements Element {
super(displayString); super(displayString);
this.visible = true; this.visible = true;
this.width = 70; this.width = 70;
this.height = 16; this.height = 20;
checked = isChecked; checked = isChecked;
} }

View File

@ -25,13 +25,13 @@
package com.terraforged.mod.gui.element; 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.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
public class TerraButton extends ExtendedButton implements Element { public class TerraButton extends Button implements Element {
private final List<String> tooltip; private final List<String> tooltip;

View File

@ -195,7 +195,7 @@ public abstract class Page implements IGuiEventListener, OverlayRenderer {
this.bottom = height - hpad; this.bottom = height - hpad;
this.width = width; this.width = width;
this.height = height; this.height = height;
this.scrollPane = new ScrollPane(22); this.scrollPane = new ScrollPane(25);
this.scrollPane.updateSize(width, height, 30, height - 30); this.scrollPane.updateSize(width, height, 30, height - 30);
this.scrollPane.setLeftPos(this.left); this.scrollPane.setLeftPos(this.left);
} }

View File

@ -30,11 +30,16 @@ import com.terraforged.mod.Log;
public class Environment { public class Environment {
private static final boolean dev = System.getProperty("dev") != null; private static final boolean dev = System.getProperty("dev") != null;
private static final boolean vanillaBiomes = System.getProperty("vanillaBiomes") != null;
public static boolean isDev() { public static boolean isDev() {
return dev; return dev;
} }
public static boolean isVanillaBiomes() {
return vanillaBiomes;
}
static { static {
if (dev) { if (dev) {
Log.info("Running in developer mode!"); Log.info("Running in developer mode!");