Package powercrystals.minefactoryreloaded.api

Examples of powercrystals.minefactoryreloaded.api.IFactoryFertilizer


      ItemStack fertStack = getStackInSlot(stackIndex);
      if(fertStack == null || !MFRRegistry.getFertilizers().containsKey(new Integer(fertStack.itemID)))
      {
        continue;
      }
      IFactoryFertilizer fertilizer = MFRRegistry.getFertilizers().get(new Integer(fertStack.itemID));
      IFactoryFertilizable fertilizable = MFRRegistry.getFertilizables().get(new Integer(targetId));
     
      if(fertilizer.getFertilizerMeta() != fertStack.getItemDamage())
      {
        continue;
      }
     
      if(!fertilizable.canFertilizeBlock(worldObj, bp.x, bp.y, bp.z, fertilizer.getFertilizerType()))
      {
        continue;
      }
      if(fertilizable.fertilize(worldObj, _rand, bp.x, bp.y, bp.z, fertilizer.getFertilizerType()))
      {
        fertilizer.consume(fertStack);
        if(fertStack.stackSize <= 0)
        {
          setInventorySlotContents(stackIndex, null);
        }
        return true;
View Full Code Here

TOP

Related Classes of powercrystals.minefactoryreloaded.api.IFactoryFertilizer

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.