當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。