Formatting pass.
This commit is contained in:
parent
1e9f3dadd3
commit
25108a5838
|
@ -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
|
||||
|
|
|
@ -18,7 +18,7 @@ public class ItemHelper
|
|||
{
|
||||
/**
|
||||
* Attempts to fill an altar with the contained LP
|
||||
*
|
||||
*
|
||||
* @param altar
|
||||
* - The altar in question
|
||||
* @param itemStack
|
||||
|
@ -27,7 +27,7 @@ public class ItemHelper
|
|||
* - The world
|
||||
* @param altarPos
|
||||
* - The position of the altar
|
||||
*
|
||||
*
|
||||
* @return Whether or not the altar was filled (or at least attempted)
|
||||
*/
|
||||
public static boolean tryAndFillAltar(IBloodAltar altar, ItemStack itemStack, World world, BlockPos altarPos)
|
||||
|
@ -55,14 +55,14 @@ public class ItemHelper
|
|||
|
||||
/**
|
||||
* Adds the given LP into the {@link IItemLPContainer}'s storage
|
||||
*
|
||||
*
|
||||
* @param stack
|
||||
* - The item in question
|
||||
* @param toAdd
|
||||
* - How much LP should be added to the item
|
||||
* @param maxCapacity
|
||||
* - The item's maximum holding capacity
|
||||
*
|
||||
*
|
||||
* @return Whether or not LP was added to the item
|
||||
*/
|
||||
public static boolean addLPToItem(ItemStack stack, int toAdd, int maxCapacity)
|
||||
|
|
|
@ -71,10 +71,10 @@ public class PlayerHelper
|
|||
|
||||
/**
|
||||
* Checks whether or not the given player is an "actual" player
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* - The player in question
|
||||
*
|
||||
*
|
||||
* @return If the player is fake or not
|
||||
*/
|
||||
public static boolean isFakePlayer(EntityPlayer player)
|
||||
|
|
|
@ -44,11 +44,12 @@ 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
|
||||
*
|
||||
*
|
||||
* @return Whether or not the health sacrificing succeeded
|
||||
*/
|
||||
public static boolean sacrificePlayerHealth(EntityPlayer player)
|
||||
|
@ -90,16 +91,17 @@ public class PlayerSacrificeHelper
|
|||
|
||||
/**
|
||||
* Finds the nearest {@link IBloodAltar} and attempts to fill it
|
||||
*
|
||||
*
|
||||
* @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
|
||||
* - Whether this is a Sacrifice or a Self-Sacrifice
|
||||
*
|
||||
*
|
||||
* @return Whether the altar is found and (attempted) filled
|
||||
*/
|
||||
public static boolean findAndFillAltar(World world, EntityLivingBase sacrificingEntity, int amount, boolean isSacrifice)
|
||||
|
@ -117,13 +119,15 @@ public class PlayerSacrificeHelper
|
|||
|
||||
/**
|
||||
* Gets the nearest {@link IBloodAltar}
|
||||
*
|
||||
*
|
||||
* @param world
|
||||
* - The world
|
||||
* @param blockPos
|
||||
* - 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
|
||||
* - 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
|
||||
*/
|
||||
public static IBloodAltar getAltar(World world, BlockPos blockPos)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -77,7 +77,7 @@ public class ItemSigilTransposition extends ItemSigilBase
|
|||
|
||||
NBTTagCompound tileNBTTag = new NBTTagCompound();
|
||||
String blockName = rightClickedBlock.getBlock().getRegistryName().toString();
|
||||
byte metadata = (byte) rightClickedBlock.getMeta();
|
||||
byte metadata = (byte) rightClickedBlock.getMeta();
|
||||
|
||||
if (world.getTileEntity(blockPos) != null)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue