Attempt to fix 1.16.3 branch's issues on the repository

Added the original 'wayoftime' folder back, so see if that fixed the multiple folder issue.
This commit is contained in:
WayofTime 2020-10-29 15:50:03 -04:00
parent 6b4145a67c
commit 9fa68e86ae
224 changed files with 24047 additions and 0 deletions

View file

@ -0,0 +1,35 @@
package wayoftime.bloodmagic.util.helper;
import java.util.TreeMap;
public class NumeralHelper
{
private static final TreeMap<Integer, String> romanNumerals = new TreeMap<Integer, String>();
static
{
romanNumerals.put(1000, "M");
romanNumerals.put(900, "CM");
romanNumerals.put(500, "D");
romanNumerals.put(400, "CD");
romanNumerals.put(100, "C");
romanNumerals.put(90, "XC");
romanNumerals.put(50, "L");
romanNumerals.put(40, "XL");
romanNumerals.put(10, "X");
romanNumerals.put(9, "IX");
romanNumerals.put(5, "V");
romanNumerals.put(4, "IV");
romanNumerals.put(1, "I");
}
public static String toRoman(int arabic)
{
int convert = romanNumerals.floorKey(arabic);
if (arabic == convert)
return romanNumerals.get(convert);
return romanNumerals.get(convert) + toRoman(arabic - convert);
}
}