From e6ab006b39ca4167a4601eb65d573aa6702c806c Mon Sep 17 00:00:00 2001 From: kirillsaint Date: Sat, 20 Jan 2024 13:20:23 +0600 Subject: [PATCH] (feature) chunk borders colors --- .../client/mods/render/ChunkBordersMod.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/silentclient/client/mods/render/ChunkBordersMod.java b/src/main/java/net/silentclient/client/mods/render/ChunkBordersMod.java index 9cc1b9f..8660f01 100644 --- a/src/main/java/net/silentclient/client/mods/render/ChunkBordersMod.java +++ b/src/main/java/net/silentclient/client/mods/render/ChunkBordersMod.java @@ -1,25 +1,32 @@ package net.silentclient.client.mods.render; -import java.awt.Color; - -import org.lwjgl.opengl.GL11; - import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.silentclient.client.Client; import net.silentclient.client.event.EventTarget; import net.silentclient.client.event.impl.EventRender3D; import net.silentclient.client.mods.Mod; import net.silentclient.client.mods.ModCategory; +import org.lwjgl.opengl.GL11; + +import java.awt.*; public class ChunkBordersMod extends Mod { public ChunkBordersMod() { super("Chunk Borders", ModCategory.MODS, "silentclient/icons/mods/chunkborders.png"); } - - @EventTarget + + @Override + public void setup() { + super.setup(); + this.addColorSetting("Chunk Walls", this, Color.YELLOW); + this.addColorSetting("Chunk Corners", this, Color.BLUE); + } + + @EventTarget public void onRender3D(EventRender3D event) { EntityPlayerSP entity = Minecraft.getMinecraft().thePlayer; Tessellator tessellator = Tessellator.getInstance(); @@ -41,8 +48,8 @@ public class ChunkBordersMod extends Mod { double x = 0.0D; double z = 0.0D; - Color color = Color.BLUE; - Color color2 = Color.YELLOW; + Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "Chunk Corners").getValColor(); + Color color2 = Client.getInstance().getSettingsManager().getSettingByName(this, "Chunk Walls").getValColor(); int eyeHeightBlock;