本文整理汇总了Java中net.minecraft.block.state.IBlockState.shouldSideBeRendered方法的典型用法代码示例。如果您正苦于以下问题:Java IBlockState.shouldSideBeRendered方法的具体用法?Java IBlockState.shouldSideBeRendered怎么用?Java IBlockState.shouldSideBeRendered使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.state.IBlockState
的用法示例。
在下文中一共展示了IBlockState.shouldSideBeRendered方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderModelSmooth
import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
public boolean renderModelSmooth(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
boolean flag = false;
RenderEnv renderenv = buffer.getRenderEnv(worldIn, stateIn, posIn);
for (EnumFacing enumfacing : EnumFacing.VALUES)
{
List<BakedQuad> list = modelIn.getQuads(stateIn, enumfacing, rand);
if (!list.isEmpty() && (!checkSides || stateIn.shouldSideBeRendered(worldIn, posIn, enumfacing)) && (!Hacks.findMod(XRay.class).isEnabled() || !XRay.xrayBlocks.contains(stateIn.getBlock())))
{
list = BlockModelCustomizer.getRenderQuads(list, worldIn, stateIn, posIn, enumfacing, rand, renderenv);
this.renderQuadsSmooth(worldIn, stateIn, posIn, buffer, list, renderenv);
flag = true;
}
}
List<BakedQuad> list1 = modelIn.getQuads(stateIn, (EnumFacing)null, rand);
if (!list1.isEmpty())
{
list1 = BlockModelCustomizer.getRenderQuads(list1, worldIn, stateIn, posIn, (EnumFacing)null, rand, renderenv);
this.renderQuadsSmooth(worldIn, stateIn, posIn, buffer, list1, renderenv);
flag = true;
}
return flag;
}
示例2: renderModelFlat
import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
public boolean renderModelFlat(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
boolean flag = false;
RenderEnv renderenv = buffer.getRenderEnv(worldIn, stateIn, posIn);
for (EnumFacing enumfacing : EnumFacing.VALUES)
{
List<BakedQuad> list = modelIn.getQuads(stateIn, enumfacing, rand);
if (!list.isEmpty() && (!checkSides || stateIn.shouldSideBeRendered(worldIn, posIn, enumfacing)))
{
int i = stateIn.getPackedLightmapCoords(worldIn, posIn.offset(enumfacing));
list = BlockModelCustomizer.getRenderQuads(list, worldIn, stateIn, posIn, enumfacing, rand, renderenv);
this.renderQuadsFlat(worldIn, stateIn, posIn, i, false, buffer, list, renderenv);
flag = true;
}
}
List<BakedQuad> list1 = modelIn.getQuads(stateIn, (EnumFacing)null, rand);
if (!list1.isEmpty())
{
list1 = BlockModelCustomizer.getRenderQuads(list1, worldIn, stateIn, posIn, (EnumFacing)null, rand, renderenv);
this.renderQuadsFlat(worldIn, stateIn, posIn, -1, true, buffer, list1, renderenv);
flag = true;
}
return flag;
}
示例3: renderModelSmooth
import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
public boolean renderModelSmooth(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
boolean flag = false;
float[] afloat = new float[EnumFacing.values().length * 2];
BitSet bitset = new BitSet(3);
BlockModelRenderer.AmbientOcclusionFace blockmodelrenderer$ambientocclusionface = new BlockModelRenderer.AmbientOcclusionFace();
for (EnumFacing enumfacing : EnumFacing.values())
{
List<BakedQuad> list = modelIn.getQuads(stateIn, enumfacing, rand);
if (!list.isEmpty() && (!checkSides || stateIn.shouldSideBeRendered(worldIn, posIn, enumfacing)))
{
this.renderQuadsSmooth(worldIn, stateIn, posIn, buffer, list, afloat, bitset, blockmodelrenderer$ambientocclusionface);
flag = true;
}
}
List<BakedQuad> list1 = modelIn.getQuads(stateIn, (EnumFacing)null, rand);
if (!list1.isEmpty())
{
this.renderQuadsSmooth(worldIn, stateIn, posIn, buffer, list1, afloat, bitset, blockmodelrenderer$ambientocclusionface);
flag = true;
}
return flag;
}
示例4: renderModelFlat
import net.minecraft.block.state.IBlockState; //导入方法依赖的package包/类
public boolean renderModelFlat(IBlockAccess worldIn, IBakedModel modelIn, IBlockState stateIn, BlockPos posIn, VertexBuffer buffer, boolean checkSides, long rand)
{
boolean flag = false;
BitSet bitset = new BitSet(3);
for (EnumFacing enumfacing : EnumFacing.values())
{
List<BakedQuad> list = modelIn.getQuads(stateIn, enumfacing, rand);
if (!list.isEmpty() && (!checkSides || stateIn.shouldSideBeRendered(worldIn, posIn, enumfacing)))
{
int i = stateIn.getPackedLightmapCoords(worldIn, posIn.offset(enumfacing));
this.renderQuadsFlat(worldIn, stateIn, posIn, i, false, buffer, list, bitset);
flag = true;
}
}
List<BakedQuad> list1 = modelIn.getQuads(stateIn, (EnumFacing)null, rand);
if (!list1.isEmpty())
{
this.renderQuadsFlat(worldIn, stateIn, posIn, -1, true, buffer, list1, bitset);
flag = true;
}
return flag;
}