Package crazypants.enderio.machine.farm.farmers

Examples of crazypants.enderio.machine.farm.farmers.TreeHarvestUtil


  @SubscribeEvent
  public void onBreakEvent(BlockEvent.BreakEvent evt) {   
    if(evt.getPlayer().isSneaking() && isEquipped(evt.getPlayer()) && isLog(evt.block, evt.blockMetadata)) {
      int powerStored = getStoredPower(evt.getPlayer());
   
      TreeHarvestUtil harvester = new TreeHarvestUtil();
      HarvestResult res = new HarvestResult();
      BlockCoord bc = new BlockCoord(evt.x, evt.y, evt.z);
      harvester.harvest(evt.getPlayer().worldObj, bc, res);
     
      List<BlockCoord> sortedTargets = new ArrayList<BlockCoord>(res.getHarvestedBlocks());
      harvestComparator.refPoint = bc;
      Collections.sort(sortedTargets, harvestComparator);
           
View Full Code Here

TOP

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

Copyright © 2018 www.massapicom. 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.