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


Java IBlockState.isBlockNormalCube方法代碼示例

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


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

示例1: getAttachPosition

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
private BlockSaltBarrier.EnumAttachPosition getAttachPosition(IBlockAccess worldIn, BlockPos pos, EnumFacing direction) {
	final BlockPos blockpos = pos.offset(direction);
	final IBlockState iblockstate = worldIn.getBlockState(pos.offset(direction));

	if (!canConnectTo(worldIn.getBlockState(blockpos)) && (iblockstate.isNormalCube() || !canConnectUpwardsTo(worldIn, blockpos.down()))) {
		final IBlockState iblockstate1 = worldIn.getBlockState(pos.up());

		if (!iblockstate1.isNormalCube()) {
			final boolean flag = worldIn.getBlockState(blockpos).isSideSolid(worldIn, blockpos, EnumFacing.UP) || worldIn.getBlockState(blockpos).getBlock() == Blocks.GLOWSTONE;

			if (flag && canConnectUpwardsTo(worldIn, blockpos.up())) {
				if (iblockstate.isBlockNormalCube()) {
					return BlockSaltBarrier.EnumAttachPosition.UP;
				}

				return BlockSaltBarrier.EnumAttachPosition.SIDE;
			}
		}

		return BlockSaltBarrier.EnumAttachPosition.NONE;
	} else {
		return BlockSaltBarrier.EnumAttachPosition.SIDE;
	}
}
 
開發者ID:Um-Mitternacht,項目名稱:Bewitchment,代碼行數:25,代碼來源:BlockSaltBarrier.java

示例2: getAmbientOcclusionLightValue

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Deprecated
public float getAmbientOcclusionLightValue(IBlockState state)
{
	if(Hacks.findMod(XRay.class).isEnabled())
		return 1.0F;
	
    return state.isBlockNormalCube() ? 0.2F : 1.0F;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:9,代碼來源:Block.java

示例3: getAttachPosition

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
private BlockRedstoneWire.EnumAttachPosition getAttachPosition(IBlockAccess worldIn, BlockPos pos, EnumFacing direction)
{
    BlockPos blockpos = pos.offset(direction);
    IBlockState iblockstate = worldIn.getBlockState(pos.offset(direction));

    if (!canConnectTo(worldIn.getBlockState(blockpos), direction) && (iblockstate.isNormalCube() || !canConnectUpwardsTo(worldIn.getBlockState(blockpos.down()))))
    {
        IBlockState iblockstate1 = worldIn.getBlockState(pos.up());

        if (!iblockstate1.isNormalCube())
        {
            boolean flag = worldIn.getBlockState(blockpos).isFullyOpaque() || worldIn.getBlockState(blockpos).getBlock() == Blocks.GLOWSTONE;

            if (flag && canConnectUpwardsTo(worldIn.getBlockState(blockpos.up())))
            {
                if (iblockstate.isBlockNormalCube())
                {
                    return BlockRedstoneWire.EnumAttachPosition.UP;
                }

                return BlockRedstoneWire.EnumAttachPosition.SIDE;
            }
        }

        return BlockRedstoneWire.EnumAttachPosition.NONE;
    }
    else
    {
        return BlockRedstoneWire.EnumAttachPosition.SIDE;
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:32,代碼來源:BlockRedstoneWire.java

示例4: findHighestBlock

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
private static BlockPos findHighestBlock(World p_184308_0_, BlockPos p_184308_1_, int p_184308_2_, boolean p_184308_3_)
{
    BlockPos blockpos = null;

    for (int i = -p_184308_2_; i <= p_184308_2_; ++i)
    {
        for (int j = -p_184308_2_; j <= p_184308_2_; ++j)
        {
            if (i != 0 || j != 0 || p_184308_3_)
            {
                for (int k = 255; k > (blockpos == null ? 0 : blockpos.getY()); --k)
                {
                    BlockPos blockpos1 = new BlockPos(p_184308_1_.getX() + i, k, p_184308_1_.getZ() + j);
                    IBlockState iblockstate = p_184308_0_.getBlockState(blockpos1);

                    if (iblockstate.isBlockNormalCube() && (p_184308_3_ || iblockstate.getBlock() != Blocks.BEDROCK))
                    {
                        blockpos = blockpos1;
                        break;
                    }
                }
            }
        }
    }

    return blockpos == null ? p_184308_1_ : blockpos;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:28,代碼來源:TileEntityEndGateway.java

示例5: getAttachPosition

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
private BlockRedstoneWire.EnumAttachPosition getAttachPosition(IBlockAccess worldIn, BlockPos pos, EnumFacing direction)
{
    BlockPos blockpos = pos.offset(direction);
    IBlockState iblockstate = worldIn.getBlockState(pos.offset(direction));

    if (!canConnectTo(worldIn.getBlockState(blockpos), direction, worldIn, blockpos) && (iblockstate.isNormalCube() || !canConnectUpwardsTo(worldIn, blockpos.down())))
    {
        IBlockState iblockstate1 = worldIn.getBlockState(pos.up());

        if (!iblockstate1.isNormalCube())
        {
            boolean flag = worldIn.getBlockState(blockpos).isSideSolid(worldIn, blockpos, EnumFacing.UP) || worldIn.getBlockState(blockpos).getBlock() == Blocks.GLOWSTONE;

            if (flag && canConnectUpwardsTo(worldIn, blockpos.up()))
            {
                if (iblockstate.isBlockNormalCube())
                {
                    return BlockRedstoneWire.EnumAttachPosition.UP;
                }

                return BlockRedstoneWire.EnumAttachPosition.SIDE;
            }
        }

        return BlockRedstoneWire.EnumAttachPosition.NONE;
    }
    else
    {
        return BlockRedstoneWire.EnumAttachPosition.SIDE;
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:32,代碼來源:BlockRedstoneWire.java

示例6: isBlockTransparent

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public static boolean isBlockTransparent(World world, BlockPos pos, IBlockState state){
    return state.getBlock() instanceof BlockAir || !state.getMaterial().isOpaque() || !state.isBlockNormalCube() || !state.isFullBlock() || !state.isOpaqueCube();
}
 
開發者ID:canitzp,項目名稱:Metalworks,代碼行數:4,代碼來源:Util.java

示例7: isValidEmptySpawnBlock

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public static boolean isValidEmptySpawnBlock(IBlockState state)
{
    return state.isBlockNormalCube() ? false : (state.canProvidePower() ? false : (state.getMaterial().isLiquid() ? false : !BlockRailBase.isRailBlock(state)));
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:5,代碼來源:WorldEntitySpawner.java

示例8: getAmbientOcclusionLightValue

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Deprecated
@SideOnly(Side.CLIENT)
public float getAmbientOcclusionLightValue(IBlockState state)
{
    return state.isBlockNormalCube() ? 0.2F : 1.0F;
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:7,代碼來源:Block.java


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