本文整理汇总了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;
}
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
}
示例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_));
}
}
示例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;
}
}
示例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_;
}
}
示例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;
}
示例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);
}
示例11: matchesBlock
import net.minecraft.block.state.BlockStateBase; //导入依赖的package包/类
public boolean matchesBlock(BlockStateBase p_matchesBlock_1_)
{
return Matches.block(p_matchesBlock_1_, this.matchBlocks);
}
示例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;
}
}
}
示例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_;
}
}
示例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_);
}
}