当前位置: 首页>>代码示例>>Java>>正文


Java EnumWorldBlockLayer类代码示例

本文整理汇总了Java中net.minecraft.util.EnumWorldBlockLayer的典型用法代码示例。如果您正苦于以下问题:Java EnumWorldBlockLayer类的具体用法?Java EnumWorldBlockLayer怎么用?Java EnumWorldBlockLayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EnumWorldBlockLayer类属于net.minecraft.util包,在下文中一共展示了EnumWorldBlockLayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: RenderChunk

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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);
        }
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:20,代码来源:RenderChunk.java

示例2: fixBlockLayer

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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_;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:27,代码来源:RenderChunk.java

示例3: renderChunkLayer

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:22,代码来源:VboRenderList.java

示例4: uploadChunk

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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;
        }
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:34,代码来源:ChunkRenderDispatcher.java

示例5: deleteGlResources

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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();
        }
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:14,代码来源:RenderChunk.java

示例6: resortTransparency

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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);
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:13,代码来源:RenderChunk.java

示例7: RegionRenderCacheBuilder

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:RegionRenderCacheBuilder.java

示例8: resortTransparency

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:12,代码来源:RenderChunk.java

示例9: renderChunkLayer

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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();
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:28,代码来源:RenderList.java

示例10: setBlockLayer

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
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;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:16,代码来源:WorldRenderer.java

示例11: setLayerUsed

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
protected void setLayerUsed(EnumWorldBlockLayer layer)
{
    this.empty = false;
    this.layersUsed[layer.ordinal()] = true;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:6,代码来源:CompiledChunk.java

示例12: getWorldRendererByLayer

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
public WorldRenderer getWorldRendererByLayer(EnumWorldBlockLayer layer)
{
    return this.worldRenderers[layer.ordinal()];
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:RegionRenderCacheBuilder.java

示例13: getBlockLayer

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.CUTOUT;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:BlockMobSpawner.java

示例14: getBlockLayer

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
public EnumWorldBlockLayer getBlockLayer()
{
    return this.modelBlock.getBlockLayer();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:BlockStairs.java

示例15: getBlockLayer

import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
public EnumWorldBlockLayer getBlockLayer()
{
    return EnumWorldBlockLayer.TRANSLUCENT;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:BlockIce.java


注:本文中的net.minecraft.util.EnumWorldBlockLayer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。