[code] ChestFinder!
This will make green borders to chests and and lines pointing to them
First, in RenderGlobal.java add this
Code:
public static void chestfinder(double d, double d1, double d2) {
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042 /*GL_BLEND*/);
GL11.glLineWidth(2.0F); // Line width, you can change this
GL11.glColor4f(0.46F, 0.93F, 0.0F, 0.80F); // Line color, you can change this
GL11.glDisable(GL11.GL_LIGHTING); // Disables lighting, so it wont affect lines/outlined bounding box
GL11.glDisable(GL11.GL_TEXTURE_2D); //
GL11.glDisable(2929 /*GL_DEPTH_TEST*/); //Disables checking if there's something between the player and the box/line
GL11.glDepthMask(false);
drawOutlinedBoundingBox(new AxisAlignedBB(d, d1 + 0.1, d2, d + 1.0, d1 + 1.0, d2 + 1.0)); //Draws an outlined bounding box of a chest
GL11.glBegin(GL11.GL_LINES); //Starts to render lines
GL11.glVertex2d(0D, 0D);
GL11.glVertex3d(d + 0.5, d1 + 0.5, d2 + 0.5);
GL11.glEnd(); //end of line rendering
GL11.glEnable(GL11.GL_LIGHTING); //Enables lighting after rendering lines
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(2929 /*GL_DEPTH_TEST*/); //Enables checking
GL11.glDepthMask(true);
GL11.glDisable(3042 /*GL_BLEND*/);
}
Next, go to TileEntityChestRenderer.java and find
Code:
public void func_35376_a(TileEntityChest tileentitychest, double d, double d1, double d2,
float f)
{
Under that, add
Code:
if(Variables.chestfinder) {
RenderGlobal.chestfinder(d, d1, d2);
}
enjoy your hack!
Credits:
tzele
Sketch
First, in RenderGlobal.java add this
Code:
public static void chestfinder(double d, double d1, double d2) {
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042 /*GL_BLEND*/);
GL11.glLineWidth(2.0F); // Line width, you can change this
GL11.glColor4f(0.46F, 0.93F, 0.0F, 0.80F); // Line color, you can change this
GL11.glDisable(GL11.GL_LIGHTING); // Disables lighting, so it wont affect lines/outlined bounding box
GL11.glDisable(GL11.GL_TEXTURE_2D); //
GL11.glDisable(2929 /*GL_DEPTH_TEST*/); //Disables checking if there's something between the player and the box/line
GL11.glDepthMask(false);
drawOutlinedBoundingBox(new AxisAlignedBB(d, d1 + 0.1, d2, d + 1.0, d1 + 1.0, d2 + 1.0)); //Draws an outlined bounding box of a chest
GL11.glBegin(GL11.GL_LINES); //Starts to render lines
GL11.glVertex2d(0D, 0D);
GL11.glVertex3d(d + 0.5, d1 + 0.5, d2 + 0.5);
GL11.glEnd(); //end of line rendering
GL11.glEnable(GL11.GL_LIGHTING); //Enables lighting after rendering lines
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(2929 /*GL_DEPTH_TEST*/); //Enables checking
GL11.glDepthMask(true);
GL11.glDisable(3042 /*GL_BLEND*/);
}
Next, go to TileEntityChestRenderer.java and find
Code:
public void func_35376_a(TileEntityChest tileentitychest, double d, double d1, double d2,
float f)
{
Under that, add
Code:
if(Variables.chestfinder) {
RenderGlobal.chestfinder(d, d1, d2);
}
enjoy your hack!
Credits:
tzele
Sketch
