Javadoc warning cleanup
This commit is contained in:
parent
d4b5d3d3e2
commit
7ebd59382f
11 changed files with 103 additions and 23 deletions
|
@ -31,6 +31,9 @@ public class AltarComponent
|
||||||
/**
|
/**
|
||||||
* Use for setting a location at which there must be a block, but the type
|
* Use for setting a location at which there must be a block, but the type
|
||||||
* of block does not matter.
|
* of block does not matter.
|
||||||
|
*
|
||||||
|
* @param offset
|
||||||
|
* - Where the block should be in relation to the Altar
|
||||||
*/
|
*/
|
||||||
public AltarComponent(BlockPos offset)
|
public AltarComponent(BlockPos offset)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,12 @@ public interface IBindable
|
||||||
/**
|
/**
|
||||||
* Called when the player attempts to bind the item.
|
* 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);
|
boolean onBind(EntityPlayer player, ItemStack stack);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,11 @@ public class SoulNetwork extends WorldSavedData
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to syphon LP from the network
|
* 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)
|
public int syphon(int syphon)
|
||||||
{
|
{
|
||||||
|
@ -108,6 +113,11 @@ public class SoulNetwork extends WorldSavedData
|
||||||
*
|
*
|
||||||
* Always returns false on the client side.
|
* 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.
|
* @return - Whether the action should be performed.
|
||||||
*/
|
*/
|
||||||
public boolean syphonAndDamage(EntityPlayer user, int toSyphon)
|
public boolean syphonAndDamage(EntityPlayer user, int toSyphon)
|
||||||
|
|
|
@ -39,7 +39,9 @@ public abstract class AreaDescriptor
|
||||||
* (1,1,1), calling getContainedPositions() will only give (0,0,0).
|
* (1,1,1), calling getContainedPositions() will only give (0,0,0).
|
||||||
*
|
*
|
||||||
* @param minimumOffset
|
* @param minimumOffset
|
||||||
|
* -
|
||||||
* @param maximumOffset
|
* @param maximumOffset
|
||||||
|
* -
|
||||||
*/
|
*/
|
||||||
public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset)
|
public Rectangle(BlockPos minimumOffset, BlockPos maximumOffset)
|
||||||
{
|
{
|
||||||
|
@ -93,7 +95,9 @@ public abstract class AreaDescriptor
|
||||||
* minimumOffset the lowest corner
|
* minimumOffset the lowest corner
|
||||||
*
|
*
|
||||||
* @param offset1
|
* @param offset1
|
||||||
|
* -
|
||||||
* @param offset2
|
* @param offset2
|
||||||
|
* -
|
||||||
*/
|
*/
|
||||||
public void setOffsets(BlockPos offset1, BlockPos offset2)
|
public void setOffsets(BlockPos offset1, BlockPos offset2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,6 +64,11 @@ public class BindableHelper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see BindableHelper#checkAndSetItemOwner(ItemStack, String)
|
* @see BindableHelper#checkAndSetItemOwner(ItemStack, String)
|
||||||
|
*
|
||||||
|
* @param stack
|
||||||
|
* - ItemStack to check
|
||||||
|
* @param uuid
|
||||||
|
* - UUID of the Player
|
||||||
*/
|
*/
|
||||||
public static boolean checkAndSetItemOwner(ItemStack stack, UUID uuid)
|
public static boolean checkAndSetItemOwner(ItemStack stack, UUID uuid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,6 +46,9 @@ public class NetworkHelper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see NetworkHelper#getSoulNetwork(String)
|
* @see NetworkHelper#getSoulNetwork(String)
|
||||||
|
*
|
||||||
|
* @param uuid
|
||||||
|
* - The Player's Mojang UUID
|
||||||
*/
|
*/
|
||||||
public static SoulNetwork getSoulNetwork(UUID uuid)
|
public static SoulNetwork getSoulNetwork(UUID uuid)
|
||||||
{
|
{
|
||||||
|
@ -54,6 +57,9 @@ public class NetworkHelper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see NetworkHelper#getSoulNetwork(String)
|
* @see NetworkHelper#getSoulNetwork(String)
|
||||||
|
*
|
||||||
|
* @param player
|
||||||
|
* - The Player
|
||||||
*/
|
*/
|
||||||
public static SoulNetwork getSoulNetwork(EntityPlayer 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;
|
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)
|
public static boolean canSyphonFromContainer(ItemStack stack, int toSyphon)
|
||||||
{
|
{
|
||||||
stack = NBTHelper.checkNBT(stack);
|
stack = NBTHelper.checkNBT(stack);
|
||||||
|
|
|
@ -46,6 +46,11 @@ public class RitualHelper
|
||||||
* Checks the RitualRegistry to see if the configuration of the ritual
|
* Checks the RitualRegistry to see if the configuration of the ritual
|
||||||
* stones in the world is valid for the given EnumFacing.
|
* 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
|
* @return The ID of the valid ritual
|
||||||
*/
|
*/
|
||||||
public static String getValidRitual(World world, BlockPos pos)
|
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
|
* Adds your Ritual to the {@link RitualRegistry#enabledRituals} Map. This
|
||||||
* is used to determine whether your effect is enabled or not.
|
* is used to determine whether your effect is enabled or not.
|
||||||
*
|
*
|
||||||
* The config option will be created as {@code B:ClassName=true} with a
|
* The config option will be created as {@code B:ClassName=true}.
|
||||||
* comment of {@code Enables the ClassName ritual}.
|
|
||||||
*
|
|
||||||
* Use {@link #}
|
|
||||||
*
|
*
|
||||||
* Should be safe to modify at any point.
|
* Should be safe to modify at any point.
|
||||||
*
|
*
|
||||||
|
|
|
@ -11,7 +11,7 @@ public interface ICompatibility
|
||||||
void loadCompatibility();
|
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();
|
String getModId();
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@ public interface ICompatibility
|
||||||
* found.
|
* found.
|
||||||
*
|
*
|
||||||
* Generally a determined by a config option.
|
* Generally a determined by a config option.
|
||||||
|
*
|
||||||
|
* @return If Compatibility should load.
|
||||||
*/
|
*/
|
||||||
boolean enableCompat();
|
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.
|
* it will instead take the LP from the holder of the item.
|
||||||
*
|
*
|
||||||
* @param stack
|
* @param stack
|
||||||
|
* - The ItemStack to syphon from
|
||||||
* @param player
|
* @param player
|
||||||
|
* - The Player using the item
|
||||||
* @param lpUsed
|
* @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)
|
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
|
* without an online player. This will not take health from the owner if it
|
||||||
* fails to find sufficient LP.
|
* fails to find sufficient LP.
|
||||||
*
|
*
|
||||||
* @param itemStack
|
* @param stack
|
||||||
|
* - The ItemStack to syphon from.
|
||||||
* @param lpUsed
|
* @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();
|
ItemBindable itemBindable = (ItemBindable) stack.getItem();
|
||||||
return !Strings.isNullOrEmpty(itemBindable.getBindableOwner(itemStack)) && NetworkHelper.syphonFromContainer(itemStack, lpUsed);
|
return !Strings.isNullOrEmpty(itemBindable.getBindableOwner(stack)) && NetworkHelper.syphonFromContainer(stack, lpUsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -79,10 +79,15 @@ public class ItemRitualDiviner extends Item
|
||||||
/**
|
/**
|
||||||
* Adds a single rune to the ritual.
|
* Adds a single rune to the ritual.
|
||||||
*
|
*
|
||||||
|
* @param stack
|
||||||
|
* - The Ritual Diviner stack
|
||||||
* @param world
|
* @param world
|
||||||
* -
|
* - The World
|
||||||
* @param pos
|
* @param pos
|
||||||
* - Block Position of the MRS.
|
* - Block Position of the MRS.
|
||||||
|
* @param player
|
||||||
|
* - The Player attempting to place the ritual
|
||||||
|
*
|
||||||
* @return - True if a rune was successfully added
|
* @return - True if a rune was successfully added
|
||||||
*/
|
*/
|
||||||
public boolean addRuneToRitual(ItemStack stack, World world, BlockPos pos, EntityPlayer player)
|
public boolean addRuneToRitual(ItemStack stack, World world, BlockPos pos, EntityPlayer player)
|
||||||
|
|
|
@ -27,10 +27,24 @@ public class Utils
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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
|
* 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,
|
* inventory at slot 0
|
||||||
* {@code false} otherwise
|
|
||||||
*
|
*
|
||||||
* EG: Block Altar
|
* EG: Block Altar
|
||||||
*
|
*
|
||||||
|
@ -38,12 +52,11 @@ public class Utils
|
||||||
* - The {@link TileInventory} to input the item to
|
* - The {@link TileInventory} to input the item to
|
||||||
* @param player
|
* @param player
|
||||||
* - The player to take the item from.
|
* - 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)
|
|
||||||
{
|
|
||||||
return insertItemToTile(tile, player, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean insertItemToTile(TileInventory tile, EntityPlayer player, int slot)
|
public static boolean insertItemToTile(TileInventory tile, EntityPlayer player, int slot)
|
||||||
{
|
{
|
||||||
if (tile.getStackInSlot(slot) == null && player.getHeldItem() != null)
|
if (tile.getStackInSlot(slot) == null && player.getHeldItem() != null)
|
||||||
|
@ -67,6 +80,14 @@ public class Utils
|
||||||
return false;
|
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)
|
public static Block getBlockForComponent(EnumAltarComponent component)
|
||||||
{
|
{
|
||||||
switch (component)
|
switch (component)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue