@Override public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player) { if (state.getValue(HALF) == BlockDoubleHeightPlant.EnumBlockHalf.UPPER) { if (world.getBlockState(pos.down()).getBlock() == this) { if (player.capabilities.isCreativeMode) world.setBlockToAir(pos.down()); else { IBlockState iblockstate = world.getBlockState(pos.down()); EnumPlantType planttype = (EnumPlantType)iblockstate.getValue(VARIANT); world.destroyBlock(pos.down(), RANDOM.nextInt(5) == 0 ? true : false); if (world.isRemote) world.setBlockToAir(pos.down()); else if (!player.getHeldItemMainhand().isEmpty() && player.getHeldItemMainhand().getItem() == Items.SHEARS) { onHarvest(world, pos, iblockstate, player); world.setBlockToAir(pos.down()); } } } } else if (world.getBlockState(pos.up()).getBlock() == this) world.setBlockState(pos.up(), Blocks.AIR.getDefaultState(), 2); super.onBlockHarvested(world, pos, state, player); }