本文整理汇总了Java中net.minecraft.block.state.BlockStateBase.getBlockId方法的典型用法代码示例。如果您正苦于以下问题:Java BlockStateBase.getBlockId方法的具体用法?Java BlockStateBase.getBlockId怎么用?Java BlockStateBase.getBlockId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.block.state.BlockStateBase
的用法示例。
在下文中一共展示了BlockStateBase.getBlockId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBlockId
import net.minecraft.block.state.BlockStateBase; //导入方法依赖的package包/类
public int getBlockId()
{
if (this.blockId < 0)
{
if (this.blockState instanceof BlockStateBase)
{
BlockStateBase blockstatebase = (BlockStateBase)this.blockState;
this.blockId = blockstatebase.getBlockId();
}
else
{
this.blockId = Block.getIdFromBlock(this.blockState.getBlock());
}
}
return this.blockId;
}
示例2: pushEntity
import net.minecraft.block.state.BlockStateBase; //导入方法依赖的package包/类
public static void pushEntity(IBlockState blockState, BlockPos blockPos, IBlockAccess blockAccess, VertexBuffer wrr)
{
Block block = blockState.getBlock();
int i;
int j;
if (blockState instanceof BlockStateBase)
{
BlockStateBase blockstatebase = (BlockStateBase)blockState;
i = blockstatebase.getBlockId();
j = blockstatebase.getMetadata();
}
else
{
i = Block.getIdFromBlock(block);
j = block.getMetaFromState(blockState);
}
i = BlockAliases.getMappedBlockId(i, j);
int i1 = block.getRenderType(blockState).ordinal();
int k = ((i1 & 65535) << 16) + (i & 65535);
int l = j & 65535;
wrr.sVertexBuilder.pushEntity(((long)l << 32) + (long)k);
}
示例3: matches
import net.minecraft.block.state.BlockStateBase; //导入方法依赖的package包/类
public boolean matches(BlockStateBase p_matches_1_)
{
if (p_matches_1_.getBlockId() != this.blockId)
{
return false;
}
else
{
if (this.metadatas != null)
{
boolean flag = false;
int i = p_matches_1_.getMetadata();
for (int j = 0; j < this.metadatas.length; ++j)
{
int k = this.metadatas[j];
if (k == i)
{
flag = true;
break;
}
}
if (!flag)
{
return false;
}
}
return true;
}
}
示例4: matches
import net.minecraft.block.state.BlockStateBase; //导入方法依赖的package包/类
public boolean matches(BlockStateBase p_matches_1_)
{
return p_matches_1_.getBlockId() != this.blockId ? false : Matches.metadata(p_matches_1_.getMetadata(), this.metadatas);
}
示例5: getBlockColormap
import net.minecraft.block.state.BlockStateBase; //导入方法依赖的package包/类
private static CustomColormap getBlockColormap(IBlockState p_getBlockColormap_0_)
{
if (blockColormaps == null)
{
return null;
}
else if (!(p_getBlockColormap_0_ instanceof BlockStateBase))
{
return null;
}
else
{
BlockStateBase blockstatebase = (BlockStateBase)p_getBlockColormap_0_;
int i = blockstatebase.getBlockId();
if (i >= 0 && i < blockColormaps.length)
{
CustomColormap[] acustomcolormap = blockColormaps[i];
if (acustomcolormap == null)
{
return null;
}
else
{
for (int j = 0; j < acustomcolormap.length; ++j)
{
CustomColormap customcolormap = acustomcolormap[j];
if (customcolormap.matchesBlock(blockstatebase))
{
return customcolormap;
}
}
return null;
}
}
else
{
return null;
}
}
}