package net.minecraft.client.renderer;

import java.util.Iterator;
import net.minecraft.client.renderer.chunk.ListedRenderChunk;
import net.minecraft.client.renderer.chunk.RenderChunk;
import net.minecraft.util.EnumWorldBlockLayer;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.opengl.GL11;

@SideOnly(Side.CLIENT)
public class RenderList extends ChunkRenderContainer
{
    private static final String __OBFID = "CL_00000957";

    public void func_178001_a(EnumWorldBlockLayer p_178001_1_)
    {
        if (this.field_178007_b)
        {
            Iterator iterator = this.field_178009_a.iterator();

            while (iterator.hasNext())
            {
                RenderChunk renderchunk = (RenderChunk)iterator.next();
                ListedRenderChunk listedrenderchunk = (ListedRenderChunk)renderchunk;
                GlStateManager.pushMatrix();
                this.func_178003_a(renderchunk);
                GL11.glCallList(listedrenderchunk.func_178600_a(p_178001_1_, listedrenderchunk.func_178571_g()));
                GlStateManager.popMatrix();
            }

            GlStateManager.func_179117_G();
            this.field_178009_a.clear();
        }
    }
}