Class GeneralUtilities

java.lang.Object
tech.anonymoushacker1279.immersiveweapons.util.GeneralUtilities

public class GeneralUtilities extends Object
A collection of random utility methods for general use.
  • Constructor Details

    • GeneralUtilities

      public GeneralUtilities()
  • Method Details

    • getRandomNumber

      public static float getRandomNumber(float min, float max)
      Get a random number between a minimum and maximum.
      Parameters:
      min - minimum number (inclusive)
      max - maximum number (not inclusive)
      Returns:
      float
    • getRandomNumber

      public static double getRandomNumber(double min, double max)
      Get a random number between a minimum and maximum.
      Parameters:
      min - minimum number (inclusive)
      max - maximum number (not inclusive)
      Returns:
      double
    • getRandomNumber

      public static int getRandomNumber(int min, int max)
      Get a random number between a minimum and maximum.
      Parameters:
      min - minimum number (inclusive)
      max - maximum number (not inclusive)
      Returns:
      int
    • convertToRoman

      public static String convertToRoman(int number)
      Convert an integer to a Roman numeral.
      Parameters:
      number - the integer to convert
      Returns:
      the Roman numeral
    • notJonny

      public static boolean notJonny(UUID uuid)
      Check if the specified UUID is not Jonny's. Used as a dev bonus for the Jonny's Curse item, where all effects are inverted for Jonny himself.
      Parameters:
      uuid - the UUID to check
      Returns:
      true if the UUID is not Jonny's, false otherwise