Java 类net.minecraft.util.EnumWorldBlockLayer 实例源码

项目:BaseClient    文件:RenderChunk.java   
public RenderChunk(World worldIn, RenderGlobal renderGlobalIn, BlockPos blockPosIn, int indexIn)
{
    this.world = worldIn;
    this.renderGlobal = renderGlobalIn;
    this.index = indexIn;

    if (!blockPosIn.equals(this.getPosition()))
    {
        this.setPosition(blockPosIn);
    }

    if (OpenGlHelper.useVbo())
    {
        for (int i = 0; i < EnumWorldBlockLayer.values().length; ++i)
        {
            this.vertexBuffers[i] = new VertexBuffer(DefaultVertexFormats.BLOCK);
        }
    }
}
项目:BaseClient    文件:RenderChunk.java   
private EnumWorldBlockLayer fixBlockLayer(Block p_fixBlockLayer_1_, EnumWorldBlockLayer p_fixBlockLayer_2_)
{
    if (this.isMipmaps)
    {
        if (p_fixBlockLayer_2_ == EnumWorldBlockLayer.CUTOUT)
        {
            if (p_fixBlockLayer_1_ instanceof BlockRedstoneWire)
            {
                return p_fixBlockLayer_2_;
            }

            if (p_fixBlockLayer_1_ instanceof BlockCactus)
            {
                return p_fixBlockLayer_2_;
            }

            return EnumWorldBlockLayer.CUTOUT_MIPPED;
        }
    }
    else if (p_fixBlockLayer_2_ == EnumWorldBlockLayer.CUTOUT_MIPPED)
    {
        return EnumWorldBlockLayer.CUTOUT;
    }

    return p_fixBlockLayer_2_;
}
项目:BaseClient    文件:VboRenderList.java   
public void renderChunkLayer(EnumWorldBlockLayer layer)
{
    if (this.initialized)
    {
        for (RenderChunk renderchunk : this.renderChunks)
        {
            VertexBuffer vertexbuffer = renderchunk.getVertexBufferByLayer(layer.ordinal());
            GlStateManager.pushMatrix();
            this.preRenderChunk(renderchunk);
            renderchunk.multModelviewMatrix();
            vertexbuffer.bindBuffer();
            this.setupArrayPointers();
            vertexbuffer.drawArrays(7);
            GlStateManager.popMatrix();
        }

        OpenGlHelper.glBindBuffer(OpenGlHelper.GL_ARRAY_BUFFER, 0);
        GlStateManager.resetColor();
        this.renderChunks.clear();
    }
}
项目:BaseClient    文件:RenderChunk.java   
public RenderChunk(World worldIn, RenderGlobal renderGlobalIn, BlockPos blockPosIn, int indexIn)
{
    this.world = worldIn;
    this.renderGlobal = renderGlobalIn;
    this.index = indexIn;

    if (!blockPosIn.equals(this.getPosition()))
    {
        this.setPosition(blockPosIn);
    }

    if (OpenGlHelper.useVbo())
    {
        for (int i = 0; i < EnumWorldBlockLayer.values().length; ++i)
        {
            this.vertexBuffers[i] = new VertexBuffer(DefaultVertexFormats.BLOCK);
        }
    }
}
项目:DecompiledMinecraft    文件:RenderChunk.java   
public RenderChunk(World worldIn, RenderGlobal renderGlobalIn, BlockPos blockPosIn, int indexIn)
{
    this.world = worldIn;
    this.renderGlobal = renderGlobalIn;
    this.index = indexIn;

    if (!blockPosIn.equals(this.getPosition()))
    {
        this.setPosition(blockPosIn);
    }

    if (OpenGlHelper.useVbo())
    {
        for (int i = 0; i < EnumWorldBlockLayer.values().length; ++i)
        {
            this.vertexBuffers[i] = new VertexBuffer(DefaultVertexFormats.BLOCK);
        }
    }
}
项目:DecompiledMinecraft    文件:VboRenderList.java   
public void renderChunkLayer(EnumWorldBlockLayer layer)
{
    if (this.initialized)
    {
        for (RenderChunk renderchunk : this.renderChunks)
        {
            VertexBuffer vertexbuffer = renderchunk.getVertexBufferByLayer(layer.ordinal());
            GlStateManager.pushMatrix();
            this.preRenderChunk(renderchunk);
            renderchunk.multModelviewMatrix();
            vertexbuffer.bindBuffer();
            this.setupArrayPointers();
            vertexbuffer.drawArrays(7);
            GlStateManager.popMatrix();
        }

        OpenGlHelper.glBindBuffer(OpenGlHelper.GL_ARRAY_BUFFER, 0);
        GlStateManager.resetColor();
        this.renderChunks.clear();
    }
}
项目:BaseClient    文件:ChunkRenderDispatcher.java   
public ListenableFuture<Object> uploadChunk(final EnumWorldBlockLayer player, final WorldRenderer p_178503_2_, final RenderChunk chunkRenderer, final CompiledChunk compiledChunkIn)
{
    if (Minecraft.getMinecraft().isCallingFromMinecraftThread())
    {
        if (OpenGlHelper.useVbo())
        {
            this.uploadVertexBuffer(p_178503_2_, chunkRenderer.getVertexBufferByLayer(player.ordinal()));
        }
        else
        {
            this.uploadDisplayList(p_178503_2_, ((ListedRenderChunk)chunkRenderer).getDisplayList(player, compiledChunkIn), chunkRenderer);
        }

        p_178503_2_.setTranslation(0.0D, 0.0D, 0.0D);
        return Futures.<Object>immediateFuture((Object)null);
    }
    else
    {
        ListenableFutureTask<Object> listenablefuturetask = ListenableFutureTask.<Object>create(new Runnable()
        {
            public void run()
            {
                ChunkRenderDispatcher.this.uploadChunk(player, p_178503_2_, chunkRenderer, compiledChunkIn);
            }
        }, (Object)null);

        synchronized (this.queueChunkUploads)
        {
            this.queueChunkUploads.add(listenablefuturetask);
            return listenablefuturetask;
        }
    }
}
项目:BaseClient    文件:RenderChunk.java   
public void deleteGlResources()
{
    this.stopCompileTask();
    this.world = null;

    for (int i = 0; i < EnumWorldBlockLayer.values().length; ++i)
    {
        if (this.vertexBuffers[i] != null)
        {
            this.vertexBuffers[i].deleteGlBuffers();
        }
    }
}
项目:BaseClient    文件:RenderChunk.java   
public void resortTransparency(float x, float y, float z, ChunkCompileTaskGenerator generator)
{
    CompiledChunk compiledchunk = generator.getCompiledChunk();

    if (compiledchunk.getState() != null && !compiledchunk.isLayerEmpty(EnumWorldBlockLayer.TRANSLUCENT))
    {
        WorldRenderer worldrenderer = generator.getRegionRenderCacheBuilder().getWorldRendererByLayer(EnumWorldBlockLayer.TRANSLUCENT);
        this.preRenderBlocks(worldrenderer, this.position);
        worldrenderer.setVertexState(compiledchunk.getState());
        this.postRenderBlocks(EnumWorldBlockLayer.TRANSLUCENT, x, y, z, worldrenderer, compiledchunk);
    }
}
项目:DecompiledMinecraft    文件:RegionRenderCacheBuilder.java   
public RegionRenderCacheBuilder()
{
    this.worldRenderers[EnumWorldBlockLayer.SOLID.ordinal()] = new WorldRenderer(2097152);
    this.worldRenderers[EnumWorldBlockLayer.CUTOUT.ordinal()] = new WorldRenderer(131072);
    this.worldRenderers[EnumWorldBlockLayer.CUTOUT_MIPPED.ordinal()] = new WorldRenderer(131072);
    this.worldRenderers[EnumWorldBlockLayer.TRANSLUCENT.ordinal()] = new WorldRenderer(262144);
}
项目:DecompiledMinecraft    文件:ChunkRenderDispatcher.java   
public ListenableFuture<Object> uploadChunk(final EnumWorldBlockLayer player, final WorldRenderer p_178503_2_, final RenderChunk chunkRenderer, final CompiledChunk compiledChunkIn)
{
    if (Minecraft.getMinecraft().isCallingFromMinecraftThread())
    {
        if (OpenGlHelper.useVbo())
        {
            this.uploadVertexBuffer(p_178503_2_, chunkRenderer.getVertexBufferByLayer(player.ordinal()));
        }
        else
        {
            this.uploadDisplayList(p_178503_2_, ((ListedRenderChunk)chunkRenderer).getDisplayList(player, compiledChunkIn), chunkRenderer);
        }

        p_178503_2_.setTranslation(0.0D, 0.0D, 0.0D);
        return Futures.<Object>immediateFuture((Object)null);
    }
    else
    {
        ListenableFutureTask<Object> listenablefuturetask = ListenableFutureTask.<Object>create(new Runnable()
        {
            public void run()
            {
                ChunkRenderDispatcher.this.uploadChunk(player, p_178503_2_, chunkRenderer, compiledChunkIn);
            }
        }, (Object)null);

        synchronized (this.queueChunkUploads)
        {
            this.queueChunkUploads.add(listenablefuturetask);
            return listenablefuturetask;
        }
    }
}
项目:DecompiledMinecraft    文件:RenderChunk.java   
public void resortTransparency(float x, float y, float z, ChunkCompileTaskGenerator generator)
{
    CompiledChunk compiledchunk = generator.getCompiledChunk();

    if (compiledchunk.getState() != null && !compiledchunk.isLayerEmpty(EnumWorldBlockLayer.TRANSLUCENT))
    {
        this.preRenderBlocks(generator.getRegionRenderCacheBuilder().getWorldRendererByLayer(EnumWorldBlockLayer.TRANSLUCENT), this.position);
        generator.getRegionRenderCacheBuilder().getWorldRendererByLayer(EnumWorldBlockLayer.TRANSLUCENT).setVertexState(compiledchunk.getState());
        this.postRenderBlocks(EnumWorldBlockLayer.TRANSLUCENT, x, y, z, generator.getRegionRenderCacheBuilder().getWorldRendererByLayer(EnumWorldBlockLayer.TRANSLUCENT), compiledchunk);
    }
}
项目:DecompiledMinecraft    文件:RenderChunk.java   
public void deleteGlResources()
{
    this.stopCompileTask();
    this.world = null;

    for (int i = 0; i < EnumWorldBlockLayer.values().length; ++i)
    {
        if (this.vertexBuffers[i] != null)
        {
            this.vertexBuffers[i].deleteGlBuffers();
        }
    }
}
项目:BaseClient    文件:RenderList.java   
public void renderChunkLayer(EnumWorldBlockLayer layer)
{
    if (this.initialized)
    {
        if (this.renderChunks.size() == 0)
        {
            return;
        }

        for (RenderChunk renderchunk : this.renderChunks)
        {
            ListedRenderChunk listedrenderchunk = (ListedRenderChunk)renderchunk;
            GlStateManager.pushMatrix();
            this.preRenderChunk(renderchunk);
            GL11.glCallList(listedrenderchunk.getDisplayList(layer, listedrenderchunk.getCompiledChunk()));
            GlStateManager.popMatrix();
        }

        if (Config.isMultiTexture())
        {
            GlStateManager.bindCurrentTexture();
        }

        GlStateManager.resetColor();
        this.renderChunks.clear();
    }
}
项目:BaseClient    文件:WorldRenderer.java   
public void setBlockLayer(EnumWorldBlockLayer p_setBlockLayer_1_)
{
    this.blockLayer = p_setBlockLayer_1_;

    if (p_setBlockLayer_1_ == null)
    {
        if (this.quadSprites != null)
        {
            this.quadSpritesPrev = this.quadSprites;
        }

        this.quadSprites = null;
        this.quadSprite = null;
    }
}
项目:BaseClient    文件:CompiledChunk.java   
protected void setLayerUsed(EnumWorldBlockLayer layer)
{
    this.empty = false;
    this.layersUsed[layer.ordinal()] = true;
}
项目:BaseClient    文件:RegionRenderCacheBuilder.java   
public WorldRenderer getWorldRendererByLayer(EnumWorldBlockLayer layer)
{
    return this.worldRenderers[layer.ordinal()];
}
项目:BaseClient    文件:BlockMobSpawner.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:DecompiledMinecraft    文件:BlockStairs.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return this.modelBlock.getBlockLayer();
}
项目:DecompiledMinecraft    文件:BlockIce.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.TRANSLUCENT;
}
项目:BaseClient    文件:CompiledChunk.java   
protected void setLayerUsed(EnumWorldBlockLayer layer)
{
    this.empty = false;
    this.layersUsed[layer.ordinal()] = true;
}
项目:BaseClient    文件:BlockCocoa.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:BaseClient    文件:CompiledChunk.java   
public boolean isLayerStarted(EnumWorldBlockLayer layer)
{
    return this.layersStarted[layer.ordinal()];
}
项目:DecompiledMinecraft    文件:BlockRedstoneWire.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:DecompiledMinecraft    文件:BlockPortal.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.TRANSLUCENT;
}
项目:BaseClient    文件:Block.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.SOLID;
}
项目:DecompiledMinecraft    文件:BlockTripWire.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.TRANSLUCENT;
}
项目:DecompiledMinecraft    文件:BlockDoor.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:DecompiledMinecraft    文件:BlockBush.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:DecompiledMinecraft    文件:BlockLadder.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:BaseClient    文件:ChunkRenderContainer.java   
public void addRenderChunk(RenderChunk renderChunkIn, EnumWorldBlockLayer layer)
{
    this.renderChunks.add(renderChunkIn);
}
项目:BaseClient    文件:CompiledChunk.java   
public boolean isLayerStarted(EnumWorldBlockLayer layer)
{
    return this.layersStarted[layer.ordinal()];
}
项目:BaseClient    文件:WorldRenderer.java   
public void drawMultiTexture()
{
    if (this.quadSprites != null)
    {
        int i = Config.getMinecraft().getTextureMapBlocks().getCountRegisteredSprites();

        if (this.drawnIcons.length <= i)
        {
            this.drawnIcons = new boolean[i + 1];
        }

        Arrays.fill(this.drawnIcons, false);
        int j = 0;
        int k = -1;
        int l = this.vertexCount / 4;

        for (int i1 = 0; i1 < l; ++i1)
        {
            TextureAtlasSprite textureatlassprite = this.quadSprites[i1];

            if (textureatlassprite != null)
            {
                int j1 = textureatlassprite.getIndexInMap();

                if (!this.drawnIcons[j1])
                {
                    if (textureatlassprite == TextureUtils.iconGrassSideOverlay)
                    {
                        if (k < 0)
                        {
                            k = i1;
                        }
                    }
                    else
                    {
                        i1 = this.drawForIcon(textureatlassprite, i1) - 1;
                        ++j;

                        if (this.blockLayer != EnumWorldBlockLayer.TRANSLUCENT)
                        {
                            this.drawnIcons[j1] = true;
                        }
                    }
                }
            }
        }

        if (k >= 0)
        {
            this.drawForIcon(TextureUtils.iconGrassSideOverlay, k);
            ++j;
        }

        if (j > 0)
        {
            ;
        }
    }
}
项目:DecompiledMinecraft    文件:BlockTrapDoor.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:DecompiledMinecraft    文件:BlockGlass.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:DecompiledMinecraft    文件:BlockMobSpawner.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:BaseClient    文件:BlockBrewingStand.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:BaseClient    文件:BlockVine.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:BaseClient    文件:BlockDoor.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
项目:DecompiledMinecraft    文件:BlockHopper.java   
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT_MIPPED;
}