Package forestry.api.mail

Examples of forestry.api.mail.EnumPostage


    for (int i = EnumPostage.values().length - 1; i > 0; i--) {
      if (postage <= 0)
        break;

      EnumPostage postValue = EnumPostage.values()[i];

      if (postValue.getValue() > postage)
        continue;

      int num = 99;
      if (!virtual)
        num = getNumStamps(postValue);
      int max = (int) Math.floor(postage / postValue.getValue());
      if (max < num)
        num = max;

      stamps[i] = num;
      postage -= num * postValue.getValue();
    }

    return stamps;
  }
View Full Code Here


    for (ItemStack stamp : stamps) {
      if (stamp == null)
        continue;

      if (stamp.getItem() instanceof IStamps) {
        EnumPostage postage = ((IStamps) stamp.getItem()).getPostage(stamp);
        collectedPostage[postage.ordinal()] += stamp.stackSize;
      }
    }
  }
View Full Code Here

TOP

Related Classes of forestry.api.mail.EnumPostage

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.