Program: 156295
Project: 156295
Buggy source:
@Override public void renderAddonFast(AddonFillingPlanner addon,EntityPlayer player,float partialTicks,VertexBuffer vb){
  Template.BuildingInfo info=addon.buildingInfo;
  if (info == null) {
    return;
  }
  info.box.getBlocksInArea().stream().filter(blockPos -> info.getSnapshot().data.get(info.getSnapshot().posToIndex(info.fromWorld(blockPos)))).filter(player.world::isAirBlock).sorted(Comparator.comparing((  BlockPos blockPos) -> Math.pow(player.posX - blockPos.getX(),2) + Math.pow(player.posY - blockPos.getY(),2) + Math.pow(player.posZ - blockPos.getZ(),2)).reversed()).forEach(blockPos -> {
    AxisAlignedBB bb=new AxisAlignedBB(blockPos,blockPos.add(1,1,1)).expandXyz(-0.1);
    TextureAtlasSprite s=ModelLoader.White.INSTANCE;
    vb.pos(bb.minX,bb.maxY,bb.minZ).color(204,204,204,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.minZ).color(204,204,204,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.minZ).color(204,204,204,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.minZ).color(204,204,204,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.maxZ).color(204,204,204,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.maxZ).color(204,204,204,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.maxZ).color(204,204,204,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.maxZ).color(204,204,204,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.minZ).color(127,127,127,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.minZ).color(127,127,127,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.maxZ).color(127,127,127,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.maxZ).color(127,127,127,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.maxZ).color(255,255,255,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.maxZ).color(255,255,255,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.minZ).color(255,255,255,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.minZ).color(255,255,255,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.maxZ).color(153,153,153,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.maxZ).color(153,153,153,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.minZ).color(153,153,153,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.minZ).color(153,153,153,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.minZ).color(153,153,153,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.minZ).color(153,153,153,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.maxZ).color(153,153,153,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.maxZ).color(153,153,153,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
  }
);
}

Fixed version (ground truth):
@Override public void renderAddonFast(AddonFillingPlanner addon,EntityPlayer player,float partialTicks,VertexBuffer vb){
  Template.BuildingInfo info=addon.buildingInfo;
  if (info == null) {
    return;
  }
  Profiler prof=Minecraft.getMinecraft().mcProfiler;
  prof.startSection("String_Node_Str");
  prof.startSection("String_Node_Str");
  List<BlockPos> list=new ArrayList<>();
  Template tpl=info.getSnapshot();
  for (  BlockPos p : BlockPos.getAllInBoxMutable(info.box.min(),info.box.max())) {
    if (tpl.data.get(tpl.posToIndex(info.fromWorld(p))) && player.world.isAirBlock(p)) {
      list.add(p.toImmutable());
    }
  }
  prof.endStartSection("String_Node_Str");
  list.sort(Comparator.<BlockPos>comparingDouble((p) -> {
    return player.getPositionVector().squareDistanceTo(new Vec3d(p));
  }
).reversed());
  prof.endStartSection("String_Node_Str");
  for (  BlockPos p : list) {
    AxisAlignedBB bb=new AxisAlignedBB(p,p.add(1,1,1)).expandXyz(-0.1);
    TextureAtlasSprite s=ModelLoader.White.INSTANCE;
    vb.pos(bb.minX,bb.maxY,bb.minZ).color(204,204,204,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.minZ).color(204,204,204,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.minZ).color(204,204,204,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.minZ).color(204,204,204,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.maxZ).color(204,204,204,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.maxZ).color(204,204,204,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.maxZ).color(204,204,204,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.maxZ).color(204,204,204,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.minZ).color(127,127,127,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.minZ).color(127,127,127,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.maxZ).color(127,127,127,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.maxZ).color(127,127,127,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.maxZ).color(255,255,255,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.maxZ).color(255,255,255,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.minZ).color(255,255,255,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.minZ).color(255,255,255,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.maxZ).color(153,153,153,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.maxZ).color(153,153,153,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.maxY,bb.minZ).color(153,153,153,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.minX,bb.minY,bb.minZ).color(153,153,153,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.minZ).color(153,153,153,127).tex(s.getMinU(),s.getMinV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.minZ).color(153,153,153,127).tex(s.getMinU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.maxY,bb.maxZ).color(153,153,153,127).tex(s.getMaxU(),s.getMaxV()).lightmap(240,0).endVertex();
    vb.pos(bb.maxX,bb.minY,bb.maxZ).color(153,153,153,127).tex(s.getMaxU(),s.getMinV()).lightmap(240,0).endVertex();
  }
  prof.endSection();
  prof.endSection();
}