// Path: src/main/java/cn/mccraft/chinacraft/block/machine/BlockCrusher.java
// public class BlockCrusher extends BlockMachine {
//     private EnumCrusherMaterial crusherMaterial;
// 
//     public BlockCrusher(EnumCrusherMaterial crusherMaterial) {
//         this.crusherMaterial = crusherMaterial;
//     }
// 
//     @Nullable
//     @Override
//     public TileEntity createNewTileEntity(World worldIn, int meta) {
//         return new TileEntityCrusher(crusherMaterial);
//     }
// 
//     @Override
//     public boolean isFullCube(IBlockState state) {
//         return false;
//     }
// 
//     @Override
//     public boolean isOpaqueCube(IBlockState state) {
//         return false;
//     }
// 
//     @Override
//     public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
//         return new AxisAlignedBB(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
//     }
// 
//     @Override
//     public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer,
//                                 ItemStack stack) {
//         int l = MathHelper.floor(placer.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
// 
//         if (l == 0) {
//             worldIn.setBlockState(pos, state.getBlock().getStateFromMeta(4));
//         }
// 
//         if (l == 1) {
//             worldIn.setBlockState(pos, state.getBlock().getStateFromMeta(5));
//         }
// 
//         if (l == 2) {
//             worldIn.setBlockState(pos, state.getBlock().getStateFromMeta(2));
//         }
// 
//         if (l == 3) {
//             worldIn.setBlockState(pos, state.getBlock().getStateFromMeta(3));
//         }
//     }
// 
//     @Override
//     public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float side, float hitX, float hitY) {
//         if (playerIn.isSneaking() || worldIn.isRemote)
//             return true;
//         else
//             playerIn.openGui(ChinaCraft.getInstance(), EnumGuiType.CRUSHER.ordinal(), worldIn, pos.getX(), pos.getY(), pos.getZ());
//         return true;
//     }
// }


import cn.mccraft.chinacraft.block.machine.BlockCrusher;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.energy.CapabilityEnergy;
import javax.annotation.Nonnull;
import java.util.Optional;
package cn.mccraft.chinacraft.block;



public class BlockCrank extends BlockCCBase {
    public BlockCrank() {
        super(Material.WOOD);
    }

    @Override
    public boolean canPlaceBlockAt(World worldIn, @Nonnull BlockPos pos) {
// Path: src/main/java/cn/mccraft/chinacraft/block/machine/BlockCrusher.java
// public class BlockCrusher extends BlockMachine {
//     private EnumCrusherMaterial crusherMaterial;
// 
//     public BlockCrusher(EnumCrusherMaterial crusherMaterial) {
//         this.crusherMaterial = crusherMaterial;
//     }
// 
//     @Nullable
//     @Override
//     public TileEntity createNewTileEntity(World worldIn, int meta) {
//         return new TileEntityCrusher(crusherMaterial);
//     }
// 
//     @Override
//     public boolean isFullCube(IBlockState state) {
//         return false;
//     }
// 
//     @Override
//     public boolean isOpaqueCube(IBlockState state) {
//         return false;
//     }
// 
//     @Override
//     public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
//         return new AxisAlignedBB(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
//     }
// 
//     @Override
//     public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer,
//                                 ItemStack stack) {
//         int l = MathHelper.floor(placer.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
// 
//         if (l == 0) {
//             worldIn.setBlockState(pos, state.getBlock().getStateFromMeta(4));
//         }
// 
//         if (l == 1) {
//             worldIn.setBlockState(pos, state.getBlock().getStateFromMeta(5));
//         }
// 
//         if (l == 2) {
//             worldIn.setBlockState(pos, state.getBlock().getStateFromMeta(2));
//         }
// 
//         if (l == 3) {
//             worldIn.setBlockState(pos, state.getBlock().getStateFromMeta(3));
//         }
//     }
// 
//     @Override
//     public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float side, float hitX, float hitY) {
//         if (playerIn.isSneaking() || worldIn.isRemote)
//             return true;
//         else
//             playerIn.openGui(ChinaCraft.getInstance(), EnumGuiType.CRUSHER.ordinal(), worldIn, pos.getX(), pos.getY(), pos.getZ());
//         return true;
//     }
// }


// Path: src/main/java/cn/mccraft/chinacraft/block/BlockCrank.java
import cn.mccraft.chinacraft.block.machine.BlockCrusher;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.energy.CapabilityEnergy;
import javax.annotation.Nonnull;
import java.util.Optional;

package cn.mccraft.chinacraft.block;



public class BlockCrank extends BlockCCBase {
    public BlockCrank() {
        super(Material.WOOD);
    }

    @Override
    public boolean canPlaceBlockAt(World worldIn, @Nonnull BlockPos pos) {
        return worldIn.getBlockState(pos.down()).getBlock() instanceof BlockCrusher;