Javadoc warning cleanup
This commit is contained in:
parent
d4b5d3d3e2
commit
7ebd59382f
src/main/java/WayofTime/bloodmagic
api
altar
iface
network
ritual
util/helper
compat
item
util
|
@ -31,6 +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
|
||||
*/
|
||||
public AltarComponent(BlockPos offset)
|
||||
{
|
||||
|
|
|
@ -10,8 +10,13 @@ public interface IBindable
|
|||
{
|
||||
/**
|
||||
* Called when the player attempts to bind the item.
|
||||
*
|
||||
* If false, binding fails.
|
||||
*
|
||||
* @param player
|
||||
* - The Player attempting to bind the item
|
||||
* @param stack
|
||||
* - The ItemStack to attempt binding
|
||||
*
|
||||
* @return If binding was successful.
|
||||
*/
|
||||
boolean onBind(EntityPlayer player, ItemStack stack);
|
||||
}
|
||||
|
|
|
@ -89,6 +89,11 @@ public class SoulNetwork extends WorldSavedData
|
|||
|
||||
/**
|
||||
* Used to syphon LP from the network
|
||||
*
|
||||
* @param syphon
|
||||
* - The amount of LP to syphon
|
||||
*
|
||||
* @return The amount of LP syphoned
|
||||
*/
|
||||
public int syphon(int syphon)
|
||||
{
|
||||
|
@ -107,6 +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
|
||||
* @param toSyphon
|
||||
* - The amount of LP to syphon
|
||||
*
|
||||
* @return - Whether the action should be performed.
|
||||
*/
|
||||
|
|
|
@ -39,7 +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)
|
||||
{
|
||||
|
@ -93,7 +95,9 @@ public abstract class AreaDescriptor
|
|||
* minimumOffset the lowest corner
|
||||
*
|
||||
* @param offset1
|
||||
* -
|
||||
* @param offset2
|
||||
* -
|
||||
*/
|
||||
public void setOffsets(BlockPos offset1, BlockPos offset2)
|
||||
{
|
||||
|
|
|
@ -64,6 +64,11 @@ public class BindableHelper
|
|||
|
||||
/**
|
||||
* @see BindableHelper#checkAndSetItemOwner(ItemStack, String)
|
||||
*
|
||||
* @param stack
|
||||
* - ItemStack to check
|
||||
* @param uuid
|
||||
* - UUID of the Player
|
||||
*/
|
||||
public static boolean checkAndSetItemOwner(ItemStack stack, UUID uuid)
|
||||
{
|
||||
|
|
|
@ -46,6 +46,9 @@ public class NetworkHelper
|
|||
|
||||
/**
|
||||
* @see NetworkHelper#getSoulNetwork(String)
|
||||
*
|
||||
* @param uuid
|
||||
* - The Player's Mojang UUID
|
||||
*/
|
||||
public static SoulNetwork getSoulNetwork(UUID uuid)
|
||||
{
|
||||
|
@ -54,6 +57,9 @@ public class NetworkHelper
|
|||
|
||||
/**
|
||||
* @see NetworkHelper#getSoulNetwork(String)
|
||||
*
|
||||
* @param player
|
||||
* - The Player
|
||||
*/
|
||||
public static SoulNetwork getSoulNetwork(EntityPlayer player)
|
||||
{
|
||||
|
@ -127,6 +133,16 @@ public class NetworkHelper
|
|||
return !(MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY) && network.syphon(event.syphon) >= toSyphon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the ItemStack has a user to be syphoned from.
|
||||
*
|
||||
* @param stack
|
||||
* - ItemStack to check
|
||||
* @param toSyphon
|
||||
* - Amount of LP to syphon
|
||||
*
|
||||
* @return - If syphoning is possible
|
||||
*/
|
||||
public static boolean canSyphonFromContainer(ItemStack stack, int toSyphon)
|
||||
{
|
||||
stack = NBTHelper.checkNBT(stack);
|
||||
|
|
|
@ -45,7 +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
|
||||
* @param pos
|
||||
* - Location of the MasterRitualStone
|
||||
*
|
||||
* @return The ID of the valid ritual
|
||||
*/
|
||||
public static String getValidRitual(World world, BlockPos pos)
|
||||
|
@ -126,10 +131,7 @@ public class RitualHelper
|
|||
* Adds your Ritual to the {@link RitualRegistry#enabledRituals} Map. This
|
||||
* is used to determine whether your effect is enabled or not.
|
||||
*
|
||||
* The config option will be created as {@code B:ClassName=true} with a
|
||||
* comment of {@code Enables the ClassName ritual}.
|
||||
*
|
||||
* Use {@link #}
|
||||
* The config option will be created as {@code B:ClassName=true}.
|
||||
*
|
||||
* Should be safe to modify at any point.
|
||||
*
|
||||
|
|
|
@ -11,7 +11,7 @@ public interface ICompatibility
|
|||
void loadCompatibility();
|
||||
|
||||
/**
|
||||
* The {@code modid} of the mod we are adding compatibility for.
|
||||
* @return The {@code modid} of the mod we are adding compatibility for.
|
||||
*/
|
||||
String getModId();
|
||||
|
||||
|
@ -20,6 +20,8 @@ public interface ICompatibility
|
|||
* found.
|
||||
*
|
||||
* Generally a determined by a config option.
|
||||
*
|
||||
* @return If Compatibility should load.
|
||||
*/
|
||||
boolean enableCompat();
|
||||
}
|
||||
|
|
|
@ -43,9 +43,13 @@ public class ItemBindable extends Item implements IBindable
|
|||
* it will instead take the LP from the holder of the item.
|
||||
*
|
||||
* @param stack
|
||||
* - The ItemStack to syphon from
|
||||
* @param player
|
||||
* - The Player using the item
|
||||
* @param lpUsed
|
||||
* @return
|
||||
* - The amount of LP to syphon
|
||||
*
|
||||
* @return Whether syphoning was successful or not
|
||||
*/
|
||||
public static boolean syphonNetwork(ItemStack stack, EntityPlayer player, int lpUsed)
|
||||
{
|
||||
|
@ -79,16 +83,19 @@ public class ItemBindable extends Item implements IBindable
|
|||
* without an online player. This will not take health from the owner if it
|
||||
* fails to find sufficient LP.
|
||||
*
|
||||
* @param itemStack
|
||||
* @param stack
|
||||
* - The ItemStack to syphon from.
|
||||
* @param lpUsed
|
||||
* @return
|
||||
* - The amount of LP to syphon
|
||||
*
|
||||
* @return - If syphoning was successful or not
|
||||
*/
|
||||
public static boolean syphonNetwork(ItemStack itemStack, int lpUsed)
|
||||
public static boolean syphonNetwork(ItemStack stack, int lpUsed)
|
||||
{
|
||||
if (itemStack.getItem() instanceof ItemBindable)
|
||||
if (stack.getItem() instanceof ItemBindable)
|
||||
{
|
||||
ItemBindable itemBindable = (ItemBindable) itemStack.getItem();
|
||||
return !Strings.isNullOrEmpty(itemBindable.getBindableOwner(itemStack)) && NetworkHelper.syphonFromContainer(itemStack, lpUsed);
|
||||
ItemBindable itemBindable = (ItemBindable) stack.getItem();
|
||||
return !Strings.isNullOrEmpty(itemBindable.getBindableOwner(stack)) && NetworkHelper.syphonFromContainer(stack, lpUsed);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -78,11 +78,16 @@ public class ItemRitualDiviner extends Item
|
|||
|
||||
/**
|
||||
* Adds a single rune to the ritual.
|
||||
*
|
||||
*
|
||||
* @param stack
|
||||
* - The Ritual Diviner stack
|
||||
* @param world
|
||||
* -
|
||||
* - The World
|
||||
* @param pos
|
||||
* - Block Position of the MRS.
|
||||
* @param player
|
||||
* - The Player attempting to place the ritual
|
||||
*
|
||||
* @return - True if a rune was successfully added
|
||||
*/
|
||||
public boolean addRuneToRitual(ItemStack stack, World world, BlockPos pos, EntityPlayer player)
|
||||
|
|
|
@ -28,22 +28,35 @@ public class Utils
|
|||
}
|
||||
|
||||
/**
|
||||
* Used for inserting an ItemStack with a stacksize of 1 to a tile's
|
||||
* inventory at slot 0. Returns {@code true} if the ItemStack is inserted,
|
||||
* {@code false} otherwise
|
||||
*
|
||||
* EG: Block Altar
|
||||
*
|
||||
* @see #insertItemToTile(TileInventory, EntityPlayer, int)
|
||||
*
|
||||
* @param tile
|
||||
* - The {@link TileInventory} to input the item to
|
||||
* @param player
|
||||
* - The player to take the item from.
|
||||
*
|
||||
* @return {@code true} if the ItemStack is inserted, {@code false} otherwise
|
||||
*/
|
||||
public static boolean insertItemToTile(TileInventory tile, EntityPlayer player)
|
||||
{
|
||||
return insertItemToTile(tile, player, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for inserting an ItemStack with a stacksize of 1 to a tile's
|
||||
* inventory at slot 0
|
||||
*
|
||||
* EG: Block Altar
|
||||
*
|
||||
* @param tile
|
||||
* - The {@link TileInventory} to input the item to
|
||||
* @param player
|
||||
* - The player to take the item from.
|
||||
* @param slot
|
||||
* - The slot to attempt to insert to
|
||||
*
|
||||
* @return {@code true} if the ItemStack is inserted, {@code false} otherwise
|
||||
*/
|
||||
public static boolean insertItemToTile(TileInventory tile, EntityPlayer player, int slot)
|
||||
{
|
||||
if (tile.getStackInSlot(slot) == null && player.getHeldItem() != null)
|
||||
|
@ -67,6 +80,14 @@ public class Utils
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a default block for each type of {@link EnumAltarComponent}
|
||||
*
|
||||
* @param component
|
||||
* - The Component to provide a block for.
|
||||
*
|
||||
* @return The default Block for the EnumAltarComponent
|
||||
*/
|
||||
public static Block getBlockForComponent(EnumAltarComponent component)
|
||||
{
|
||||
switch (component)
|
||||
|
|
Loading…
Reference in a new issue