(feature) chunk borders colors

This commit is contained in:
kirillsaint 2024-01-20 13:20:23 +06:00
parent be43190807
commit e6ab006b39

View File

@ -1,24 +1,31 @@
package net.silentclient.client.mods.render; package net.silentclient.client.mods.render;
import java.awt.Color;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.silentclient.client.Client;
import net.silentclient.client.event.EventTarget; import net.silentclient.client.event.EventTarget;
import net.silentclient.client.event.impl.EventRender3D; import net.silentclient.client.event.impl.EventRender3D;
import net.silentclient.client.mods.Mod; import net.silentclient.client.mods.Mod;
import net.silentclient.client.mods.ModCategory; import net.silentclient.client.mods.ModCategory;
import org.lwjgl.opengl.GL11;
import java.awt.*;
public class ChunkBordersMod extends Mod { public class ChunkBordersMod extends Mod {
public ChunkBordersMod() { public ChunkBordersMod() {
super("Chunk Borders", ModCategory.MODS, "silentclient/icons/mods/chunkborders.png"); super("Chunk Borders", ModCategory.MODS, "silentclient/icons/mods/chunkborders.png");
} }
@Override
public void setup() {
super.setup();
this.addColorSetting("Chunk Walls", this, Color.YELLOW);
this.addColorSetting("Chunk Corners", this, Color.BLUE);
}
@EventTarget @EventTarget
public void onRender3D(EventRender3D event) { public void onRender3D(EventRender3D event) {
EntityPlayerSP entity = Minecraft.getMinecraft().thePlayer; EntityPlayerSP entity = Minecraft.getMinecraft().thePlayer;
@ -41,8 +48,8 @@ public class ChunkBordersMod extends Mod {
double x = 0.0D; double x = 0.0D;
double z = 0.0D; double z = 0.0D;
Color color = Color.BLUE; Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "Chunk Corners").getValColor();
Color color2 = Color.YELLOW; Color color2 = Client.getInstance().getSettingsManager().getSettingByName(this, "Chunk Walls").getValColor();
int eyeHeightBlock; int eyeHeightBlock;