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

@ -86,7 +86,7 @@ public class BindableHelper
* Deprecated.
*
* Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}}
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}
*
* @param stack
* - The ItemStack to bind
@ -105,7 +105,7 @@ public class BindableHelper
* Deprecated.
*
* Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}}
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}
*
* @param stack
* - The ItemStack to bind
@ -145,7 +145,7 @@ public class BindableHelper
* Deprecated.
*
* Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}}
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}
*
* @param stack
* - ItemStack to check

View file

@ -44,7 +44,8 @@ public class PlayerSacrificeHelper
}
/**
* Sacrifices a player's health while the player is under the influence of incense
* Sacrifices a player's health while the player is under the influence of
* incense
*
* @param player
* - The player sacrificing
@ -94,7 +95,8 @@ public class PlayerSacrificeHelper
* @param world
* - The world
* @param sacrificingEntity
* - The entity having the sacrifice done on (can be {@link EntityPlayer} for self-sacrifice)
* - The entity having the sacrifice done on (can be
* {@link EntityPlayer} for self-sacrifice)
* @param amount
* - The amount of which the altar should be filled
* @param isSacrifice
@ -121,9 +123,11 @@ public class PlayerSacrificeHelper
* @param world
* - The world
* @param blockPos
* - The position of where the check should be in (in a 2 block radius from this)
* - The position of where the check should be in (in a 2 block
* radius from this)
*
* @return The nearest altar, if no altar is found, then this will return null
* @return The nearest altar, if no altar is found, then this will return
* null
*/
public static IBloodAltar getAltar(World world, BlockPos blockPos)
{

View file

@ -38,7 +38,8 @@ public class BlockBloodRune extends BlockString implements IVariantProvider
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
{
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe"));
super.addInformation(stack, player, tooltip, advanced);
}

View file

@ -46,7 +46,8 @@ public class BlockPath extends BlockString implements IIncensePath, IVariantProv
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
{
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe"));
super.addInformation(stack, player, tooltip, advanced);
}

View file

@ -40,7 +40,8 @@ public class BlockRitualStone extends BlockString implements IRitualStone, IVari
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
{
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe"));
super.addInformation(stack, player, tooltip, advanced);
}

View file

@ -72,7 +72,7 @@ public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider
if (!getActivated(stack))
return 1.0F;
return state.getMaterial() != Material.IRON && state.getMaterial() != Material.ANVIL&& state.getMaterial() != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
return state.getMaterial() != Material.IRON && state.getMaterial() != Material.ANVIL && state.getMaterial() != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
}
@Override

View file

@ -184,10 +184,13 @@ public class ItemSacrificialDagger extends Item implements IMeshProvider
@Override
@SideOnly(Side.CLIENT)
public ItemMeshDefinition getMeshDefinition() {
return new ItemMeshDefinition() {
public ItemMeshDefinition getMeshDefinition()
{
return new ItemMeshDefinition()
{
@Override
public ModelResourceLocation getModelLocation(ItemStack stack) {
public ModelResourceLocation getModelLocation(ItemStack stack)
{
String variant = "type=normal";
if (stack.getItemDamage() != 0)
variant = "type=creative";
@ -201,7 +204,8 @@ public class ItemSacrificialDagger extends Item implements IMeshProvider
}
@Override
public List<String> getVariants() {
public List<String> getVariants()
{
List<String> variants = new ArrayList<String>();
variants.add("type=normal");
variants.add("type=creative");
@ -211,7 +215,8 @@ public class ItemSacrificialDagger extends Item implements IMeshProvider
@Nullable
@Override
public ResourceLocation getCustomLocation() {
public ResourceLocation getCustomLocation()
{
return null;
}
}

View file

@ -64,8 +64,7 @@ public class ItemPackSelfSacrifice extends ItemArmor implements IAltarManipulato
if (position == null)
{
return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND);
}
else
} else
{
if (position.typeOfHit == RayTraceResult.Type.BLOCK)
{

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());

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);