Program: 169526
Project: 169526
Buggy source:
@Override public boolean renderWorldBlock(IBlockAccess world,int x,int y,int z,Block block,int modelId,RenderBlocks renderer){
  if (pass == 0) {
    BlockLamp bLamp=(BlockLamp)block;
    int redMask=0xFF0000, greenMask=0xFF00, blueMask=0xFF;
    int r=(bLamp.getColor() & redMask) >> 16;
    int g=(bLamp.getColor() & greenMask) >> 8;
    int b=(bLamp.getColor() & blueMask);
    Vector3Cube vector=new Vector3Cube(0.0,0.0,0.0,1.0,1.0,1.0);
    Tessellator t=Tessellator.instance;
    t.addTranslation(x,y,z);
    t.setColorOpaque(r,g,b);
    IIcon iconToUse;
    int power=((TileLamp)world.getTileEntity(x,y,z)).getPower();
    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,240f,240f);
    if (bLamp.isInverted()) {
      power=15 - power;
    }
    if (power == 0) {
      iconToUse=IconSupplier.lampOn;
    }
 else {
      iconToUse=IconSupplier.lampOff;
    }
    double minU=iconToUse.getMinU();
    double maxU=iconToUse.getMaxU();
    double minV=iconToUse.getMinV();
    double maxV=iconToUse.getMaxV();
    t.setNormal(0,-1,0);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMaxZ(),minU,maxV);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMaxZ(),minU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMinZ(),maxU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMinZ(),maxU,maxV);
    t.setNormal(0,1,0);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMaxZ(),minU,maxV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMaxZ(),minU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMinZ(),maxU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMinZ(),maxU,maxV);
    t.setNormal(-1,0,0);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMaxZ(),minU,maxV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMaxZ(),minU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMinZ(),maxU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMinZ(),maxU,maxV);
    t.setNormal(1,0,0);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMinZ(),minU,maxV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMinZ(),minU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMaxZ(),maxU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMaxZ(),maxU,maxV);
    t.setNormal(0,0,-1);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMinZ(),minU,maxV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMinZ(),minU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMinZ(),maxU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMinZ(),maxU,maxV);
    t.setNormal(0,0,1);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMaxZ(),minU,maxV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMaxZ(),maxU,maxV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMaxZ(),maxU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMaxZ(),minU,minV);
    t.addTranslation(-x,-y,-z);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean renderWorldBlock(IBlockAccess world,int x,int y,int z,Block block,int modelId,RenderBlocks renderer){
  if (pass == 0) {
    BlockLamp bLamp=(BlockLamp)block;
    int redMask=0xFF0000, greenMask=0xFF00, blueMask=0xFF;
    int r=(bLamp.getColor() & redMask) >> 16;
    int g=(bLamp.getColor() & greenMask) >> 8;
    int b=(bLamp.getColor() & blueMask);
    Vector3Cube vector=new Vector3Cube(0.0,0.0,0.0,1.0,1.0,1.0);
    Tessellator t=Tessellator.instance;
    t.addTranslation(x,y,z);
    t.setColorOpaque(r,g,b);
    IIcon iconToUse;
    int power=((TileLamp)world.getTileEntity(x,y,z)).getPower();
    if (bLamp.isInverted()) {
      power=15 - power;
    }
    if (power == 0) {
      iconToUse=IconSupplier.lampOn;
    }
 else {
      iconToUse=IconSupplier.lampOff;
    }
    double minU=iconToUse.getMinU();
    double maxU=iconToUse.getMaxU();
    double minV=iconToUse.getMinV();
    double maxV=iconToUse.getMaxV();
    t.setNormal(0,-1,0);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMaxZ(),minU,maxV);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMaxZ(),minU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMinZ(),maxU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMinZ(),maxU,maxV);
    t.setNormal(0,1,0);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMaxZ(),minU,maxV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMaxZ(),minU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMinZ(),maxU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMinZ(),maxU,maxV);
    t.setNormal(-1,0,0);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMaxZ(),minU,maxV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMaxZ(),minU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMinZ(),maxU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMinZ(),maxU,maxV);
    t.setNormal(1,0,0);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMinZ(),minU,maxV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMinZ(),minU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMaxZ(),maxU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMaxZ(),maxU,maxV);
    t.setNormal(0,0,-1);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMinZ(),minU,maxV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMinZ(),minU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMinZ(),maxU,minV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMinZ(),maxU,maxV);
    t.setNormal(0,0,1);
    t.addVertexWithUV(vector.getMinX(),vector.getMinY(),vector.getMaxZ(),minU,maxV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMinY(),vector.getMaxZ(),maxU,maxV);
    t.addVertexWithUV(vector.getMaxX(),vector.getMaxY(),vector.getMaxZ(),maxU,minV);
    t.addVertexWithUV(vector.getMinX(),vector.getMaxY(),vector.getMaxZ(),minU,minV);
    t.addTranslation(-x,-y,-z);
    return true;
  }
  return false;
}