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


Java IBlockState.isOpaqueCube方法代碼示例

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


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

示例1: shouldSideBeRendered

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    switch (side)
    {
        case UP:
            return true;

        case NORTH:
        case SOUTH:
        case WEST:
        case EAST:
            IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
            Block block = iblockstate.getBlock();
            return !iblockstate.isOpaqueCube() && block != Blocks.FARMLAND && block != Blocks.GRASS_PATH;

        default:
            return super.shouldSideBeRendered(blockState, blockAccess, pos, side);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:20,代碼來源:BlockFarmland.java

示例2: shouldSideBeRendered

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    switch (side)
    {
        case UP:
            return true;
        case NORTH:
        case SOUTH:
        case WEST:
        case EAST:
            IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
            Block block = iblockstate.getBlock();
            return !iblockstate.isOpaqueCube() && block != Blocks.FARMLAND && block != Blocks.GRASS_PATH;
        default:
            return super.shouldSideBeRendered(blockState, blockAccess, pos, side);
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:19,代碼來源:BlockFarmland.java

示例3: doesSideBlockRendering

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Override
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
{
    if (net.minecraftforge.common.ForgeModContainer.disableStairSlabCulling)
        return super.doesSideBlockRendering(state, world, pos, face);

    if ( state.isOpaqueCube() )
        return true;

    state = this.getActualState(state, world, pos);

    EnumHalf half = state.getValue(HALF);
    EnumFacing side = state.getValue(FACING);
    EnumShape shape = state.getValue(SHAPE);
    if (face == EnumFacing.UP) return half == EnumHalf.TOP;
    if (face == EnumFacing.DOWN) return half == EnumHalf.BOTTOM;
    if (shape == EnumShape.OUTER_LEFT || shape == EnumShape.OUTER_RIGHT) return false;
    if (face == side) return true;
    if (shape == EnumShape.INNER_LEFT && face.rotateY() == side) return true;
    if (shape == EnumShape.INNER_RIGHT && face.rotateYCCW() == side) return true;
    return false;
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:23,代碼來源:BlockStairs.java

示例4: doesSideBlockRendering

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Override
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
{
    if (net.minecraftforge.common.ForgeModContainer.disableStairSlabCulling)
        return super.doesSideBlockRendering(state, world, pos, face);

    if (state.isOpaqueCube())
        return true;

    net.minecraft.block.BlockSlab.EnumBlockHalf side = state.getValue(HALF);
    return (side == net.minecraft.block.BlockSlab.EnumBlockHalf.TOP && face == EnumFacing.UP) || (side == net.minecraft.block.BlockSlab.EnumBlockHalf.BOTTOM && face == EnumFacing.DOWN);
}
 
開發者ID:cubex2,項目名稱:customstuff4,代碼行數:13,代碼來源:BlockSlab.java

示例5: isNeighbourOverlay

import net.minecraft.block.state.IBlockState; //導入方法依賴的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

示例6: isNeighbourMatching

import net.minecraft.block.state.IBlockState; //導入方法依賴的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

示例7: shouldSideBeRendered

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
    Block block = iblockstate.getBlock();
    return !iblockstate.isOpaqueCube() && block != Blocks.END_GATEWAY;
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:8,代碼來源:BlockEndGateway.java

示例8: doesSideBlockRendering

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Override
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face)
{
    if (net.minecraftforge.common.ForgeModContainer.disableStairSlabCulling)
        return super.doesSideBlockRendering(state, world, pos, face);

    if ( state.isOpaqueCube() )
        return true;

    EnumBlockHalf side = state.getValue(HALF);
    return (side == EnumBlockHalf.TOP && face == EnumFacing.UP) || (side == EnumBlockHalf.BOTTOM && face == EnumFacing.DOWN);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:13,代碼來源:BlockSlab.java

示例9: shouldSideBeRendered

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess world, BlockPos pos, EnumFacing side) {
    IBlockState iblockstate = world.getBlockState(pos.offset(side));
    return !iblockstate.isOpaqueCube() && iblockstate.getBlock() != this;
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:7,代碼來源:BlockPressureChamberGlass.java

示例10: doesSideBlockRendering

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
@Override
public boolean doesSideBlockRendering(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing face) {
	return state.isOpaqueCube();
}
 
開發者ID:kenijey,項目名稱:harshencastle,代碼行數:5,代碼來源:CauldronBlock.java

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

示例12: isHit

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
private static boolean isHit(IBlockState state, Block block1, boolean ignoreNonOpaqueCube) {
  if (ignoreNonOpaqueCube && !state.isOpaqueCube()) {
    return false;
  }
  return block1.canCollideCheck(state, stopOnLiquid);
}
 
開發者ID:ToroCraft,項目名稱:PowerProbe,代碼行數:7,代碼來源:RayTracer.java

示例13: shouldSideBeRendered

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
    IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
    Block block = iblockstate.getBlock();
    return !iblockstate.isOpaqueCube() && block != Blocks.END_GATEWAY;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:7,代碼來源:BlockEndGateway.java

示例14: canPlaceBlockAt

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
{
    IBlockState iblockstate = worldIn.getBlockState(pos.down());
    Block block = iblockstate.getBlock();
    return block != Blocks.ICE && block != Blocks.PACKED_ICE ? (iblockstate.getMaterial() == Material.LEAVES ? true : (block == this && ((Integer)iblockstate.getValue(LAYERS)).intValue() == 8 ? true : iblockstate.isOpaqueCube() && iblockstate.getMaterial().blocksMovement())) : false;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:7,代碼來源:BlockSnow.java

示例15: checkBlock

import net.minecraft.block.state.IBlockState; //導入方法依賴的package包/類
private static boolean checkBlock(Block p_checkBlock_0_, IBlockState p_checkBlock_1_)
{
    if (p_checkBlock_1_.isFullCube())
    {
        return false;
    }
    else if (p_checkBlock_1_.isOpaqueCube())
    {
        return false;
    }
    else if (p_checkBlock_0_ instanceof BlockSnow)
    {
        return false;
    }
    else if (!(p_checkBlock_0_ instanceof BlockBush) || !(p_checkBlock_0_ instanceof BlockDoublePlant) && !(p_checkBlock_0_ instanceof BlockFlower) && !(p_checkBlock_0_ instanceof BlockMushroom) && !(p_checkBlock_0_ instanceof BlockSapling) && !(p_checkBlock_0_ instanceof BlockTallGrass))
    {
        if (!(p_checkBlock_0_ instanceof BlockFence) && !(p_checkBlock_0_ instanceof BlockFenceGate) && !(p_checkBlock_0_ instanceof BlockFlowerPot) && !(p_checkBlock_0_ instanceof BlockPane) && !(p_checkBlock_0_ instanceof BlockReed) && !(p_checkBlock_0_ instanceof BlockWall))
        {
            if (p_checkBlock_0_ instanceof BlockRedstoneTorch && p_checkBlock_1_.getValue(BlockTorch.FACING) == EnumFacing.UP)
            {
                return true;
            }
            else
            {
                if (p_checkBlock_0_ instanceof BlockLever)
                {
                    Object object = p_checkBlock_1_.getValue(BlockLever.FACING);

                    if (object == BlockLever.EnumOrientation.UP_X || object == BlockLever.EnumOrientation.UP_Z)
                    {
                        return true;
                    }
                }

                return false;
            }
        }
        else
        {
            return true;
        }
    }
    else
    {
        return true;
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:48,代碼來源:BetterSnow.java


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