Package powercrystals.minefactoryreloaded.api

Examples of powercrystals.minefactoryreloaded.api.IFactoryHarvestable


    }
   
    int harvestedBlockId = worldObj.getBlockId(targetCoords.x, targetCoords.y, targetCoords.z);
    int harvestedBlockMetadata = worldObj.getBlockMetadata(targetCoords.x, targetCoords.y, targetCoords.z);
   
    IFactoryHarvestable harvestable = MFRRegistry.getHarvestables().get(new Integer(harvestedBlockId));
   
    List<ItemStack> drops = harvestable.getDrops(worldObj, _rand, ImmutableMap.copyOf(_settings), targetCoords.x, targetCoords.y, targetCoords.z);
   
    harvestable.preHarvest(worldObj, targetCoords.x, targetCoords.y, targetCoords.z);
   
    doDrop(drops);
   
    if(harvestable.breakBlock())
    {
      if(MFRConfig.playSounds.getBoolean(true))
      {
        worldObj.playAuxSFXAtEntity(null, 2001, targetCoords.x, targetCoords.y, targetCoords.z, harvestedBlockId + (harvestedBlockMetadata << 12));
      }
      worldObj.setBlockToAir(targetCoords.x, targetCoords.y, targetCoords.z);
    }
   
    harvestable.postHarvest(worldObj, targetCoords.x, targetCoords.y, targetCoords.z);
   
    _tank.fill(LiquidDictionary.getLiquid("sludge", 10), true);
   
    return true;
  }
View Full Code Here


    {
      _lastTree = null;
      return null;
    }
   
    IFactoryHarvestable harvestable = MFRRegistry.getHarvestables().get(new Integer(searchId));
    if(harvestable.canBeHarvested(worldObj, _settings, bp.x, bp.y, bp.z))
    {
      if(harvestable.getHarvestType() == HarvestType.Normal)
      {
        _lastTree = null;
        return bp;
      }
      else if(harvestable.getHarvestType() == HarvestType.Column)
      {
        _lastTree = null;
        return getNextVertical(bp.x, bp.y, bp.z, 0);
      }
      else if(harvestable.getHarvestType() == HarvestType.LeaveBottom)
      {
        _lastTree = null;
        return getNextVertical(bp.x, bp.y, bp.z, 1);
      }
      else if(harvestable.getHarvestType() == HarvestType.Tree)
      {
        BlockPosition temp = getNextTreeSegment(bp.x, bp.y, bp.z, false);
        if(temp != null)
        {
          _areaManager.rewindBlock();
        }
        return temp;
      }
      else if(harvestable.getHarvestType() == HarvestType.TreeFlipped)
      {
        BlockPosition temp = getNextTreeSegment(bp.x, bp.y, bp.z, true);
        if(temp != null)
        {
          _areaManager.rewindBlock();
View Full Code Here

TOP

Related Classes of powercrystals.minefactoryreloaded.api.IFactoryHarvestable

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.