当前位置: 首页>>代码示例>>Java>>正文


Java BlockStateBase.getBlockId方法代码示例

本文整理汇总了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;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:18,代码来源:RenderEnv.java

示例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);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:SVertexBuilder.java

示例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;
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:34,代码来源:MatchBlock.java

示例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);
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:5,代码来源:MatchBlock.java

示例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;
        }
    }
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:45,代码来源:CustomColors.java


注:本文中的net.minecraft.block.state.BlockStateBase.getBlockId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。