Class PressureHelper

java.lang.Object
me.desht.pneumaticcraft.api.pressure.PressureHelper

public class PressureHelper extends Object
  • Constructor Details

    • PressureHelper

      public PressureHelper()
  • Method Details

    • getUpgradedVolume

      public static int getUpgradedVolume(int baseVolume, int upgradeCount)
      Implement the PneumaticCraft standard for Volume Upgrade calculations. The formula is 2 * sqrt(upgradeCount).
      Parameters:
      baseVolume - the base volume, before modification
      upgradeCount - the number of Volume Upgrades
      Returns:
      the upgraded volume
      Throws:
      IllegalArgumentException - if the upgrade count is not in the range 0..64 inclusive