@Override
 public void render() {
   GL11.glPushMatrix();
   GL11.glScalef(SCALE, SCALE, SCALE);
   RenderUtil.bindTexture(TEXTURE);
   model.renderAll();
   GL11.glPopMatrix();
 }
    private boolean isRightFace(BlockCoord me, BlockCoord[] mb, ForgeDirection dir) {
      Vector4d uPlane = RenderUtil.getUPlaneForFace(dir);

      int myRightVal = (int) uPlane.x * me.x + (int) uPlane.y * me.y + (int) uPlane.z * me.z;
      int max = myRightVal;
      for (BlockCoord bc : mb) {
        int val = (int) uPlane.x * bc.x + (int) uPlane.y * bc.y + (int) uPlane.z * bc.z;
        if (val > max) {
          max = val;
        }
      }
      return myRightVal == max;
    }
Exemple #3
0
  public void renderIcon(
      double x, double y, double width, double height, double zLevel, boolean doDraw) {

    Tessellator tessellator = Tessellator.instance;
    if (doDraw) {
      RenderUtil.bindTexture(TEXTURE);
      GL11.glColor3f(1, 1, 1);
      tessellator.startDrawingQuads();
    }
    tessellator.addVertexWithUV(x, y + height, zLevel, minU, maxV);
    tessellator.addVertexWithUV(x + width, y + height, zLevel, maxU, maxV);
    tessellator.addVertexWithUV(x + width, y + 0, zLevel, maxU, minV);
    tessellator.addVertexWithUV(x, y + 0, zLevel, minU, minV);
    if (doDraw) {
      tessellator.draw();
    }
  }