Remove chunkborders

This commit is contained in:
ThisIsALegitUsername 2022-12-27 21:44:26 +00:00
parent b624959f84
commit c99577a013
5 changed files with 36 additions and 36 deletions

View File

@ -1,40 +1,40 @@
package dev.resent.module.impl.misc; // package dev.resent.module.impl.misc;
import dev.resent.Resent; // import dev.resent.Resent;
import dev.resent.event.impl.RenderWorldEvent; // import dev.resent.event.impl.RenderWorldEvent;
import dev.resent.module.base.Category; // import dev.resent.module.base.Category;
import dev.resent.module.base.Mod; // import dev.resent.module.base.Mod;
GlStateManager.popMatrix(); // import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.minecraft.src.AxisAlignedBB; // import net.minecraft.client.renderer.RenderGlobal;
import net.minecraft.src.RenderGlobal; // import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.src.RenderManager; // import net.minecraft.util.AxisAlignedBB;
public class ChunkBorders extends Mod{ // public class ChunkBorders extends Mod{
public ChunkBorders() { // public ChunkBorders() {
super("ChunkBorders", Category.MISC); // super("ChunkBorders", Category.MISC);
Resent.INSTANCE.events().subscribe(RenderWorldEvent.class, event -> { // Resent.INSTANCE.events().subscribe(RenderWorldEvent.class, event -> {
if (this.isEnabled() && mc.theWorld != null) { // if (this.isEnabled() && mc.theWorld != null) {
final int chunkX = mc.thePlayer.chunkCoordX * 16; // final int chunkX = mc.thePlayer.chunkCoordX * 16;
final int chunkZ = mc.thePlayer.chunkCoordZ * 16; // final int chunkZ = mc.thePlayer.chunkCoordZ * 16;
final AxisAlignedBB chunkBB = AxisAlignedBB.getBoundingBox( // final AxisAlignedBB chunkBB = AxisAlignedBB.getBoundingBox(
chunkX, 0.0, chunkZ, // chunkX, 0.0, chunkZ,
chunkX + 16.0, 255.0, chunkZ + 16.0); // chunkX + 16.0, 255.0, chunkZ + 16.0);
GlStateManager.pushMatrix(); // GlStateManager.pushMatrix();
EaglerAdapter.glColor3f(1.0f, 1.0f, 0.0f); // GlStateManager.color(1.0f, 1.0f, 0.0f);
EaglerAdapter.glDisable(EaglerAdapter.GL_TEXTURE_2D); // GlStateManager.disableTexture2D();
EaglerAdapter.glDisable(EaglerAdapter.GL_DEPTH_TEST); // GlStateManager.disableDepth();
EaglerAdapter.glTranslatef((float)-RenderManager.renderPosX, (float)-RenderManager.renderPosY, (float)-RenderManager.renderPosZ); // GlStateManager.translate((float)-RenderManager.renderPosX, (float)-RenderManager.renderPosY, (float)-RenderManager.renderPosZ);
EaglerAdapter.glLineWidth(1f); // GlStateManager.line(1f);
RenderGlobal.drawOutlinedBoundingBox(chunkBB); // RenderGlobal.drawOutlinedBoundingBox(chunkBB);
EaglerAdapter.glEnable(EaglerAdapter.GL_DEPTH_TEST); // GlStateManager.enableDepth();
EaglerAdapter.glEnable(EaglerAdapter.GL_TEXTURE_2D); // GlStateManager.enableTexture2D();
GlStateManager.popMatrix(); // GlStateManager.popMatrix();
} // }
}); // });
} // }
} // }

View File

@ -126,9 +126,9 @@ public class RenderManager {
private Map<String, RenderPlayer> skinMap = Maps.newHashMap(); private Map<String, RenderPlayer> skinMap = Maps.newHashMap();
private RenderPlayer playerRenderer; private RenderPlayer playerRenderer;
private FontRenderer textRenderer; private FontRenderer textRenderer;
private double renderPosX; public double renderPosX;
private double renderPosY; public double renderPosY;
private double renderPosZ; public double renderPosZ;
public TextureManager renderEngine; public TextureManager renderEngine;
public World worldObj; public World worldObj;
public Entity livingPlayer; public Entity livingPlayer;