Formatted the code - Release state for Blood Magic 1.8.9-2.0.0-1

This commit is contained in:
WayofTime 2016-01-02 17:56:37 -05:00
parent d1ff8c6d4f
commit 71421b7d88
38 changed files with 223 additions and 208 deletions

View file

@ -39,8 +39,8 @@ public class BloodMagicAPI
* items in case internal names change.
*
* @param name
* - The registered name of the item. Usually the same as the
* class name.
* - The registered name of the item. Usually the same as the class
* name.
* @return - The requested Item
*/
public static Item getItem(String name)
@ -49,11 +49,11 @@ public class BloodMagicAPI
}
/**
* Used to add a {@link BlockStack} to the Teleposer blacklist that
* cannot be changed via Configuration files.
*
* Used to add a {@link BlockStack} to the Teleposer blacklist that cannot
* be changed via Configuration files.
*
* @param blockStack
* - The BlockStack to blacklist.
* - The BlockStack to blacklist.
*/
public static void addToTeleposerBlacklist(BlockStack blockStack)
{
@ -63,11 +63,11 @@ public class BloodMagicAPI
/**
* @see #addToTeleposerBlacklist(BlockStack)
*
*
* @param block
* - The block to blacklist
* - The block to blacklist
* @param meta
* - The meta of the block to blacklist
* - The meta of the block to blacklist
*/
public static void addToTeleposerBlacklist(Block block, int meta)
{
@ -76,9 +76,9 @@ public class BloodMagicAPI
/**
* @see #addToTeleposerBlacklist(BlockStack)
*
*
* @param block
* - The block to blacklist
* - The block to blacklist
*/
public static void addToTeleposerBlacklist(Block block)
{

View file

@ -18,9 +18,9 @@ public class AltarComponent
* Sets a component location for the altar.
*
* @param offset
* - Where the block should be in relation to the Altar
* - Where the block should be in relation to the Altar
* @param component
* - The type of Component the location should contain
* - The type of Component the location should contain
*/
public AltarComponent(BlockPos offset, EnumAltarComponent component)
{
@ -31,9 +31,9 @@ public class AltarComponent
/**
* Use for setting a location at which there must be a block, but the type
* of block does not matter.
*
*
* @param offset
* - Where the block should be in relation to the Altar
* - Where the block should be in relation to the Altar
*/
public AltarComponent(BlockPos offset)
{

View file

@ -2,5 +2,10 @@ package WayofTime.bloodmagic.api.altar;
public enum EnumAltarComponent
{
GLOWSTONE, BLOODSTONE, BEACON, BLOODRUNE, CRYSTAL, NOTAIR
GLOWSTONE,
BLOODSTONE,
BEACON,
BLOODRUNE,
CRYSTAL,
NOTAIR
}

View file

@ -10,7 +10,7 @@ public abstract class CompressionHandler
* resultant stack if successful, and null if not.
*
* @param inv
* The inventory iterated through
* The inventory iterated through
* @return The result of the compression
*/
public abstract ItemStack compressInventory(ItemStack[] inv, World world);

View file

@ -26,9 +26,9 @@ public class CompressionRegistry
* Registers an item so that it only compresses while above this threshold
*
* @param stack
* item/block to be compressed
* item/block to be compressed
* @param threshold
* amount that is to be compressed
* amount that is to be compressed
*/
public static void registerItemThreshold(ItemStack stack, int threshold)
{

View file

@ -14,11 +14,11 @@ public class AddToNetworkEvent extends Event
* LP will still be drained but the soul network will not be added to.
*
* @param ownerNetwork
* Key used for the soul network
* Key used for the soul network
* @param addedAmount
* Amount added
* Amount added
* @param maximum
* Ceiling that the network can add to
* Ceiling that the network can add to
*/
public AddToNetworkEvent(String ownerNetwork, int addedAmount, int maximum)
{

View file

@ -61,13 +61,13 @@ public class SoulNetworkEvent extends Event
* event prevents action without penalties
*
* @param player
* Player using the item
* Player using the item
* @param ownerNetwork
* Network that the item is tied to
* Network that the item is tied to
* @param itemStack
* Item used
* Item used
* @param drainAmount
* Original drain amount - change to alter cost
* Original drain amount - change to alter cost
*/
public ItemDrainNetworkEvent(EntityPlayer player, String ownerNetwork, ItemStack itemStack, int drainAmount)
{

View file

@ -7,8 +7,11 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
/** Fired when a teleposer attempts to transpose two blocks. Use this to perform special cleanup or compensation,
or cancel it entirely to prevent the transposition. */
/**
* Fired when a teleposer attempts to transpose two blocks. Use this to perform
* special cleanup or compensation, or cancel it entirely to prevent the
* transposition.
*/
@Cancelable
public class TeleposeEvent extends Event
{

View file

@ -10,12 +10,12 @@ public interface IBindable
{
/**
* Called when the player attempts to bind the item.
*
*
* @param player
* - The Player attempting to bind the item
* - The Player attempting to bind the item
* @param stack
* - The ItemStack to attempt binding
*
* - The ItemStack to attempt binding
*
* @return If binding was successful.
*/
boolean onBind(EntityPlayer player, ItemStack stack);

View file

@ -23,7 +23,7 @@ public abstract class LivingArmourUpgrade
* these.
*
* @param level
* The level of the upgrade
* The level of the upgrade
*/
public LivingArmourUpgrade(int level)
{

View file

@ -26,11 +26,11 @@ public abstract class StatTracker
* LivingArmour
*
* @param world
* World the player is in
* World the player is in
* @param player
* The player that has the armour equipped
* The player that has the armour equipped
* @param livingArmour
* The equipped LivingArmour
* The equipped LivingArmour
* @return True if there is a new upgrade unlocked this tick.
*/
public abstract boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour);

View file

@ -89,10 +89,10 @@ public class SoulNetwork extends WorldSavedData
/**
* Used to syphon LP from the network
*
*
* @param syphon
* - The amount of LP to syphon
*
* - The amount of LP to syphon
*
* @return The amount of LP syphoned
*/
public int syphon(int syphon)
@ -112,11 +112,11 @@ public class SoulNetwork extends WorldSavedData
* instead take away from the user's health.
*
* Always returns false on the client side.
*
*
* @param user
* - The Player to syphon from
* - The Player to syphon from
* @param toSyphon
* - The amount of LP to syphon
* - The amount of LP to syphon
*
* @return - Whether the action should be performed.
*/

View file

@ -23,11 +23,11 @@ public class BloodOrb
* EnergyItems.
*
* @param name
* - A name for the Orb. Gets put into an unlocalized name.
* - A name for the Orb. Gets put into an unlocalized name.
* @param tier
* - The tier of the Orb.
* - The tier of the Orb.
* @param capacity
* - The max amount of LP the Orb can store.
* - The max amount of LP the Orb can store.
*/
public BloodOrb(String name, int tier, int capacity)
{

View file

@ -24,7 +24,8 @@ public class AltarRecipeRegistry
BloodMagicAPI.getLogger().error("Error adding altar recipe for %s. Recipe already exists.", recipe.input.getDisplayName(), recipe.output == null ? "" : " -> ");
}
public static void registerFillRecipe(ItemStack orbStack, EnumAltarTier tier, int maxForOrb, int consumeRate, int drainRate) {
public static void registerFillRecipe(ItemStack orbStack, EnumAltarTier tier, int maxForOrb, int consumeRate, int drainRate)
{
registerRecipe(new AltarRecipe(orbStack, orbStack, tier, maxForOrb, consumeRate, drainRate, true));
}
@ -52,19 +53,19 @@ public class AltarRecipeRegistry
* Orbs)
*
* @param input
* - The input ItemStack
* - The input ItemStack
* @param output
* - The ItemStack obtained from the recipe
* - The ItemStack obtained from the recipe
* @param minTier
* - The minimum tier of Altar required
* - The minimum tier of Altar required
* @param syphon
* - The amount of LP to syphon from the Altar
* - The amount of LP to syphon from the Altar
* @param consumeRate
* - The rate at which LP is consumed during crafting
* - The rate at which LP is consumed during crafting
* @param drainRate
* - The rate at which LP is drained during crafting
* - The rate at which LP is drained during crafting
* @param fillable
* - Whether the input item can be filled with LP. IE: Orbs
* - Whether the input item can be filled with LP. IE: Orbs
*/
public AltarRecipe(ItemStack input, @Nullable ItemStack output, EnumAltarTier minTier, int syphon, int consumeRate, int drainRate, boolean fillable)
{

View file

@ -19,9 +19,9 @@ public class ImperfectRitualRegistry
* The safe way to register a new Ritual.
*
* @param imperfectRitual
* - The imperfect ritual to register.
* - The imperfect ritual to register.
* @param id
* - The ID for the imperfect ritual. Cannot be duplicated.
* - The ID for the imperfect ritual. Cannot be duplicated.
*/
public static void registerRitual(ImperfectRitual imperfectRitual, String id)
{

View file

@ -24,9 +24,9 @@ public class RitualRegistry
* The safe way to register a new Ritual.
*
* @param ritual
* - The ritual to register.
* - The ritual to register.
* @param id
* - The ID for the ritual. Cannot be duplicated.
* - The ID for the ritual. Cannot be duplicated.
*/
public static void registerRitual(Ritual ritual, String id)
{

View file

@ -39,9 +39,9 @@ public abstract class AreaDescriptor
* (1,1,1), calling getContainedPositions() will only give (0,0,0).
*
* @param minimumOffset
* -
* -
* @param maximumOffset
* -
* -
*/
public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset)
{
@ -95,9 +95,9 @@ public abstract class AreaDescriptor
* minimumOffset the lowest corner
*
* @param offset1
* -
* -
* @param offset2
* -
* -
*/
public void setOffsets(BlockPos offset1, BlockPos offset2)
{

View file

@ -8,7 +8,13 @@ import java.util.Locale;
public enum EnumRuneType implements IStringSerializable
{
BLANK, WATER, FIRE, EARTH, AIR, DUSK, DAWN;
BLANK,
WATER,
FIRE,
EARTH,
AIR,
DUSK,
DAWN;
public static EnumRuneType byMetadata(int meta)
{

View file

@ -34,11 +34,11 @@ public abstract class Ritual
/**
* @param name
* - The name of the ritual
* - The name of the ritual
* @param crystalLevel
* - Required Activation Crystal tier
* - Required Activation Crystal tier
* @param activationCost
* - Base LP cost for activating the ritual
* - Base LP cost for activating the ritual
*/
public Ritual(String name, int crystalLevel, int activationCost, String unlocalizedName)
{
@ -51,9 +51,9 @@ public abstract class Ritual
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#activateRitual(ItemStack, EntityPlayer, Ritual)}
*
* @param masterRitualStone
* - The {@link IMasterRitualStone} that the ritual is bound to
* - The {@link IMasterRitualStone} that the ritual is bound to
* @param player
* - The activating player
* - The activating player
* @return - Whether activation was successful
*/
public boolean activateRitual(IMasterRitualStone masterRitualStone, EntityPlayer player)
@ -67,7 +67,7 @@ public abstract class Ritual
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#performRitual(World, BlockPos)}
*
* @param masterRitualStone
* - The {@link IMasterRitualStone} that the ritual is bound to
* - The {@link IMasterRitualStone} that the ritual is bound to
*/
public abstract void performRitual(IMasterRitualStone masterRitualStone);
@ -77,9 +77,9 @@ public abstract class Ritual
* {@link WayofTime.bloodmagic.tile.TileMasterRitualStone#stopRitual(BreakType)}
*
* @param masterRitualStone
* - The {@link IMasterRitualStone} that the ritual is bound to
* - The {@link IMasterRitualStone} that the ritual is bound to
* @param breakType
* - The type of break that caused the stoppage.
* - The type of break that caused the stoppage.
*/
public void stopRitual(IMasterRitualStone masterRitualStone, BreakType breakType)
{
@ -114,7 +114,7 @@ public abstract class Ritual
* Used to grab the range of a ritual for a given effect.
*
* @param range
* - Range that needs to be pulled.
* - Range that needs to be pulled.
* @return -
*/
public AreaDescriptor getBlockRange(String range)
@ -162,7 +162,12 @@ public abstract class Ritual
public enum BreakType
{
REDSTONE, BREAK_MRS, BREAK_STONE, ACTIVATE, DEACTIVATE, EXPLOSION,
REDSTONE,
BREAK_MRS,
BREAK_STONE,
ACTIVATE,
DEACTIVATE,
EXPLOSION,
}
public abstract Ritual getNewCopy();

View file

@ -27,11 +27,11 @@ public abstract class ImperfectRitual
/**
* @param name
* - The name of the ritual
* - The name of the ritual
* @param requiredBlock
* - The block required above the ImperfectRitualStone
* - The block required above the ImperfectRitualStone
* @param activationCost
* - Base LP cost for activating the ritual
* - Base LP cost for activating the ritual
*/
public ImperfectRitual(String name, BlockStack requiredBlock, int activationCost, String unlocalizedName)
{
@ -43,10 +43,9 @@ public abstract class ImperfectRitual
* {@link WayofTime.bloodmagic.tile.TileImperfectRitualStone#performRitual(World, BlockPos, ImperfectRitual, EntityPlayer)}
*
* @param imperfectRitualStone
* - The {@link IImperfectRitualStone} that the ritual is bound
* to
* - The {@link IImperfectRitualStone} that the ritual is bound to
* @param player
* - The player activating the ritual
* - The player activating the ritual
* @return - Whether activation was successful
*/
public abstract boolean onActivate(IImperfectRitualStone imperfectRitualStone, EntityPlayer player);

View file

@ -18,9 +18,9 @@ public class BindableHelper
* type of Fake Player.
*
* @param stack
* - The ItemStack to bind
* - The ItemStack to bind
* @param player
* - The Player to bind the ItemStack to
* - The Player to bind the ItemStack to
*
* @return - Whether binding was successful
*/
@ -38,9 +38,9 @@ public class BindableHelper
* Fires {@link ItemBindEvent}.
*
* @param stack
* - The ItemStack to bind
* - The ItemStack to bind
* @param uuid
* - The username to bind the ItemStack to
* - The username to bind the ItemStack to
*
* @return - Whether the binding was successful
*/
@ -64,11 +64,11 @@ public class BindableHelper
/**
* @see BindableHelper#checkAndSetItemOwner(ItemStack, String)
*
*
* @param stack
* - ItemStack to check
* - ItemStack to check
* @param uuid
* - UUID of the Player
* - UUID of the Player
*/
public static boolean checkAndSetItemOwner(ItemStack stack, UUID uuid)
{
@ -80,9 +80,9 @@ public class BindableHelper
* bypasses {@link ItemBindEvent}.
*
* @param stack
* - The ItemStack to bind
* - The ItemStack to bind
* @param ownerName
* - The username to bind the ItemStack to
* - The username to bind the ItemStack to
*/
public static void setItemOwner(ItemStack stack, String ownerName)
{
@ -95,7 +95,7 @@ public class BindableHelper
* Used to safely obtain the username of the ItemStack's owner
*
* @param stack
* - The ItemStack to check the owner of
* - The ItemStack to check the owner of
*
* @return - The username of the ItemStack's owner
*/
@ -110,7 +110,7 @@ public class BindableHelper
* Used to safely obtain the UUID of the ItemStack's owner
*
* @param stack
* - The ItemStack to check the owner of
* - The ItemStack to check the owner of
*
* @return - The UUID of the ItemStack's owner
*/

View file

@ -46,9 +46,9 @@ public class NetworkHelper
/**
* @see NetworkHelper#getSoulNetwork(String)
*
*
* @param uuid
* - The Player's Mojang UUID
* - The Player's Mojang UUID
*/
public static SoulNetwork getSoulNetwork(UUID uuid)
{
@ -57,9 +57,9 @@ public class NetworkHelper
/**
* @see NetworkHelper#getSoulNetwork(String)
*
*
* @param player
* - The Player
* - The Player
*/
public static SoulNetwork getSoulNetwork(EntityPlayer player)
{
@ -135,12 +135,12 @@ public class NetworkHelper
/**
* Checks if the ItemStack has a user to be syphoned from.
*
*
* @param stack
* - ItemStack to check
* - ItemStack to check
* @param toSyphon
* - Amount of LP to syphon
*
* - Amount of LP to syphon
*
* @return - If syphoning is possible
*/
public static boolean canSyphonFromContainer(ItemStack stack, int toSyphon)

View file

@ -45,12 +45,12 @@ public class RitualHelper
/**
* Checks the RitualRegistry to see if the configuration of the ritual
* stones in the world is valid for the given EnumFacing.
*
*
* @param world
* - The world
* - The world
* @param pos
* - Location of the MasterRitualStone
*
* - Location of the MasterRitualStone
*
* @return The ID of the valid ritual
*/
public static String getValidRitual(World world, BlockPos pos)
@ -136,11 +136,11 @@ public class RitualHelper
* Should be safe to modify at any point.
*
* @param config
* - Your mod's Forge {@link Configuration} object.
* - Your mod's Forge {@link Configuration} object.
* @param packageName
* - The package your Rituals are located in.
* - The package your Rituals are located in.
* @param category
* - The config category to write to.
* - The config category to write to.
*/
@SuppressWarnings("unchecked")
private static void checkRituals(Configuration config, String packageName, String category, Class ritualClass, Map enabledMap)