]> git.lizzy.rs Git - BoundingBoxOutlineReloaded.git/blobdiff - src/main/java/com/irtimaled/bbor/client/gui/SettingsScreen.java
Upgrade to 1.13.2
[BoundingBoxOutlineReloaded.git] / src / main / java / com / irtimaled / bbor / client / gui / SettingsScreen.java
index 6b13932ee3b742c7ade362d44bf62edbeedb2a3d..f2af58f5a86e05825bc4fc8eb1e273f73a20e8e3 100644 (file)
@@ -1,6 +1,6 @@
 package com.irtimaled.bbor.client.gui;
 
-import com.irtimaled.bbor.client.ClientProxy;
+import com.irtimaled.bbor.client.ClientRenderer;
 import com.irtimaled.bbor.client.renderers.Renderer;
 import com.irtimaled.bbor.common.BoundingBoxType;
 import com.irtimaled.bbor.common.TypeHelper;
@@ -39,7 +39,7 @@ public class SettingsScreen extends GuiScreen {
 
     private void addControl(IRenderableControl control) {
         this.controls.add(control);
-        TypeHelper.doIfType(control, IGuiEventListener.class, this.eventListeners::add);
+        TypeHelper.doIfType(control, IGuiEventListener.class, this.children::add);
     }
 
     private void addTabs(String... labels) {
@@ -108,8 +108,9 @@ public class SettingsScreen extends GuiScreen {
         }
     }
 
+    @Override
     protected void initGui() {
-        this.title = ClientProxy.Name;
+        this.title = "Bounding Box Outline Reloaded";
 
         this.controls = new HashSet<>();
         this.addTabs("General", "Structures", "Villages");
@@ -118,19 +119,17 @@ public class SettingsScreen extends GuiScreen {
                 (id, x, y, width) -> new AbstractButton(id, x, y, width, "Active", this.mc.world != null) {
                     @Override
                     public void onPressed() {
-                        ClientProxy.toggleActive();
+                        ClientRenderer.toggleActive();
                     }
 
                     @Override
                     protected int getState() {
-                        return enabled ? ClientProxy.active ? 2 : 1 : 0;
+                        return enabled ? ClientRenderer.getActive() ? 2 : 1 : 0;
                     }
                 },
                 (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Outer Box Only", ConfigManager.outerBoxesOnly),
                 (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Fill", ConfigManager.fill),
 
-                (id, x, y, width) -> (IRowHeight) () -> 0.5,
-
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Spawn Chunks", BoundingBoxType.WorldSpawn),
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Lazy Chunks", BoundingBoxType.LazySpawnChunks),
                 (id, x, y, width) -> new MaxYSettingSlider(id, x, y, width, 39, ConfigManager.worldSpawnMaxY),
@@ -141,7 +140,21 @@ public class SettingsScreen extends GuiScreen {
 
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Mob Spawners", BoundingBoxType.MobSpawner),
                 (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Spawn Area", ConfigManager.renderMobSpawnerSpawnArea),
-                (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Activation Lines", ConfigManager.renderMobSpawnerActivationLines));
+                (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Activation Lines", ConfigManager.renderMobSpawnerActivationLines),
+
+                (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Spawn Sphere", BoundingBoxType.AFKSphere),
+                (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Spawnable Blocks", ConfigManager.renderAFKSpawnableBlocks),
+                (id, x, y, width) -> new IntSettingSlider(id, x, y, width, 1, 3, "Distance", ConfigManager.afkSpawnableBlocksRenderDistance)
+                        .addDisplayValue(1, "Nearest")
+                        .addDisplayValue(2, "Nearer")
+                        .addDisplayValue(3, "Normal"),
+
+                (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Biome Borders", BoundingBoxType.BiomeBorder),
+                (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Only This Biome", ConfigManager.renderOnlyCurrentBiome),
+                (id, x, y, width) -> new IntSettingSlider(id, x, y, width, 1, 3, "Distance", ConfigManager.biomeBordersRenderDistance)
+                        .addDisplayValue(1, "Nearest")
+                        .addDisplayValue(2, "Nearer")
+                        .addDisplayValue(3, "Normal"));
         buildTab(1,
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Desert Temples", BoundingBoxType.DesertTemple),
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Jungle Temples", BoundingBoxType.JungleTemple),
@@ -155,18 +168,18 @@ public class SettingsScreen extends GuiScreen {
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Buried Treasure", BoundingBoxType.BuriedTreasure),
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Shipwrecks", BoundingBoxType.Shipwreck),
 
-                (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Pillager Outposts", BoundingBoxType.PillagerOutpost),
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Strongholds", BoundingBoxType.Stronghold),
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Mineshafts", BoundingBoxType.MineShaft),
+                (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Pillager Outposts", BoundingBoxType.PillagerOutpost, false),
 
+                (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Villages", BoundingBoxType.Village),
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "Fortresses", BoundingBoxType.NetherFortress),
                 (id, x, y, width) -> new BoundingBoxTypeButton(id, x, y, width, "End Cities", BoundingBoxType.EndCity));
         buildTab(2,
-                (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Villages", ConfigManager.drawVillages),
+                (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Village Spheres", ConfigManager.drawVillageSpheres),
                 (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Door Lines", ConfigManager.drawVillageDoors),
                 (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Golem Spawn", ConfigManager.drawIronGolemSpawnArea),
 
-                (id, x, y, width) -> new BoolSettingButton(id, x, y, width, "Render Sphere", ConfigManager.renderVillageAsSphere),
                 (id, x, y, width) -> new IntSettingSlider(id, x, y, width, 1, 5, "Dot Size", ConfigManager.villageSphereDotSize),
                 (id, x, y, width) -> new IntSettingSlider(id, x, y, width, 1, 5, "Density", ConfigManager.villageSphereDensity)
                         .addDisplayValue(1, "Fewest")
@@ -221,6 +234,7 @@ public class SettingsScreen extends GuiScreen {
         GL11.glEnable(GL11.GL_TEXTURE_2D);
         GL11.glShadeModel(7424);
         GL11.glEnable(GL11.GL_ALPHA_TEST);
+        OpenGlHelper.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
         GL11.glDisable(GL11.GL_BLEND);
     }