net.minecraft.block.BlockFenceGate Java Examples

The following examples show how to use net.minecraft.block.BlockFenceGate. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlockWall.java    From customstuff4 with GNU General Public License v3.0 5 votes vote down vote up
private boolean canConnectTo(IBlockAccess worldIn, BlockPos pos, EnumFacing p_176253_3_)
{
    IBlockState iblockstate = worldIn.getBlockState(pos);
    Block block = iblockstate.getBlock();
    BlockFaceShape blockfaceshape = iblockstate.getBlockFaceShape(worldIn, pos, p_176253_3_);
    boolean flag = blockfaceshape == BlockFaceShape.MIDDLE_POLE_THICK || blockfaceshape == BlockFaceShape.MIDDLE_POLE && block instanceof net.minecraft.block.BlockFenceGate;
    return !isExcepBlockForAttachWithPiston(block) && blockfaceshape == BlockFaceShape.SOLID || flag;
}
 
Example #2
Source File: BlockWall.java    From customstuff4 with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
{
    Block connector = world.getBlockState(pos.offset(facing)).getBlock();
    return connector instanceof net.minecraft.block.BlockWall ||
           connector instanceof BlockWall ||
           connector instanceof BlockFenceGate ||
           connector instanceof cubex2.cs4.plugins.vanilla.block.BlockFenceGate;
}
 
Example #3
Source File: BlockBeaconPost.java    From Cyberware with MIT License 4 votes vote down vote up
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos)
{
	IBlockState iblockstate = worldIn.getBlockState(pos);
	Block block = iblockstate.getBlock();
	return block == Blocks.BARRIER ? false : ((!(block instanceof BlockBeaconPost) || block.getMaterial(iblockstate) != this.blockMaterial) && !(block instanceof BlockFenceGate) ? (block.getMaterial(iblockstate).isOpaque() && iblockstate.isFullCube() ? block.getMaterial(iblockstate) != Material.GOURD : false) : true);
}
 
Example #4
Source File: AgriOreDict.java    From AgriCraft with MIT License 4 votes vote down vote up
public static void upgradeOreDict() {
    ReflectionHelper.forEachValueIn(Blocks.class, BlockFence.class, fence -> OreDictionary.registerOre("fenceWood", fence));
    ReflectionHelper.forEachValueIn(Blocks.class, BlockFenceGate.class, gate -> OreDictionary.registerOre("fenceGateWood", gate));
}