Java 类net.minecraft.block.BlockFenceGate 实例源码

项目:DecompiledMinecraft    文件:EntityPlayerMP.java   
/**
 * process player falling based on movement packet
 */
public void handleFalling(double p_71122_1_, boolean p_71122_3_)
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    Block block = this.worldObj.getBlockState(blockpos).getBlock();

    if (block.getMaterial() == Material.air)
    {
        Block block1 = this.worldObj.getBlockState(blockpos.down()).getBlock();

        if (block1 instanceof BlockFence || block1 instanceof BlockWall || block1 instanceof BlockFenceGate)
        {
            blockpos = blockpos.down();
            block = this.worldObj.getBlockState(blockpos).getBlock();
        }
    }

    super.updateFallState(p_71122_1_, p_71122_3_, block, blockpos);
}
项目:DecompiledMinecraft    文件:EntityPlayerMP.java   
/**
 * process player falling based on movement packet
 */
public void handleFalling(double p_71122_1_, boolean p_71122_3_)
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    Block block = this.worldObj.getBlockState(blockpos).getBlock();

    if (block.getMaterial() == Material.air)
    {
        Block block1 = this.worldObj.getBlockState(blockpos.down()).getBlock();

        if (block1 instanceof BlockFence || block1 instanceof BlockWall || block1 instanceof BlockFenceGate)
        {
            blockpos = blockpos.down();
            block = this.worldObj.getBlockState(blockpos).getBlock();
        }
    }

    super.updateFallState(p_71122_1_, p_71122_3_, block, blockpos);
}
项目:BaseClient    文件:EntityPlayerMP.java   
/**
 * process player falling based on movement packet
 */
public void handleFalling(double p_71122_1_, boolean p_71122_3_)
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    Block block = this.worldObj.getBlockState(blockpos).getBlock();

    if (block.getMaterial() == Material.air)
    {
        Block block1 = this.worldObj.getBlockState(blockpos.down()).getBlock();

        if (block1 instanceof BlockFence || block1 instanceof BlockWall || block1 instanceof BlockFenceGate)
        {
            blockpos = blockpos.down();
            block = this.worldObj.getBlockState(blockpos).getBlock();
        }
    }

    super.updateFallState(p_71122_1_, p_71122_3_, block, blockpos);
}
项目:BaseClient    文件:EntityPlayerMP.java   
/**
 * process player falling based on movement packet
 */
public void handleFalling(double p_71122_1_, boolean p_71122_3_)
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    Block block = this.worldObj.getBlockState(blockpos).getBlock();

    if (block.getMaterial() == Material.air)
    {
        Block block1 = this.worldObj.getBlockState(blockpos.down()).getBlock();

        if (block1 instanceof BlockFence || block1 instanceof BlockWall || block1 instanceof BlockFenceGate)
        {
            blockpos = blockpos.down();
            block = this.worldObj.getBlockState(blockpos).getBlock();
        }
    }

    super.updateFallState(p_71122_1_, p_71122_3_, block, blockpos);
}
项目:Zombe-Modpack    文件:EntityPlayerMP.java   
/**
 * process player falling based on movement packet
 */
