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


Java IBlockState.getBlockFaceShape方法代碼示例

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


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

示例1: ejectFailure

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Nullable
public void ejectFailure(World world, BlockPos pos, ItemStack failure, EnumFacing[] directions)
{
    int ioff = 0;

    for(int i = 0; i < directions.length; i++)
    {
        EnumFacing direction = directions[(i + ioff) % directions.length];
        BlockPos ejectPos = pos.offset(direction);
        IBlockState state = world.getBlockState(ejectPos);
        if(state.getBlockFaceShape(world,ejectPos,direction.getOpposite()) == BlockFaceShape.UNDEFINED)
        {
            ejectFailure(world,pos,failure,direction);
            return;
        }
    }

    ejectFailure(world,pos,failure,EnumFacing.UP);
}
 
開發者ID:DaedalusGame,項目名稱:Soot,代碼行數:20,代碼來源:UpgradeAlchemyGlobe.java

示例2: canConnectTo

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing p_176524_3_) {
	IBlockState iblockstate = worldIn.getBlockState(pos);
	BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, p_176524_3_);
	Block block = iblockstate.getBlock();
	boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE && (iblockstate.getMaterial() == this.blockMaterial || block instanceof BlockFenceGate);
	return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag;
}
 
開發者ID:Um-Mitternacht,項目名稱:Bewitchment,代碼行數:8,代碼來源:BlockScornedBrickFence.java

示例3: canAttachToBlock

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
private static boolean canAttachToBlock(World world, BlockPos pos, EnumFacing facing)
{
    IBlockState state = world.getBlockState(pos);
    return facing.getHorizontalIndex() != -1 && !isExceptBlockForAttachWithPiston(state.getBlock()) && state.getBlockFaceShape(world, pos, facing) == BlockFaceShape.SOLID;
}
 
開發者ID:PearXTeam,項目名稱:PurificatiMagicae,代碼行數:6,代碼來源:BlockAbstractWallIfTablet.java


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