Class GeneralUtilities
java.lang.Object
tech.anonymoushacker1279.immersiveweapons.util.GeneralUtilities
A collection of random utility methods for general use.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertToRoman(int number) Convert an integer to a Roman numeral.static doublegetRandomNumber(double min, double max) Get a random number between a minimum and maximum.static floatgetRandomNumber(float min, float max) Get a random number between a minimum and maximum.static intgetRandomNumber(int min, int max) Get a random number between a minimum and maximum.static booleanCheck if the specified UUID is not Jonny's.
-
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
Convert an integer to a Roman numeral.- Parameters:
number- the integer to convert- Returns:
- the Roman numeral
-
notJonny
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
-