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. * Deprecated.
* *
* Now handled automatically with * Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}} * {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}
* *
* @param stack * @param stack
* - The ItemStack to bind * - The ItemStack to bind
@ -105,7 +105,7 @@ public class BindableHelper
* Deprecated. * Deprecated.
* *
* Now handled automatically with * Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}} * {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}
* *
* @param stack * @param stack
* - The ItemStack to bind * - The ItemStack to bind
@ -145,7 +145,7 @@ public class BindableHelper
* Deprecated. * Deprecated.
* *
* Now handled automatically with * Now handled automatically with
* {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}} * {@link WayofTime.bloodmagic.util.handler.EventHandler#onInteract(PlayerInteractEvent.RightClickItem)}
* *
* @param stack * @param stack
* - ItemStack to check * - 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 * @param player
* - The player sacrificing * - The player sacrificing
@ -94,7 +95,8 @@ public class PlayerSacrificeHelper
* @param world * @param world
* - The world * - The world
* @param sacrificingEntity * @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 * @param amount
* - The amount of which the altar should be filled * - The amount of which the altar should be filled
* @param isSacrifice * @param isSacrifice
@ -121,9 +123,11 @@ public class PlayerSacrificeHelper
* @param world * @param world
* - The world * - The world
* @param blockPos * @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) public static IBloodAltar getAltar(World world, BlockPos blockPos)
{ {

View file

@ -38,7 +38,8 @@ public class BlockBloodRune extends BlockString implements IVariantProvider
} }
@Override @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")); tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe"));
super.addInformation(stack, player, tooltip, advanced); super.addInformation(stack, player, tooltip, advanced);
} }

View file

@ -46,7 +46,8 @@ public class BlockPath extends BlockString implements IIncensePath, IVariantProv
} }
@Override @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")); tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe"));
super.addInformation(stack, player, tooltip, advanced); super.addInformation(stack, player, tooltip, advanced);
} }

View file

@ -40,7 +40,8 @@ public class BlockRitualStone extends BlockString implements IRitualStone, IVari
} }
@Override @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")); tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.decoration.safe"));
super.addInformation(stack, player, tooltip, advanced); super.addInformation(stack, player, tooltip, advanced);
} }

View file

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

View file

@ -64,8 +64,7 @@ public class ItemPackSelfSacrifice extends ItemArmor implements IAltarManipulato
if (position == null) if (position == null)
{ {
return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND); return super.onItemRightClick(stack, world, player, EnumHand.MAIN_HAND);
} } else
else
{ {
if (position.typeOfHit == RayTraceResult.Type.BLOCK) 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)); 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; World world = player.worldObj;
TileMasterRitualStone mrs = (TileMasterRitualStone) world.getTileEntity(minecraft.objectMouseOver.getBlockPos()); TileMasterRitualStone mrs = (TileMasterRitualStone) world.getTileEntity(minecraft.objectMouseOver.getBlockPos());
Ritual ritual = mrs.getCurrentRitual(); Ritual ritual = mrs.getCurrentRitual();
if (ritual != null) { if (ritual != null)
{
List<String> ranges = ritual.getListOfRanges(); List<String> ranges = ritual.getListOfRanges();
for (String range : ranges) { for (String range : ranges)
{
AreaDescriptor areaDescriptor = ritual.getBlockRange(range); AreaDescriptor areaDescriptor = ritual.getBlockRange(range);
for (BlockPos pos : areaDescriptor.getContainedPositions(minecraft.objectMouseOver.getBlockPos())) 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; World world = player.worldObj;
ItemRitualDiviner ritualDiviner = (ItemRitualDiviner) player.inventory.getCurrentItem().getItem(); ItemRitualDiviner ritualDiviner = (ItemRitualDiviner) player.inventory.getCurrentItem().getItem();
EnumFacing direction = ritualDiviner.getDirection(player.inventory.getCurrentItem()); EnumFacing direction = ritualDiviner.getDirection(player.inventory.getCurrentItem());

View file

@ -2,11 +2,13 @@ package WayofTime.bloodmagic.util.helper;
import java.util.TreeMap; import java.util.TreeMap;
public class NumeralHelper { public class NumeralHelper
{
private static final TreeMap<Integer, String> romanNumerals = new TreeMap<Integer, String>(); private static final TreeMap<Integer, String> romanNumerals = new TreeMap<Integer, String>();
static { static
{
romanNumerals.put(1000, "M"); romanNumerals.put(1000, "M");
romanNumerals.put(900, "CM"); romanNumerals.put(900, "CM");
romanNumerals.put(500, "D"); romanNumerals.put(500, "D");
@ -22,7 +24,8 @@ public class NumeralHelper {
romanNumerals.put(1, "I"); romanNumerals.put(1, "I");
} }
public static String toRoman(int arabic) { public static String toRoman(int arabic)
{
int convert = romanNumerals.floorKey(arabic); int convert = romanNumerals.floorKey(arabic);
if (arabic == convert) if (arabic == convert)
return romanNumerals.get(convert); return romanNumerals.get(convert);