Formatting pass.

This commit is contained in:
WayofTime 2016-05-02 20:56:32 -04:00
parent 1e9f3dadd3
commit 25108a5838
13 changed files with 90 additions and 72 deletions

View file

@ -105,14 +105,17 @@ public class ClientEventHandler
return textureMap.registerSprite(new ResourceLocation(Constants.Mod.DOMAIN + dir + "/" + name));
}
private void renderRitualInformation(EntityPlayerSP player, float partialTicks) {
private void renderRitualInformation(EntityPlayerSP player, float partialTicks)
{
World world = player.worldObj;
TileMasterRitualStone mrs = (TileMasterRitualStone) world.getTileEntity(minecraft.objectMouseOver.getBlockPos());
Ritual ritual = mrs.getCurrentRitual();
if (ritual != null) {
if (ritual != null)
{
List<String> ranges = ritual.getListOfRanges();
for (String range : ranges) {
for (String range : ranges)
{
AreaDescriptor areaDescriptor = ritual.getBlockRange(range);
for (BlockPos pos : areaDescriptor.getContainedPositions(minecraft.objectMouseOver.getBlockPos()))
@ -121,7 +124,8 @@ public class ClientEventHandler
}
}
private void renderRitualStones(EntityPlayerSP player, float partialTicks) {
private void renderRitualStones(EntityPlayerSP player, float partialTicks)
{
World world = player.worldObj;
ItemRitualDiviner ritualDiviner = (ItemRitualDiviner) player.inventory.getCurrentItem().getItem();
EnumFacing direction = ritualDiviner.getDirection(player.inventory.getCurrentItem());
@ -152,27 +156,27 @@ public class ClientEventHandler
switch (ritualComponent.getRuneType())
{
case BLANK:
texture = ritualStoneBlank;
break;
case WATER:
texture = ritualStoneWater;
break;
case FIRE:
texture = ritualStoneFire;
break;
case EARTH:
texture = ritualStoneEarth;
break;
case AIR:
texture = ritualStoneAir;
break;
case DAWN:
texture = ritualStoneDawn;
break;
case DUSK:
texture = ritualStoneDusk;
break;
case BLANK:
texture = ritualStoneBlank;
break;
case WATER:
texture = ritualStoneWater;
break;
case FIRE:
texture = ritualStoneFire;
break;
case EARTH:
texture = ritualStoneEarth;
break;
case AIR:
texture = ritualStoneAir;
break;
case DAWN:
texture = ritualStoneDawn;
break;
case DUSK:
texture = ritualStoneDusk;
break;
}
RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ, world);

View file

@ -2,27 +2,30 @@ package WayofTime.bloodmagic.util.helper;
import java.util.TreeMap;
public class NumeralHelper {
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" );
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) {
public static String toRoman(int arabic)
{
int convert = romanNumerals.floorKey(arabic);
if (arabic == convert)
return romanNumerals.get(convert);