本文整理汇总了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);
}
}
}
示例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_;
}
示例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();
}
}
示例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;
}
}
}
示例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();
}
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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();
}
}
示例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;
}
}
示例11: setLayerUsed
import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
protected void setLayerUsed(EnumWorldBlockLayer layer)
{
this.empty = false;
this.layersUsed[layer.ordinal()] = true;
}
示例12: getWorldRendererByLayer
import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
public WorldRenderer getWorldRendererByLayer(EnumWorldBlockLayer layer)
{
return this.worldRenderers[layer.ordinal()];
}
示例13: getBlockLayer
import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
public EnumWorldBlockLayer getBlockLayer()
{
return EnumWorldBlockLayer.CUTOUT;
}
示例14: getBlockLayer
import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
public EnumWorldBlockLayer getBlockLayer()
{
return this.modelBlock.getBlockLayer();
}
示例15: getBlockLayer
import net.minecraft.util.EnumWorldBlockLayer; //导入依赖的package包/类
public EnumWorldBlockLayer getBlockLayer()
{
return EnumWorldBlockLayer.TRANSLUCENT;
}