content: package thebetweenlands.common.block.structure;
  
  import net.minecraft.block.Block;
  import net.minecraft.block.ITileEntityProvider;
  import net.minecraft.block.SoundType;
  import net.minecraft.block.material.Material;
  import net.minecraft.block.properties.IProperty;
  import net.minecraft.block.properties.PropertyBool;
  import net.minecraft.block.state.BlockFaceShape;
  import net.minecraft.block.state.BlockStateContainer;
  import net.minecraft.block.state.IBlockState;
  import net.minecraft.entity.EntityLivingBase;
  import net.minecraft.entity.player.EntityPlayer;
  import net.minecraft.tileentity.TileEntity;
  import net.minecraft.util.BlockRenderLayer;
  import net.minecraft.util.EnumBlockRenderType;
  import net.minecraft.util.EnumFacing;
  import net.minecraft.util.math.AxisAlignedBB;
  import net.minecraft.util.math.BlockPos;
  import net.minecraft.world.IBlockAccess;
  import net.minecraft.world.World;
  import net.minecraftforge.fml.relauncher.Side;
  import net.minecraftforge.fml.relauncher.SideOnly;
  import thebetweenlands.client.tab.BLCreativeTabs;
  import thebetweenlands.common.tile.TileEntityBeamOrigin;
  
  public class BlockBeamOrigin extends Block implements ITileEntityProvider {
  	protected static final AxisAlignedBB BOUNDING_BOX = new AxisAlignedBB(-0.1D, -0.5D, -0.1D, 1.1D, 1.2D, 1.1D);
  	protected static final AxisAlignedBB COLLISION_BOX = new AxisAlignedBB(-0.1D, -0.1D, -0.1D, 1.1D, 1.2D, 1.1D);
  	
  	public static final PropertyBool POWERED = PropertyBool.create("powered");
  
  	public BlockBeamOrigin() {
  		super(Material.ROCK);
  		setDefaultState(this.getBlockState().getBaseState().withProperty(POWERED, false));
  		setHardness(10.0F);
  		setResistance(2000.0F);
  		setSoundType(SoundType.STONE);
  	}
  
  	@Override
  	public EnumBlockRenderType getRenderType(IBlockState state) {
  		return EnumBlockRenderType.MODEL;
  	}
  
  	@Override
  	@SideOnly(Side.CLIENT)
  	public BlockRenderLayer getRenderLayer() {
  		return BlockRenderLayer.SOLID;
  	}
  
  	@Override
  	public boolean isOpaqueCube(IBlockState state) {
  		return false;
  	}
  
  	@Override
  	public boolean isNormalCube(IBlockState state) {
  		return false;
  	}
  	
  	@Override
  	public boolean isFullCube(IBlockState state) {
  		return false;
  	}
  
  	@Override
  	public TileEntity createNewTileEntity(World worldIn, int meta) {
  		return new TileEntityBeamOrigin();
  	}
  
  	@Override
  	public int getMetaFromState(IBlockState state) {
  		int meta = 0;
  		if (((Boolean) state.getValue(POWERED)).booleanValue())
  			meta = 1;
  		return meta;
  	}
  
  	@Override
  	public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
  		return this.getDefaultState().withProperty(POWERED, false);
  	}
  
  	@Override
  	protected BlockStateContainer createBlockState() {
  		return new BlockStateContainer(this, new IProperty[] { POWERED });
  	}
  
  	@Override
  	public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player) {
  		if (world.getTileEntity(pos) instanceof TileEntityBeamOrigin) {
  			TileEntityBeamOrigin tile = (TileEntityBeamOrigin) world.getTileEntity(pos);
  			tile.deactivateBlock();
  		}
  	}
  
  	@Override
  	public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, IBlockState state, BlockPos pos, EnumFacing face) {
  		return BlockFaceShape.UNDEFINED;
  	}
  
  	@Override
  	public boolean isSideSolid(IBlockState base_state, IBlockAccess world, BlockPos pos, EnumFacing side) {
  		return false;
  	}
  	
  	@Override
  	public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
  		return BOUNDING_BOX;
  	}
  	
  	@Override
  	public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos) {
  		return COLLISION_BOX;
  	}
  }
  