Esempio n. 1
0
 /**
  * Check whether this plant spreads weed to surrounding tiles. Default is true if the plant has a
  * high growth stat (or is weeds) and size greater or equal than 2.
  *
  * @param crop reference to ICropTile
  * @return Whether the plant spreads weed
  */
 public boolean isWeed(ICropTile crop) {
   return crop.getSize() >= 2 && (crop.getID() == 0 || crop.getGrowth() >= 24);
 }
Esempio n. 2
0
 /**
  * Obtain seeds dropped when the plant is picked. Multiple drops of the returned ItemStack can
  * occur. Default action is generating a seed from this crop.
  *
  * @param crop reference to ICropTile
  * @return Seeds
  */
 public ItemStack getSeeds(ICropTile crop) {
   return crop.generateSeeds(
       crop.getID(), crop.getGrowth(), crop.getGain(), crop.getResistance(), crop.getScanLevel());
 }