本文整理匯總了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;
}