The code is:
@Override
public void drawScreen(int x, int y, float f) {
//super.drawScreen(x, y, f);
int xCenter = this.resolution.Width / 2; // Current Minecraft Width
int yCenter = this.resolution.Height / 2; // Current Minecraft Height
int midRectHeight = this.resolution.UsableHeight / 2; // This is the Current Minecraft Window Size minus the BorderSize
int midRectWidth = this.resolution.UsableWidth / 2; // This is the Current Minecraft Window Size minus the BorderSize
int topCenter = yCenter - midRectHeight; // Top X to Center the Rectangle
int leftCenter = xCenter - midRectWidth; // Left Y to Center the Rectangle
drawsScreen(topCenter, leftCenter);
}
private void drawsScreen(int x, int y) {
// drawDefaultBackground();
this.mc.renderEngine.bindTexture(new ResourceLocation("blazemachines",
"/textures/gui/display.png"));
double yFinal = y + this.resolution.UsableHeight; // This is the Current Minecraft Window Size minus the BorderSize
double xFinal = x + this.resolution.UsableWidth; // This is the Current Minecraft Window Size minus the BorderSize
yFinal = yFinal - ScreenResolution.BorderSize; // < BorderSize is 10
xFinal = xFinal - ScreenResolution.BorderSize; // < BorderSize is 10
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawing(GL11.GL_QUADS);
tessellator.addVertexWithUV(x, yFinal, 0, 0.0, 1.0);
tessellator.addVertexWithUV(xFinal, yFinal, 0, 1.0, 1.0);
tessellator.addVertexWithUV(xFinal, y, 0, 1.0, 0.0);
tessellator.addVertexWithUV(x, y, 0, 0.0, 0.0);
tessellator.draw();
}