Examples of IFactoryFruit


Examples of powercrystals.minefactoryreloaded.api.IFactoryFruit

    }

    harvestedBlockId = worldObj.getBlockId(targetCoords.x, targetCoords.y, targetCoords.z);
    harvestedBlockMetadata = worldObj.getBlockMetadata(targetCoords.x, targetCoords.y, targetCoords.z);
   
    IFactoryFruit harvestable = MFRRegistry.getFruits().get(new Integer(harvestedBlockId));
   
    List<ItemStack> drops = harvestable.getDrops(worldObj, _rand, targetCoords.x, targetCoords.y, targetCoords.z);
   
    ItemStack replacement = harvestable.getReplacementBlock(worldObj, targetCoords.x, targetCoords.y, targetCoords.z);
   
    harvestable.prePick(worldObj, targetCoords.x, targetCoords.y, targetCoords.z);
   
    doDrop(drops);
   
    if(replacement == null)
    {
      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);
    }
    else
    {
      worldObj.setBlock(targetCoords.x, targetCoords.y, targetCoords.z, replacement.itemID, replacement.getItemDamage(), 3);
    }
   
    harvestable.postPick(worldObj, targetCoords.x, targetCoords.y, targetCoords.z);
   
    return true;
  }
View Full Code Here
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.