本文整理汇总了Java中net.minecraft.util.BlockRenderLayer.TRANSLUCENT属性的典型用法代码示例。如果您正苦于以下问题:Java BlockRenderLayer.TRANSLUCENT属性的具体用法?Java BlockRenderLayer.TRANSLUCENT怎么用?Java BlockRenderLayer.TRANSLUCENT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.minecraft.util.BlockRenderLayer
的用法示例。
在下文中一共展示了BlockRenderLayer.TRANSLUCENT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deserialize
@Override
public BlockRenderLayer deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{
if (json.isJsonPrimitive())
{
JsonPrimitive primitive = json.getAsJsonPrimitive();
if (primitive.isString())
{
String string = primitive.getAsString();
if (string.equals("solid"))
return BlockRenderLayer.SOLID;
if (string.equals("mippedCutout"))
return BlockRenderLayer.CUTOUT_MIPPED;
if (string.equals("cutout"))
return BlockRenderLayer.CUTOUT;
if (string.equals("translucent"))
return BlockRenderLayer.TRANSLUCENT;
}
}
throw new JsonParseException("Invalid block render layer: " + json);
}
示例2: isBlockTranslucent
/**
* Returns true if given block is translucent
*/
private boolean isBlockTranslucent(@Nullable Block blockIn)
{
return blockIn != null && blockIn.getBlockLayer() == BlockRenderLayer.TRANSLUCENT;
}
示例3: getBlockLayer
@Override
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.TRANSLUCENT;
}
示例4: getBlockLayer
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.TRANSLUCENT;
}
示例5: getBlockLayer
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
}
示例6: renderBlockLayer
public int renderBlockLayer(BlockRenderLayer blockLayerIn, double partialTicks, int pass, Entity entityIn)
{
RenderHelper.disableStandardItemLighting();
if (blockLayerIn == BlockRenderLayer.TRANSLUCENT)
{
this.mc.mcProfiler.startSection("translucent_sort");
double d0 = entityIn.posX - this.prevRenderSortX;
double d1 = entityIn.posY - this.prevRenderSortY;
double d2 = entityIn.posZ - this.prevRenderSortZ;
if (d0 * d0 + d1 * d1 + d2 * d2 > 1.0D)
{
this.prevRenderSortX = entityIn.posX;
this.prevRenderSortY = entityIn.posY;
this.prevRenderSortZ = entityIn.posZ;
int k = 0;
this.chunksToResortTransparency.clear();
for (RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation : this.renderInfos)
{
if (renderglobal$containerlocalrenderinformation.renderChunk.compiledChunk.isLayerStarted(blockLayerIn) && k++ < 15)
{
this.chunksToResortTransparency.add(renderglobal$containerlocalrenderinformation.renderChunk);
}
}
}
this.mc.mcProfiler.endSection();
}
this.mc.mcProfiler.startSection("filterempty");
int l = 0;
boolean flag = blockLayerIn == BlockRenderLayer.TRANSLUCENT;
int i1 = flag ? this.renderInfos.size() - 1 : 0;
int i = flag ? -1 : this.renderInfos.size();
int j1 = flag ? -1 : 1;
for (int j = i1; j != i; j += j1)
{
RenderChunk renderchunk = ((RenderGlobal.ContainerLocalRenderInformation)this.renderInfos.get(j)).renderChunk;
if (!renderchunk.getCompiledChunk().isLayerEmpty(blockLayerIn))
{
++l;
this.renderContainer.addRenderChunk(renderchunk, blockLayerIn);
}
}
if (l == 0)
{
this.mc.mcProfiler.endSection();
return l;
}
else
{
if (Config.isFogOff() && this.mc.entityRenderer.fogStandard)
{
GlStateManager.disableFog();
}
this.mc.mcProfiler.endStartSection("render_" + blockLayerIn);
this.renderBlockLayer(blockLayerIn);
this.mc.mcProfiler.endSection();
return l;
}
}
示例7: getBlockLayer
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
}
示例8: getBlockLayer
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
}
示例9: getBlockLayer
@Override
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
}
示例10: getBlockLayer
@Override
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
}
示例11: drawMultiTexture
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 != BlockRenderLayer.TRANSLUCENT)
{
this.drawnIcons[j1] = true;
}
}
}
}
}
if (k >= 0)
{
this.drawForIcon(TextureUtils.iconGrassSideOverlay, k);
++j;
}
if (j > 0)
{
;
}
}
}
示例12: getBlockLayer
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
return this.blockMaterial == Material.WATER ? BlockRenderLayer.TRANSLUCENT : BlockRenderLayer.SOLID;
}
示例13: getBlockLayer
public BlockRenderLayer getBlockLayer()
{
return this.blockMaterial == Material.WATER ? BlockRenderLayer.TRANSLUCENT : BlockRenderLayer.SOLID;
}
示例14: getBlockLayer
@Override
public BlockRenderLayer getBlockLayer() {
return BlockRenderLayer.TRANSLUCENT;
}
示例15: getBlockLayer
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
return BlockRenderLayer.TRANSLUCENT;
}