當前位置: 首頁>>代碼示例>>Java>>正文


Java BlockStateBase類代碼示例

本文整理匯總了Java中net.minecraft.block.state.BlockStateBase的典型用法代碼示例。如果您正苦於以下問題:Java BlockStateBase類的具體用法?Java BlockStateBase怎麽用?Java BlockStateBase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BlockStateBase類屬於net.minecraft.block.state包,在下文中一共展示了BlockStateBase類的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: block

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
public static boolean block(BlockStateBase p_block_0_, MatchBlock[] p_block_1_)
{
    if (p_block_1_ == null)
    {
        return true;
    }
    else
    {
        for (int i = 0; i < p_block_1_.length; ++i)
        {
            MatchBlock matchblock = p_block_1_[i];

            if (matchblock.matches(p_block_0_))
            {
                return true;
            }
        }

        return false;
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:22,代碼來源:Matches.java

示例2: 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

示例3: getMetadata

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
public int getMetadata()
{
    if (this.metadata < 0)
    {
        if (this.blockState instanceof BlockStateBase)
        {
            BlockStateBase blockstatebase = (BlockStateBase)this.blockState;
            this.metadata = blockstatebase.getMetadata();
        }
        else
        {
            this.metadata = this.blockState.getBlock().getMetaFromState(this.blockState);
        }
    }

    return this.metadata;
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:18,代碼來源:RenderEnv.java

示例4: 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

示例5: 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

示例6: isNeighbourOverlay

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
private static boolean isNeighbourOverlay(ConnectedProperties p_isNeighbourOverlay_0_, IBlockAccess p_isNeighbourOverlay_1_, IBlockState p_isNeighbourOverlay_2_, BlockPos p_isNeighbourOverlay_3_, int p_isNeighbourOverlay_4_, TextureAtlasSprite p_isNeighbourOverlay_5_, int p_isNeighbourOverlay_6_)
{
    IBlockState iblockstate = p_isNeighbourOverlay_1_.getBlockState(p_isNeighbourOverlay_3_);

    if (!isFullCubeModel(iblockstate))
    {
        return false;
    }
    else
    {
        if (p_isNeighbourOverlay_0_.connectBlocks != null)
        {
            BlockStateBase blockstatebase = (BlockStateBase)iblockstate;

            if (!Matches.block(blockstatebase.getBlockId(), blockstatebase.getMetadata(), p_isNeighbourOverlay_0_.connectBlocks))
            {
                return false;
            }
        }

        if (p_isNeighbourOverlay_0_.connectTileIcons != null)
        {
            TextureAtlasSprite textureatlassprite = getNeighbourIcon(p_isNeighbourOverlay_1_, p_isNeighbourOverlay_2_, p_isNeighbourOverlay_3_, iblockstate, p_isNeighbourOverlay_4_);

            if (!Config.isSameOne(textureatlassprite, p_isNeighbourOverlay_0_.connectTileIcons))
            {
                return false;
            }
        }

        IBlockState iblockstate1 = p_isNeighbourOverlay_1_.getBlockState(p_isNeighbourOverlay_3_.offset(getFacing(p_isNeighbourOverlay_4_)));
        return iblockstate1.isOpaqueCube() ? false : (p_isNeighbourOverlay_4_ == 1 && iblockstate1.getBlock() == Blocks.SNOW_LAYER ? false : !isNeighbour(p_isNeighbourOverlay_0_, p_isNeighbourOverlay_1_, p_isNeighbourOverlay_2_, p_isNeighbourOverlay_3_, iblockstate, p_isNeighbourOverlay_4_, p_isNeighbourOverlay_5_, p_isNeighbourOverlay_6_));
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:35,代碼來源:ConnectedTextures.java

示例7: isNeighbourMatching

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
private static boolean isNeighbourMatching(ConnectedProperties p_isNeighbourMatching_0_, IBlockAccess p_isNeighbourMatching_1_, IBlockState p_isNeighbourMatching_2_, BlockPos p_isNeighbourMatching_3_, int p_isNeighbourMatching_4_, TextureAtlasSprite p_isNeighbourMatching_5_, int p_isNeighbourMatching_6_)
{
    IBlockState iblockstate = p_isNeighbourMatching_1_.getBlockState(p_isNeighbourMatching_3_);

    if (iblockstate == AIR_DEFAULT_STATE)
    {
        return false;
    }
    else
    {
        if (p_isNeighbourMatching_0_.matchBlocks != null && iblockstate instanceof BlockStateBase)
        {
            BlockStateBase blockstatebase = (BlockStateBase)iblockstate;

            if (!p_isNeighbourMatching_0_.matchesBlock(blockstatebase.getBlockId(), blockstatebase.getMetadata()))
            {
                return false;
            }
        }

        if (p_isNeighbourMatching_0_.matchTileIcons != null)
        {
            TextureAtlasSprite textureatlassprite = getNeighbourIcon(p_isNeighbourMatching_1_, p_isNeighbourMatching_2_, p_isNeighbourMatching_3_, iblockstate, p_isNeighbourMatching_4_);

            if (textureatlassprite != p_isNeighbourMatching_5_)
            {
                return false;
            }
        }

        IBlockState iblockstate1 = p_isNeighbourMatching_1_.getBlockState(p_isNeighbourMatching_3_.offset(getFacing(p_isNeighbourMatching_4_)));
        return iblockstate1.isOpaqueCube() ? false : p_isNeighbourMatching_4_ != 1 || iblockstate1.getBlock() != Blocks.SNOW_LAYER;
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:35,代碼來源:ConnectedTextures.java

示例8: isNeighbour

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
private static boolean isNeighbour(ConnectedProperties p_isNeighbour_0_, IBlockAccess p_isNeighbour_1_, IBlockState p_isNeighbour_2_, BlockPos p_isNeighbour_3_, IBlockState p_isNeighbour_4_, int p_isNeighbour_5_, TextureAtlasSprite p_isNeighbour_6_, int p_isNeighbour_7_)
{
    if (p_isNeighbour_2_ == p_isNeighbour_4_)
    {
        return true;
    }
    else if (p_isNeighbour_0_.connect == 2)
    {
        if (p_isNeighbour_4_ == null)
        {
            return false;
        }
        else if (p_isNeighbour_4_ == AIR_DEFAULT_STATE)
        {
            return false;
        }
        else
        {
            TextureAtlasSprite textureatlassprite = getNeighbourIcon(p_isNeighbour_1_, p_isNeighbour_2_, p_isNeighbour_3_, p_isNeighbour_4_, p_isNeighbour_5_);
            return textureatlassprite == p_isNeighbour_6_;
        }
    }
    else if (p_isNeighbour_0_.connect == 3)
    {
        return p_isNeighbour_4_ == null ? false : (p_isNeighbour_4_ == AIR_DEFAULT_STATE ? false : p_isNeighbour_4_.getMaterial() == p_isNeighbour_2_.getMaterial());
    }
    else if (!(p_isNeighbour_4_ instanceof BlockStateBase))
    {
        return false;
    }
    else
    {
        BlockStateBase blockstatebase = (BlockStateBase)p_isNeighbour_4_;
        Block block = blockstatebase.getBlock();
        int i = blockstatebase.getMetadata();
        return block == p_isNeighbour_2_.getBlock() && i == p_isNeighbour_7_;
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:39,代碼來源:ConnectedTextures.java

示例9: getState

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
public IBlockState getState(){
	
	if(this.state instanceof MetaBlock){
		return ((MetaBlock)this.state).getState();
	}
	
	return (BlockStateBase)this.state;
}
 
開發者ID:Greymerk,項目名稱:minecraft-roguelike,代碼行數:9,代碼來源:MetaBlock.java

示例10: 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

示例11: matchesBlock

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
public boolean matchesBlock(BlockStateBase p_matchesBlock_1_)
{
    return Matches.block(p_matchesBlock_1_, this.matchBlocks);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:5,代碼來源:CustomColormap.java

示例12: 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

示例13: getConnectedTextureSingle

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
public static TextureAtlasSprite getConnectedTextureSingle(IBlockAccess p_getConnectedTextureSingle_0_, IBlockState p_getConnectedTextureSingle_1_, BlockPos p_getConnectedTextureSingle_2_, EnumFacing p_getConnectedTextureSingle_3_, TextureAtlasSprite p_getConnectedTextureSingle_4_, boolean p_getConnectedTextureSingle_5_, RenderEnv p_getConnectedTextureSingle_6_)
{
    Block block = p_getConnectedTextureSingle_1_.getBlock();

    if (!(p_getConnectedTextureSingle_1_ instanceof BlockStateBase))
    {
        return p_getConnectedTextureSingle_4_;
    }
    else
    {
        BlockStateBase blockstatebase = (BlockStateBase)p_getConnectedTextureSingle_1_;

        if (tileProperties != null)
        {
            int i = p_getConnectedTextureSingle_4_.getIndexInMap();

            if (i >= 0 && i < tileProperties.length)
            {
                ConnectedProperties[] aconnectedproperties = tileProperties[i];

                if (aconnectedproperties != null)
                {
                    int j = getSide(p_getConnectedTextureSingle_3_);

                    for (int k = 0; k < aconnectedproperties.length; ++k)
                    {
                        ConnectedProperties connectedproperties = aconnectedproperties[k];

                        if (connectedproperties != null && connectedproperties.matchesBlockId(blockstatebase.getBlockId()))
                        {
                            TextureAtlasSprite textureatlassprite = getConnectedTexture(connectedproperties, p_getConnectedTextureSingle_0_, blockstatebase, p_getConnectedTextureSingle_2_, j, p_getConnectedTextureSingle_4_, p_getConnectedTextureSingle_6_);

                            if (textureatlassprite != null)
                            {
                                return textureatlassprite;
                            }
                        }
                    }
                }
            }
        }

        if (blockProperties != null && p_getConnectedTextureSingle_5_)
        {
            int l = p_getConnectedTextureSingle_6_.getBlockId();

            if (l >= 0 && l < blockProperties.length)
            {
                ConnectedProperties[] aconnectedproperties1 = blockProperties[l];

                if (aconnectedproperties1 != null)
                {
                    int i1 = getSide(p_getConnectedTextureSingle_3_);

                    for (int j1 = 0; j1 < aconnectedproperties1.length; ++j1)
                    {
                        ConnectedProperties connectedproperties1 = aconnectedproperties1[j1];

                        if (connectedproperties1 != null && connectedproperties1.matchesIcon(p_getConnectedTextureSingle_4_))
                        {
                            TextureAtlasSprite textureatlassprite1 = getConnectedTexture(connectedproperties1, p_getConnectedTextureSingle_0_, blockstatebase, p_getConnectedTextureSingle_2_, i1, p_getConnectedTextureSingle_4_, p_getConnectedTextureSingle_6_);

                            if (textureatlassprite1 != null)
                            {
                                return textureatlassprite1;
                            }
                        }
                    }
                }
            }
        }

        return p_getConnectedTextureSingle_4_;
    }
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:76,代碼來源:ConnectedTextures.java

示例14: getConnectedTextureSingle

import net.minecraft.block.state.BlockStateBase; //導入依賴的package包/類
public static BakedQuad[] getConnectedTextureSingle(IBlockAccess p_getConnectedTextureSingle_0_, IBlockState p_getConnectedTextureSingle_1_, BlockPos p_getConnectedTextureSingle_2_, EnumFacing p_getConnectedTextureSingle_3_, BakedQuad p_getConnectedTextureSingle_4_, boolean p_getConnectedTextureSingle_5_, int p_getConnectedTextureSingle_6_, RenderEnv p_getConnectedTextureSingle_7_)
{
    Block block = p_getConnectedTextureSingle_1_.getBlock();

    if (!(p_getConnectedTextureSingle_1_ instanceof BlockStateBase))
    {
        return p_getConnectedTextureSingle_7_.getArrayQuadsCtm(p_getConnectedTextureSingle_4_);
    }
    else
    {
        BlockStateBase blockstatebase = (BlockStateBase)p_getConnectedTextureSingle_1_;
        TextureAtlasSprite textureatlassprite = p_getConnectedTextureSingle_4_.getSprite();

        if (tileProperties != null)
        {
            int i = textureatlassprite.getIndexInMap();

            if (i >= 0 && i < tileProperties.length)
            {
                ConnectedProperties[] aconnectedproperties = tileProperties[i];

                if (aconnectedproperties != null)
                {
                    int j = getSide(p_getConnectedTextureSingle_3_);

                    for (int k = 0; k < aconnectedproperties.length; ++k)
                    {
                        ConnectedProperties connectedproperties = aconnectedproperties[k];

                        if (connectedproperties != null && connectedproperties.matchesBlockId(blockstatebase.getBlockId()))
                        {
                            BakedQuad[] abakedquad = getConnectedTexture(connectedproperties, p_getConnectedTextureSingle_0_, blockstatebase, p_getConnectedTextureSingle_2_, j, p_getConnectedTextureSingle_4_, p_getConnectedTextureSingle_6_, p_getConnectedTextureSingle_7_);

                            if (abakedquad != null)
                            {
                                return abakedquad;
                            }
                        }
                    }
                }
            }
        }

        if (blockProperties != null && p_getConnectedTextureSingle_5_)
        {
            int l = p_getConnectedTextureSingle_7_.getBlockId();

            if (l >= 0 && l < blockProperties.length)
            {
                ConnectedProperties[] aconnectedproperties1 = blockProperties[l];

                if (aconnectedproperties1 != null)
                {
                    int i1 = getSide(p_getConnectedTextureSingle_3_);

                    for (int j1 = 0; j1 < aconnectedproperties1.length; ++j1)
                    {
                        ConnectedProperties connectedproperties1 = aconnectedproperties1[j1];

                        if (connectedproperties1 != null && connectedproperties1.matchesIcon(textureatlassprite))
                        {
                            BakedQuad[] abakedquad1 = getConnectedTexture(connectedproperties1, p_getConnectedTextureSingle_0_, blockstatebase, p_getConnectedTextureSingle_2_, i1, p_getConnectedTextureSingle_4_, p_getConnectedTextureSingle_6_, p_getConnectedTextureSingle_7_);

                            if (abakedquad1 != null)
                            {
                                return abakedquad1;
                            }
                        }
                    }
                }
            }
        }

        return p_getConnectedTextureSingle_7_.getArrayQuadsCtm(p_getConnectedTextureSingle_4_);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:77,代碼來源:ConnectedTextures.java


注:本文中的net.minecraft.block.state.BlockStateBase類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。