Package crazypants.enderio.machine.farm.farmers

Source Code of crazypants.enderio.machine.farm.farmers.NetherWartFarmer

package crazypants.enderio.machine.farm.farmers;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import crazypants.enderio.machine.farm.TileFarmStation;
import crazypants.util.BlockCoord;

public class NetherWartFarmer extends CustomSeedFarmer {

  public NetherWartFarmer() {
    super(Blocks.nether_wart, 3, new ItemStack(Items.nether_wart));
  }

  @Override
  public boolean prepareBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) {

    if(!farm.isOpen(bc)) {
      return false;
    }
    World worldObj = farm.getWorldObj();
    BlockCoord grn = bc.getLocation(ForgeDirection.DOWN);
    Block blk = worldObj.getBlock(grn.x, grn.y, grn.z);
   
    return plantFromInventory(farm, bc);
  }


}
TOP

Related Classes of crazypants.enderio.machine.farm.farmers.NetherWartFarmer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.