public void handleFalling(double y, boolean onGroundIn)
{
    int i = MathHelper.floor(this.posX);
    int j = MathHelper.floor(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    IBlockState iblockstate = this.world.getBlockState(blockpos);

    if (iblockstate.getMaterial() == Material.AIR)
    {
        BlockPos blockpos1 = blockpos.down();
        IBlockState iblockstate1 = this.world.getBlockState(blockpos1);
        Block block = iblockstate1.getBlock();

        if (block instanceof BlockFence || block instanceof BlockWall || block instanceof BlockFenceGate)
        {
            blockpos = blockpos1;
            iblockstate = iblockstate1;
        }
    }

    super.updateFallState(y, onGroundIn, iblockstate, blockpos);
}
项目:Backmemed    文件:EntityPlayerMP.java   
/**
 * process player falling based on movement packet
 */
public void handleFalling(double y, boolean onGroundIn)
{
    int i = MathHelper.floor(this.posX);
    int j = MathHelper.floor(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    IBlockState iblockstate = this.world.getBlockState(blockpos);

    if (iblockstate.getMaterial() == Material.AIR)
    {
        BlockPos blockpos1 = blockpos.down();
        IBlockState iblockstate1 = this.world.getBlockState(blockpos1);
        Block block = iblockstate1.getBlock();

        if (block instanceof BlockFence || block instanceof BlockWall || block instanceof BlockFenceGate)
        {
            blockpos = blockpos1;
            iblockstate = iblockstate1;
        }
    }

    super.updateFallState(y, onGroundIn, iblockstate, blockpos);
}
项目:CustomWorldGen    文件:EntityPlayerMP.java   
/**
 * process player falling based on movement packet
 */
public void handleFalling(double y, boolean onGroundIn)
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    IBlockState iblockstate = this.worldObj.getBlockState(blockpos);

    if (iblockstate.getBlock().isAir(iblockstate, this.worldObj, blockpos))
    {
        BlockPos blockpos1 = blockpos.down();
        IBlockState iblockstate1 = this.worldObj.getBlockState(blockpos1);
        Block block = iblockstate1.getBlock();

        if (block instanceof BlockFence || block instanceof BlockWall || block instanceof BlockFenceGate)
        {
            blockpos = blockpos1;
            iblockstate = iblockstate1;
        }
    }

    super.updateFallState(y, onGroundIn, iblockstate, blockpos);
}
项目:ExpandedRailsMod    文件:EntityPlayerMP.java   
/**
 * process player falling based on movement packet
 */
public void handleFalling(double y, boolean onGroundIn)
{
    int i = MathHelper.floor_double(this.posX);
    int j = MathHelper.floor_double(this.posY - 0.20000000298023224D);
    int k = MathHelper.floor_double(this.posZ);
    BlockPos blockpos = new BlockPos(i, j, k);
    IBlockState iblockstate = this.worldObj.getBlockState(blockpos);

    if (iblockstate.getBlock().isAir(iblockstate, this.worldObj, blockpos))
    {
        BlockPos blockpos1 = blockpos.down();
        IBlockState iblockstate1 = this.worldObj.getBlockState(blockpos1);
        Block block = iblockstate1.getBlock();

        if (block instanceof BlockFence || block instanceof BlockWall || block instanceof BlockFenceGate)
        {
            blockpos = blockpos1;
            iblockstate = iblockstate1;
        }
    }

    super.updateFallState(y, onGroundIn, iblockstate, blockpos);
}
项目:SecurityCraft    文件:BlockIronFence.java   
@Override
public boolean canConnectTo(IBlockAccess par1IBlockAccess, BlockPos pos)
{
    Block block = par1IBlockAccess.getBlockState(pos).getBlock();

    //split up oneliner to be more readable
    if(block != this && !(block instanceof BlockFenceGate) && block != SCContent.reinforcedFencegate)
    {
        if(block.getDefaultState().getMaterial().isOpaque())
            return block.getDefaultState().getMaterial() != Material.GOURD;
        else
            return false;
    }
    else
        return true;
}
项目:SecurityCraft    文件:BlockIronFence.java   
@Override
public boolean canConnectTo(IBlockAccess par1IBlockAccess, BlockPos pos)
{
    Block block = par1IBlockAccess.getBlockState(pos).getBlock();

    //split up oneliner to be more readable
    if(block != this && !(block instanceof BlockFenceGate) && block != SCContent.reinforcedFencegate)
    {
        if(block.getDefaultState().getMaterial().isOpaque())
            return block.getDefaultState().getMaterial() != Material.GOURD;
        else
            return false;
    }
    else
        return true;
}
项目:SecurityCraft    文件:BlockIronFence.java   
@Override
public boolean canConnectTo(IBlockAccess par1IBlockAccess, BlockPos pos)
{
    Block block = par1IBlockAccess.getBlockState(pos).getBlock();

    //split up oneliner to be more readable
    if(block != this && !(block instanceof BlockFenceGate) && block != SCContent.reinforcedFencegate)
    {
        if(block.getMaterial().isOpaque())
            return block.getMaterial() != Material.gourd;
        else
            return false;
    }
    else
        return true;
}
项目:SecurityCraft    文件:BlockIronFence.java   
@Override
public boolean canConnectTo(IBlockAccess par1IBlockAccess, BlockPos pos)
{
    Block block = par1IBlockAccess.getBlockState(pos).getBlock();

    //split up oneliner to be more readable
    if(block != this && !(block instanceof BlockFenceGate) && block != SCContent.reinforcedFencegate)
    {
        if(block.getMaterial().isOpaque())
            return block.getMaterial() != Material.gourd;
        else
            return false;
    }
    else
        return true;
}
项目:SecurityCraft    文件:BlockIronFence.java   
@Override
public boolean canConnectTo(IBlockAccess par1IBlockAccess, BlockPos pos, EnumFacing facing)
{
    Block block = par1IBlockAccess.getBlockState(pos).getBlock();

    //split up oneliner to be more readable
    if(block != this && !(block instanceof BlockFenceGate) && block != SCContent.reinforcedFencegate)
    {
        if(block.getDefaultState().getMaterial().isOpaque())
            return block.getDefaultState().getMaterial() != Material.GOURD;
        else
            return false;
    }
    else
        return true;
}
项目:Bewitchment    文件:BlockScornedBrickFence.java   
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;
}
项目:Bewitchment    文件:BlockFakeIceFence.java   
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;
}
项目:Backmemed    文件:WalkNodeProcessor.java   
private PathNodeType getPathNodeTypeRaw(IBlockAccess p_189553_1_, int p_189553_2_, int p_189553_3_, int p_189553_4_)
{
    BlockPos blockpos = new BlockPos(p_189553_2_, p_189553_3_, p_189553_4_);
    IBlockState iblockstate = p_189553_1_.getBlockState(blockpos);
    Block block = iblockstate.getBlock();
    Material material = iblockstate.getMaterial();
    return material == Material.AIR ? PathNodeType.OPEN : (block != Blocks.TRAPDOOR && block != Blocks.IRON_TRAPDOOR && block != Blocks.WATERLILY ? (block == Blocks.FIRE ? PathNodeType.DAMAGE_FIRE : (block == Blocks.CACTUS ? PathNodeType.DAMAGE_CACTUS : (block instanceof BlockDoor && material == Material.WOOD && !((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_WOOD_CLOSED : (block instanceof BlockDoor && material == Material.IRON && !((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_IRON_CLOSED : (block instanceof BlockDoor && ((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_OPEN : (block instanceof BlockRailBase ? PathNodeType.RAIL : (!(block instanceof BlockFence) && !(block instanceof BlockWall) && (!(block instanceof BlockFenceGate) || ((Boolean)iblockstate.getValue(BlockFenceGate.OPEN)).booleanValue()) ? (material == Material.WATER ? PathNodeType.WATER : (material == Material.LAVA ? PathNodeType.LAVA : (block.isPassable(p_189553_1_, blockpos) ? PathNodeType.OPEN : PathNodeType.BLOCKED))) : PathNodeType.FENCE))))))) : PathNodeType.TRAPDOOR);
}
项目:CustomWorldGen    文件:WalkNodeProcessor.java   
private PathNodeType getPathNodeTypeRaw(IBlockAccess p_189553_1_, int p_189553_2_, int p_189553_3_, int p_189553_4_)
{
    BlockPos blockpos = new BlockPos(p_189553_2_, p_189553_3_, p_189553_4_);
    IBlockState iblockstate = p_189553_1_.getBlockState(blockpos);
    Block block = iblockstate.getBlock();
    Material material = iblockstate.getMaterial();
    return material == Material.AIR ? PathNodeType.OPEN : (block != Blocks.TRAPDOOR && block != Blocks.IRON_TRAPDOOR && block != Blocks.WATERLILY ? (block == Blocks.FIRE ? PathNodeType.DAMAGE_FIRE : (block == Blocks.CACTUS ? PathNodeType.DAMAGE_CACTUS : (block instanceof BlockDoor && material == Material.WOOD && !((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_WOOD_CLOSED : (block instanceof BlockDoor && material == Material.IRON && !((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_IRON_CLOSED : (block instanceof BlockDoor && ((Boolean)iblockstate.getValue(BlockDoor.OPEN)).booleanValue() ? PathNodeType.DOOR_OPEN : (block instanceof BlockRailBase ? PathNodeType.RAIL : (!(block instanceof BlockFence) && !(block instanceof BlockWall) && (!(block instanceof BlockFenceGate) || ((Boolean)iblockstate.getValue(BlockFenceGate.OPEN)).booleanValue()) ? (material == Material.WATER ? PathNodeType.WATER : (material == Material.LAVA ? PathNodeType.LAVA : (block.isPassable(p_189553_1_, blockpos) ? PathNodeType.OPEN : PathNodeType.BLOCKED))) : PathNodeType.FENCE))))))) : PathNodeType.TRAPDOOR);
}
项目:TRHS_Club_Mod_2016    文件:RotationHelper.java   
public static ForgeDirection[] getValidVanillaBlockRotations(Block block)
{
    return (block instanceof BlockBed || 
            block instanceof BlockPumpkin ||
            block instanceof BlockFenceGate || 
            block instanceof BlockEndPortalFrame || 
            block instanceof BlockTripWireHook || 
            block instanceof BlockCocoa || 
            block instanceof BlockRailPowered || 
            block instanceof BlockRailDetector || 
            block instanceof BlockStairs || 
            block instanceof BlockChest || 
            block instanceof BlockEnderChest || 
            block instanceof BlockFurnace || 
            block instanceof BlockLadder || 
            block == Blocks.field_150444_as || 
            block == Blocks.field_150472_an || 
            block instanceof BlockDoor || 
            block instanceof BlockRail ||
            block instanceof BlockButton || 
            block instanceof BlockRedstoneRepeater || 
            block instanceof BlockRedstoneComparator || 
            block instanceof BlockTrapDoor || 
            block instanceof BlockHugeMushroom || 
            block instanceof BlockVine || 
            block instanceof BlockSkull || 
            block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS;
}
项目:CreativeBlock    文件:CBWall.java   
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
{
    Block block = worldIn.getBlockState(pos).getBlock();
    if (block instanceof CBWall && block.getMaterial().equals(this.getMaterial())) return true;

    return block == Blocks.barrier ? false : (block != this && !(block instanceof BlockFenceGate) ? (block.getMaterial().isOpaque() && block.isFullCube() ? block.getMaterial() != Material.gourd : false) : true);
}
项目:MC-Prefab    文件:StructureChickenCoop.java   
@Override
protected Boolean CustomBlockProcessingHandled(StructureConfiguration configuration, BuildBlock block, World world, BlockPos originalPos,
        EnumFacing assumedNorth, Block foundBlock, IBlockState blockState, EntityPlayer player)
{
    if (foundBlock instanceof BlockFenceGate && this.chickenCoopBlockPos == null)
    { 
        chickenCoopBlockPos = block.getStartingPosition().getRelativePosition(
                originalPos,
                this.getClearSpace().getShape().getDirection(),
                configuration.houseFacing).offset(configuration.houseFacing.getOpposite(), 2);
    }

    return false;
}
项目:CauldronGit    文件:RotationHelper.java   
public static ForgeDirection[] getValidVanillaBlockRotations(Block block)
{
    return (block instanceof BlockBed || 
            block instanceof BlockPumpkin ||
            block instanceof BlockFenceGate || 
            block instanceof BlockEndPortalFrame || 
            block instanceof BlockTripWireHook || 
            block instanceof BlockCocoa || 
            block instanceof BlockRailPowered || 
            block instanceof BlockRailDetector || 
            block instanceof BlockStairs || 
            block instanceof BlockChest || 
            block instanceof BlockEnderChest || 
            block instanceof BlockFurnace || 
            block instanceof BlockLadder || 
            block == Blocks.wall_sign || 
            block == Blocks.standing_sign || 
            block instanceof BlockDoor || 
            block instanceof BlockRail ||
            block instanceof BlockButton || 
            block instanceof BlockRedstoneRepeater || 
            block instanceof BlockRedstoneComparator || 
            block instanceof BlockTrapDoor || 
            block instanceof BlockHugeMushroom || 
            block instanceof BlockVine || 
            block instanceof BlockSkull || 
            block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS;
}
项目:Minestrappolation-4    文件:MBlockWall.java   
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
{
    Block block = worldIn.getBlockState(pos).getBlock();
    if ((this == MBlocks.red_rock_wall && block == MBlocks.red_rock_wall_mossy) || (this
                                                                                        == MBlocks.red_rock_wall_mossy
                                                                                        && block
                                                                                               == MBlocks.red_rock_wall)
            || (this == MBlocks.coldstone_wall && block == MBlocks.coldstone_wall_mossy) || (this
                                                                                                 == MBlocks.coldstone_wall_mossy
                                                                                                 && block
                                                                                                        == MBlocks.coldstone_wall)
            || (this == MBlocks.icestone_wall && block == MBlocks.icestone_wall_mossy) || (this
                                                                                               == MBlocks.icestone_wall_mossy
                                                                                               && block
                                                                                                      == MBlocks.icestone_wall)
            || (this == MBlocks.oceanstone_wall && block == MBlocks.oceanstone_wall_mossy) || (this
                                                                                                   == MBlocks.oceanstone_wall_mossy
                                                                                                   && block
                                                                                                          == MBlocks.oceanstone_wall))
        return true;
    else
        return block != Blocks.barrier && (!(block != this && !(block instanceof BlockFenceGate)) || ((block
                                                                                                           .getMaterial()
                                                                                                           .isOpaque()
                                                                                                           && block
                                                                                                                  .isFullCube())
                                                                                                          && block
                                                                                                                 .getMaterial()
                                                                                                                 != Material.gourd));
}
项目:Cauldron    文件:RotationHelper.java   
public static ForgeDirection[] getValidVanillaBlockRotations(Block block)
{
    return (block instanceof BlockBed || 
            block instanceof BlockPumpkin ||
            block instanceof BlockFenceGate || 
            block instanceof BlockEndPortalFrame || 
            block instanceof BlockTripWireHook || 
            block instanceof BlockCocoa || 
            block instanceof BlockRailPowered || 
            block instanceof BlockRailDetector || 
            block instanceof BlockStairs || 
            block instanceof BlockChest || 
            block instanceof BlockEnderChest || 
            block instanceof BlockFurnace || 
            block instanceof BlockLadder || 
            block == Blocks.wall_sign || 
            block == Blocks.standing_sign || 
            block instanceof BlockDoor || 
            block instanceof BlockRail ||
            block instanceof BlockButton || 
            block instanceof BlockRedstoneRepeater || 
            block instanceof BlockRedstoneComparator || 
            block instanceof BlockTrapDoor || 
            block instanceof BlockHugeMushroom || 
            block instanceof BlockVine || 
            block instanceof BlockSkull || 
            block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS;
}
项目:Cauldron    文件:RotationHelper.java   
public static ForgeDirection[] getValidVanillaBlockRotations(Block block)
{
    return (block instanceof BlockBed || 
            block instanceof BlockPumpkin ||
            block instanceof BlockFenceGate || 
            block instanceof BlockEndPortalFrame || 
            block instanceof BlockTripWireHook || 
            block instanceof BlockCocoa || 
            block instanceof BlockRailPowered || 
            block instanceof BlockRailDetector || 
            block instanceof BlockStairs || 
            block instanceof BlockChest || 
            block instanceof BlockEnderChest || 
            block instanceof BlockFurnace || 
            block instanceof BlockLadder || 
            block == Blocks.wall_sign || 
            block == Blocks.standing_sign || 
            block instanceof BlockDoor || 
            block instanceof BlockRail ||
            block instanceof BlockButton || 
            block instanceof BlockRedstoneRepeater || 
            block instanceof BlockRedstoneComparator || 
            block instanceof BlockTrapDoor || 
            block instanceof BlockHugeMushroom || 
            block instanceof BlockVine || 
            block instanceof BlockSkull || 
            block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS;
}
项目:Cauldron    文件:RotationHelper.java   
public static ForgeDirection[] getValidVanillaBlockRotations(Block block)
{
    return (block instanceof BlockBed || 
            block instanceof BlockPumpkin ||
            block instanceof BlockFenceGate || 
            block instanceof BlockEndPortalFrame || 
            block instanceof BlockTripWireHook || 
            block instanceof BlockCocoa || 
            block instanceof BlockRailPowered || 
            block instanceof BlockRailDetector || 
            block instanceof BlockStairs || 
            block instanceof BlockChest || 
            block instanceof BlockEnderChest || 
            block instanceof BlockFurnace || 
            block instanceof BlockLadder || 
            block == Blocks.wall_sign || 
            block == Blocks.standing_sign || 
            block instanceof BlockDoor || 
            block instanceof BlockRail ||
            block instanceof BlockButton || 
            block instanceof BlockRedstoneRepeater || 
            block instanceof BlockRedstoneComparator || 
            block instanceof BlockTrapDoor || 
            block instanceof BlockHugeMushroom || 
            block instanceof BlockVine || 
            block instanceof BlockSkull || 
            block instanceof BlockAnvil) ? UP_DOWN_AXES : VALID_DIRECTIONS;
}
项目:RuneCraftery    文件:RenderBlocks.java   
public boolean func_78612_b(Block p_78612_1_, int p_78612_2_, int p_78612_3_, int p_78612_4_) {
   int var5 = p_78612_1_.func_71857_b();
   if(var5 == -1) {
      return false;
   } else {
      p_78612_1_.func_71902_a(this.field_78669_a, p_78612_2_, p_78612_3_, p_78612_4_);
      this.func_83018_a(p_78612_1_);
      return var5 == 0?this.func_78570_q(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 4?this.func_78621_p(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 31?this.func_78581_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 1?this.func_78620_l(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 2?this.func_78572_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 20?this.func_78598_k(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 11?this.func_78582_a((BlockFence)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 39?this.func_96445_r(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 5?this.func_78589_i(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 13?this.func_78584_s(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 9?this.func_78586_a((BlockRailBase)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 19?this.func_78603_m(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 23?this.func_78566_o(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 6?this.func_78614_n(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 3?this.func_78590_h((BlockFire)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 8?this.func_78576_j(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 7?this.func_78601_u(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 10?this.func_78565_t((BlockStairs)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 27?this.func_78618_a((BlockDragonEgg)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 32?this.func_82779_a((BlockWall)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 12?this.func_78594_e(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 29?this.func_78577_f(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 30?this.func_78619_g(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 14?this.func_78574_w(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 15?this.func_78610_x((BlockRedstoneRepeater)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 36?this.func_94176_a((BlockRedstoneLogic)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 37?this.func_94171_a((BlockComparator)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 16?this.func_78593_b(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, false):(var5 == 17?this.func_78608_c(p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_, true):(var5 == 18?this.func_78592_a((BlockPane)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 21?this.func_78580_a((BlockFenceGate)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 24?this.func_78615_a((BlockCauldron)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 33?this.func_82780_a((BlockFlowerPot)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 35?this.func_82775_a((BlockAnvil)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 25?this.func_78585_a((BlockBrewingStand)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 26?this.func_78567_v((BlockEndPortalFrame)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 28?this.func_78616_a((BlockCocoa)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 34?this.func_82778_a((BlockBeacon)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):(var5 == 38?this.func_94172_a((BlockHopper)p_78612_1_, p_78612_2_, p_78612_3_, p_78612_4_):false))))))))))))))))))))))))))))))))))))));
   }
}
项目:OpenBlocks    文件:MagnetWhitelists.java   
public void initTesters() {
    entityWhitelist.addTester(new ClassTester<Entity>(EntityItem.class));
    entityWhitelist.addTester(new ClassTester<Entity>(EntityBoat.class));
    entityWhitelist.addTester(new ClassTester<Entity>(EntityMinecart.class));
    MinecraftForge.EVENT_BUS.post(new EntityRegisterEvent(entityWhitelist));

    blockWhitelist.addTester(o -> {
        float hardness = o.blockState.getBlockHardness(o.world, o);
        return (hardness < 0)? Result.REJECT : Result.CONTINUE;
    });

    blockWhitelist.addTester(o -> o.blockState.getRenderType() == EnumBlockRenderType.MODEL? Result.ACCEPT : Result.CONTINUE);

    blockWhitelist.addTester(createBlockClassTester(BlockSand.class));
    blockWhitelist.addTester(createBlockClassTester(BlockStairs.class));
    blockWhitelist.addTester(createBlockClassTester(BlockFence.class));
    blockWhitelist.addTester(createBlockClassTester(BlockFenceGate.class));
    blockWhitelist.addTester(createBlockIdentityTester(Blocks.CACTUS));
    MinecraftForge.EVENT_BUS.post(new BlockRegisterEvent(blockWhitelist));

    tileEntityWhitelist
            .addTester(new ClassTester<TileEntity>(TileEntityBeacon.class))
            .addTester(new ClassTester<TileEntity>(TileEntityBrewingStand.class))
            .addTester(new ClassTester<TileEntity>(TileEntityChest.class))
            .addTester(new ClassTester<TileEntity>(TileEntityCommandBlock.class))
            .addTester(new ClassTester<TileEntity>(TileEntityDispenser.class))
            .addTester(new ClassTester<TileEntity>(TileEntityEnchantmentTable.class))
            .addTester(new ClassTester<TileEntity>(TileEntityEnderChest.class))
            .addTester(new ClassTester<TileEntity>(TileEntityFurnace.class))
            .addTester(new ClassTester<TileEntity>(TileEntityHopper.class))
            .addTester(new ClassTester<TileEntity>(TileEntityNote.class))
            .addTester(new ClassTester<TileEntity>(TileEntityJukebox.class));
}
项目:DecompiledMinecraft    文件:WalkNodeProcessor.java   
public static int func_176170_a(IBlockAccess blockaccessIn, Entity entityIn, int x, int y, int z, int sizeX, int sizeY, int sizeZ, boolean avoidWater, boolean breakDoors, boolean enterDoors)
{
    boolean flag = false;
    BlockPos blockpos = new BlockPos(entityIn);
    BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();

    for (int i = x; i < x + sizeX; ++i)
    {
        for (int j = y; j < y + sizeY; ++j)
        {
            for (int k = z; k < z + sizeZ; ++k)
            {
                blockpos$mutableblockpos.func_181079_c(i, j, k);
                Block block = blockaccessIn.getBlockState(blockpos$mutableblockpos).getBlock();

                if (block.getMaterial() != Material.air)
                {
                    if (block != Blocks.trapdoor && block != Blocks.iron_trapdoor)
                    {
                        if (block != Blocks.flowing_water && block != Blocks.water)
                        {
                            if (!enterDoors && block instanceof BlockDoor && block.getMaterial() == Material.wood)
                            {
                                return 0;
                            }
                        }
                        else
                        {
                            if (avoidWater)
                            {
                                return -1;
                            }

                            flag = true;
                        }
                    }
                    else
                    {
                        flag = true;
                    }

                    if (entityIn.worldObj.getBlockState(blockpos$mutableblockpos).getBlock() instanceof BlockRailBase)
                    {
                        if (!(entityIn.worldObj.getBlockState(blockpos).getBlock() instanceof BlockRailBase) && !(entityIn.worldObj.getBlockState(blockpos.down()).getBlock() instanceof BlockRailBase))
                        {
                            return -3;
                        }
                    }
                    else if (!block.isPassable(blockaccessIn, blockpos$mutableblockpos) && (!breakDoors || !(block instanceof BlockDoor) || block.getMaterial() != Material.wood))
                    {
                        if (block instanceof BlockFence || block instanceof BlockFenceGate || block instanceof BlockWall)
                        {
                            return -3;
                        }

                        if (block == Blocks.trapdoor || block == Blocks.iron_trapdoor)
                        {
                            return -4;
                        }

                        Material material = block.getMaterial();

                        if (material != Material.lava)
                        {
                            return 0;
                        }

                        if (!entityIn.isInLava())
                        {
                            return -2;
                        }
                    }
                }
            }
        }
    }

    return flag ? 2 : 1;
}
项目:DecompiledMinecraft    文件:WalkNodeProcessor.java   
public static int func_176170_a(IBlockAccess blockaccessIn, Entity entityIn, int x, int y, int z, int sizeX, int sizeY, int sizeZ, boolean avoidWater, boolean breakDoors, boolean enterDoors)
{
    boolean flag = false;
    BlockPos blockpos = new BlockPos(entityIn);
    BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();

    for (int i = x; i < x + sizeX; ++i)
    {
        for (int j = y; j < y + sizeY; ++j)
        {
            for (int k = z; k < z + sizeZ; ++k)
            {
                blockpos$mutableblockpos.func_181079_c(i, j, k);
                Block block = blockaccessIn.getBlockState(blockpos$mutableblockpos).getBlock();

                if (block.getMaterial() != Material.air)
                {
                    if (block != Blocks.trapdoor && block != Blocks.iron_trapdoor)
                    {
                        if (block != Blocks.flowing_water && block != Blocks.water)
                        {
                            if (!enterDoors && block instanceof BlockDoor && block.getMaterial() == Material.wood)
                            {
                                return 0;
                            }
                        }
                        else
                        {
                            if (avoidWater)
                            {
                                return -1;
                            }

                            flag = true;
                        }
                    }
                    else
                    {
                        flag = true;
                    }

                    if (entityIn.worldObj.getBlockState(blockpos$mutableblockpos).getBlock() instanceof BlockRailBase)
                    {
                        if (!(entityIn.worldObj.getBlockState(blockpos).getBlock() instanceof BlockRailBase) && !(entityIn.worldObj.getBlockState(blockpos.down()).getBlock() instanceof BlockRailBase))
                        {
                            return -3;
                        }
                    }
                    else if (!block.isPassable(blockaccessIn, blockpos$mutableblockpos) && (!breakDoors || !(block instanceof BlockDoor) || block.getMaterial() != Material.wood))
                    {
                        if (block instanceof BlockFence || block instanceof BlockFenceGate || block instanceof BlockWall)
                        {
                            return -3;
                        }

                        if (block == Blocks.trapdoor || block == Blocks.iron_trapdoor)
                        {
                            return -4;
                        }

                        Material material = block.getMaterial();

                        if (material != Material.lava)
                        {
                            return 0;
                        }

                        if (!entityIn.isInLava())
                        {
                            return -2;
                        }
                    }
                }
            }
        }
    }

    return flag ? 2 : 1;
}
项目:BaseClient    文件:BetterSnow.java   
private static boolean checkBlock(Block p_checkBlock_0_, IBlockState p_checkBlock_1_)
{
    if (p_checkBlock_0_.isFullCube())
    {
        return false;
    }
    else if (p_checkBlock_0_.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;
    }
}
项目:BaseClient    文件:WalkNodeProcessor.java   
public static int func_176170_a(IBlockAccess blockaccessIn, Entity entityIn, int x, int y, int z, int sizeX, int sizeY, int sizeZ, boolean avoidWater, boolean breakDoors, boolean enterDoors)
{
    boolean flag = false;
    BlockPos blockpos = new BlockPos(entityIn);
    BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();

    for (int i = x; i < x + sizeX; ++i)
    {
        for (int j = y; j < y + sizeY; ++j)
        {
            for (int k = z; k < z + sizeZ; ++k)
            {
                blockpos$mutableblockpos.func_181079_c(i, j, k);
                Block block = blockaccessIn.getBlockState(blockpos$mutableblockpos).getBlock();

                if (block.getMaterial() != Material.air)
                {
                    if (block != Blocks.trapdoor && block != Blocks.iron_trapdoor)
                    {
                        if (block != Blocks.flowing_water && block != Blocks.water)
                        {
                            if (!enterDoors && block instanceof BlockDoor && block.getMaterial() == Material.wood)
                            {
                                return 0;
                            }
                        }
                        else
                        {
                            if (avoidWater)
                            {
                                return -1;
                            }

                            flag = true;
                        }
                    }
                    else
                    {
                        flag = true;
                    }

                    if (entityIn.worldObj.getBlockState(blockpos$mutableblockpos).getBlock() instanceof BlockRailBase)
                    {
                        if (!(entityIn.worldObj.getBlockState(blockpos).getBlock() instanceof BlockRailBase) && !(entityIn.worldObj.getBlockState(blockpos.down()).getBlock() instanceof BlockRailBase))
                        {
                            return -3;
                        }
                    }
                    else if (!block.isPassable(blockaccessIn, blockpos$mutableblockpos) && (!breakDoors || !(block instanceof BlockDoor) || block.getMaterial() != Material.wood))
                    {
                        if (block instanceof BlockFence || block instanceof BlockFenceGate || block instanceof BlockWall)
                        {
                            return -3;
                        }

                        if (block == Blocks.trapdoor || block == Blocks.iron_trapdoor)
                        {
                            return -4;
                        }

                        Material material = block.getMaterial();

                        if (material != Material.lava)
                        {
                            return 0;
                        }

                        if (!entityIn.isInLava())
                        {
                            return -2;
                        }
                    }
                }
            }
        }
    }

    return flag ? 2 : 1;
}
项目:BaseClient    文件:BetterSnow.java   
private static boolean checkBlock(Block p_checkBlock_0_, IBlockState p_checkBlock_1_)
{
    if (p_checkBlock_0_.isFullCube())
    {
        return false;
    }
    else if (p_checkBlock_0_.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;
    }
}
项目:BaseClient    文件:WalkNodeProcessor.java   
public static int func_176170_a(IBlockAccess blockaccessIn, Entity entityIn, int x, int y, int z, int sizeX, int sizeY, int sizeZ, boolean avoidWater, boolean breakDoors, boolean enterDoors)
{
    boolean flag = false;
    BlockPos blockpos = new BlockPos(entityIn);
    BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();

    for (int i = x; i < x + sizeX; ++i)
    {
        for (int j = y; j < y + sizeY; ++j)
        {
            for (int k = z; k < z + sizeZ; ++k)
            {
                blockpos$mutableblockpos.func_181079_c(i, j, k);
                Block block = blockaccessIn.getBlockState(blockpos$mutableblockpos).getBlock();

                if (block.getMaterial() != Material.air)
                {
                    if (block != Blocks.trapdoor && block != Blocks.iron_trapdoor)
                    {
                        if (block != Blocks.flowing_water && block != Blocks.water)
                        {
                            if (!enterDoors && block instanceof BlockDoor && block.getMaterial() == Material.wood)
                            {
                                return 0;
                            }
                        }
                        else
                        {
                            if (avoidWater)
                            {
                                return -1;
                            }

                            flag = true;
                        }
                    }
                    else
                    {
                        flag = true;
                    }

                    if (entityIn.worldObj.getBlockState(blockpos$mutableblockpos).getBlock() instanceof BlockRailBase)
                    {
                        if (!(entityIn.worldObj.getBlockState(blockpos).getBlock() instanceof BlockRailBase) && !(entityIn.worldObj.getBlockState(blockpos.down()).getBlock() instanceof BlockRailBase))
                        {
                            return -3;
                        }
                    }
                    else if (!block.isPassable(blockaccessIn, blockpos$mutableblockpos) && (!breakDoors || !(block instanceof BlockDoor) || block.getMaterial() != Material.wood))
                    {
                        if (block instanceof BlockFence || block instanceof BlockFenceGate || block instanceof BlockWall)
                        {
                            return -3;
                        }

                        if (block == Blocks.trapdoor || block == Blocks.iron_trapdoor)
                        {
                            return -4;
                        }

                        Material material = block.getMaterial();

                        if (material != Material.lava)
                        {
                            return 0;
                        }

                        if (!entityIn.isInLava())
                        {
                            return -2;
                        }
                    }
                }
            }
        }
    }

    return flag ? 2 : 1;
}
项目:Backmemed    文件:BetterSnow.java   
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;
    }
}
项目:Aether-Legacy    文件:BlockAetherWall.java   
private boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);
    Block block = iblockstate.getBlock();
    return block instanceof BlockAetherWall ? true : block == Blocks.BARRIER ? false : (block != this && !(block instanceof BlockFenceGate) ? (block.getMaterial(iblockstate).isOpaque() && iblockstate.isFullCube() ? block.getMaterial(iblockstate) != Material.GOURD : false) : true);
}
项目:shifted-snow    文件:ClassProviders.java   
public static void addFences() {
  ShiftedSnowApi.addSimpleClassMapping(BlockFence.class, EnumSnowType.MINUS_FULL);
  ShiftedSnowApi.addSimpleClassMapping(BlockFenceGate.class, EnumSnowType.MINUS_FULL);
}
项目:EverythingBlocks    文件:WallEverything.java   
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) {
 IBlockState state = worldIn.getBlockState(pos);
 Block block = state.getBlock();
 return block == Blocks.BARRIER ? false : (block != this && !(block instanceof BlockFenceGate) ? 
         (block.getMaterial(state).isOpaque() && block.isFullCube(state) ? block.getMaterial(state) != Material.GOURD : false) : true);
}
项目:Structures    文件:RotationHelper.java   
private static BlockType getBlockType(Block block) {

    if(block instanceof BlockBed || block instanceof BlockPumpkin || block instanceof BlockFenceGate || block instanceof BlockEndPortalFrame
        || block instanceof BlockCocoa) {
      return BlockType.BED;
    }
    if(block instanceof BlockRail) {
      return BlockType.RAIL;
    }
    if(block instanceof BlockRailPowered || block instanceof BlockRailDetector) {
      return BlockType.RAIL_POWERED;
    }
    if(block instanceof BlockStairs) {
      return BlockType.STAIR;
    }
    if(block instanceof BlockChest || block instanceof BlockEnderChest || block instanceof BlockFurnace || block instanceof BlockLadder
        || block == Blocks.wall_sign) {
      return BlockType.CHEST;
    }
    if(block == Blocks.standing_sign) {
      return BlockType.SIGNPOST;
    }
    if(block instanceof BlockDoor) {
      return BlockType.DOOR;
    }
    if(block instanceof BlockButton) {
      return BlockType.BUTTON;
    }
    if(block instanceof BlockRedstoneRepeater || block instanceof BlockRedstoneComparator) {
      return BlockType.REDSTONE_REPEATER;
    }
    if(block instanceof BlockTrapDoor) {
      return BlockType.TRAPDOOR;
    }
    if(block instanceof BlockHugeMushroom) {
      return BlockType.MUSHROOM_CAP;
    }
    if(block instanceof BlockVine) {
      return BlockType.VINE;
    }
    if(block instanceof BlockSkull) {
      return BlockType.SKULL;
    }
    if(block instanceof BlockAnvil) {
      return BlockType.ANVIL;
    }
    if(block instanceof BlockLog) {
      return BlockType.LOG;
    }
    if(block instanceof BlockDispenser || block instanceof BlockPistonBase || block instanceof BlockPistonExtension || block instanceof BlockHopper) {
      return BlockType.DISPENSER;
    }
    if(block instanceof BlockTorch) {
      return BlockType.TORCH;
    }
    if(block instanceof BlockLever) {
      return BlockType.LEVER;
    }
    if(block instanceof BlockTripWireHook) {
      return BlockType.TRIP_WIRE_HOOK;
    }

    return null;
  }
项目:Quadrum-2    文件:BlockQuadrumFence.java   
@Override
public boolean canConnectFenceTo(IBlockAccess world, int x, int y, int z) {
    Block neighbour = world.getBlock(x, y, z);
    return neighbour instanceof BlockFence || neighbour instanceof BlockFenceGate || (neighbour.isOpaqueCube() && neighbour.renderAsNormalBlock());
}
项目:Quadrum-2    文件:BlockQuadrumWall.java   
@Override
public boolean canConnectWallTo(IBlockAccess world, int x, int y, int z) {
    Block neighbour = world.getBlock(x, y, z);
    return neighbour instanceof BlockFenceGate || neighbour instanceof BlockWall || (neighbour.isOpaqueCube() && neighbour.renderAsNormalBlock());
}