From 9fc52c601644276c4d478eeaf29bc502d3f50eff Mon Sep 17 00:00:00 2001 From: Tom Elfring Date: Sat, 5 Aug 2017 18:32:20 +0200 Subject: [PATCH] Fix some JavaDoc warnings --- src/main/java/mekanism/api/Coord4D.java | 3 +-- src/main/java/mekanism/api/Pos3D.java | 2 +- src/main/java/mekanism/api/gas/Gas.java | 2 +- src/main/java/mekanism/api/gas/GasTank.java | 2 +- src/main/java/mekanism/api/gas/IGasItem.java | 17 +++++--------- .../mekanism/api/infuse/InfuseRegistry.java | 2 +- .../api/transmitters/DynamicNetwork.java | 2 +- .../java/mekanism/client/MekKeyHandler.java | 8 +++---- src/main/java/mekanism/common/FluidSlot.java | 2 +- .../java/mekanism/common/MekanismItems.java | 2 +- src/main/java/mekanism/common/Version.java | 7 ++---- .../common/base/ISideConfiguration.java | 2 +- .../mekanism/common/base/ISustainedTank.java | 2 +- .../mekanism/common/base/ITileNetwork.java | 4 ++-- .../common/multiblock/UpdateProtocol.java | 23 ++++++++----------- .../recipe/inputs/ChemicalPairInput.java | 3 +-- .../common/recipe/inputs/MachineInput.java | 5 ++-- .../recipe/outputs/ChemicalPairOutput.java | 3 +-- .../common/tile/TileEntityTeleporter.java | 6 +---- .../java/mekanism/common/util/CableUtils.java | 2 +- .../mekanism/common/util/MekanismUtils.java | 12 +++++----- .../common/tile/TileEntityBioGenerator.java | 4 ++-- .../common/tile/TileEntityGasGenerator.java | 2 +- .../common/tile/TileEntityHeatGenerator.java | 2 +- 24 files changed, 50 insertions(+), 69 deletions(-) diff --git a/src/main/java/mekanism/api/Coord4D.java b/src/main/java/mekanism/api/Coord4D.java index ee3e2891d..13a81d556 100644 --- a/src/main/java/mekanism/api/Coord4D.java +++ b/src/main/java/mekanism/api/Coord4D.java @@ -299,10 +299,9 @@ public class Coord4D } /** - * Whether or not the defined side of this Coord4D is visible. * @param side - side to check * @param world - world this Coord4D is in - * @return + * @return Whether or not the defined side of this Coord4D is visible. */ public boolean sideVisible(EnumFacing side, IBlockAccess world) { diff --git a/src/main/java/mekanism/api/Pos3D.java b/src/main/java/mekanism/api/Pos3D.java index 8e9f1a0fe..960ab86ce 100644 --- a/src/main/java/mekanism/api/Pos3D.java +++ b/src/main/java/mekanism/api/Pos3D.java @@ -102,7 +102,7 @@ public class Pos3D extends Vec3d /** * Creates a new Pos3D from the motion of an entity. - * @param entity + * @param entity Entitiy to get the motion from * @return Pos3D representing the motion of the given entity */ public static Pos3D fromMotion(Entity entity) diff --git a/src/main/java/mekanism/api/gas/Gas.java b/src/main/java/mekanism/api/gas/Gas.java index eaf57b358..b76bdce17 100644 --- a/src/main/java/mekanism/api/gas/Gas.java +++ b/src/main/java/mekanism/api/gas/Gas.java @@ -142,7 +142,7 @@ public class Gas /** * Sets this gas's icon. - * @param i - IIcon to associate with this Gas + * @param map - IIcon to associate with this Gas * @return this Gas object */ public Gas registerIcon(TextureMap map) diff --git a/src/main/java/mekanism/api/gas/GasTank.java b/src/main/java/mekanism/api/gas/GasTank.java index a5d4c20b3..af8f44b0b 100644 --- a/src/main/java/mekanism/api/gas/GasTank.java +++ b/src/main/java/mekanism/api/gas/GasTank.java @@ -147,7 +147,7 @@ public class GasTank /** * Gets the amount of gas needed by this GasTank. - * @return + * @return Amount of gas needed */ public int getNeeded() { diff --git a/src/main/java/mekanism/api/gas/IGasItem.java b/src/main/java/mekanism/api/gas/IGasItem.java index 37f6143d8..8c61dff89 100644 --- a/src/main/java/mekanism/api/gas/IGasItem.java +++ b/src/main/java/mekanism/api/gas/IGasItem.java @@ -11,15 +11,14 @@ public interface IGasItem { /** * Gets the rate of transfer this item can handle. - * @return + * @return The transfer rate of what the item can handle. */ int getRate(ItemStack itemstack); /** * Adds a defined amount of a certain gas to an item. * @param itemstack - the itemstack to add gas to - * @param type - the type of gas to add - * @param amount - the amount of gas to add + * @param stack - the type and amount of gas to add * @return the gas that was accepted by the item */ int addGas(ItemStack itemstack, GasStack stack); @@ -27,7 +26,6 @@ public interface IGasItem /** * Removes the defined amount of a certain gas from the item. * @param itemstack - the itemstack to remove gas from - * @param type - the type of gas to remove * @param amount - the amount of gas to remove * @return the gas that was removed by the item */ @@ -51,24 +49,21 @@ public interface IGasItem /** * Get the gas of a declared type. - * @param type - type of gas - * @param data - ItemStack parameter if necessary + * @param itemstack - ItemStack parameter * @return gas stored */ GasStack getGas(ItemStack itemstack); /** * Set the gas of a declared type to a new amount; - * @param type - type of gas - * @param data - ItemStack parameter if necessary - * @param amount - amount to store + * @param itemstack - ItemStack parameter + * @param stack - the type and amount of gas to add */ void setGas(ItemStack itemstack, GasStack stack); /** * Gets the maximum amount of gas this tile entity can store. - * @param type - type of gas - * @param data - ItemStack parameter if necessary + * @param itemstack - ItemStack parameter * @return maximum gas */ int getMaxGas(ItemStack itemstack); diff --git a/src/main/java/mekanism/api/infuse/InfuseRegistry.java b/src/main/java/mekanism/api/infuse/InfuseRegistry.java index d95d11c82..1a99fd760 100644 --- a/src/main/java/mekanism/api/infuse/InfuseRegistry.java +++ b/src/main/java/mekanism/api/infuse/InfuseRegistry.java @@ -20,7 +20,7 @@ public class InfuseRegistry /** * Registers an InfuseType into the registry. Call this in PreInit! - * @param infuse + * @param infuse InfuseType to register */ public static void registerInfuseType(InfuseType infuse) { diff --git a/src/main/java/mekanism/api/transmitters/DynamicNetwork.java b/src/main/java/mekanism/api/transmitters/DynamicNetwork.java index 3c78f6e8e..f22235beb 100644 --- a/src/main/java/mekanism/api/transmitters/DynamicNetwork.java +++ b/src/main/java/mekanism/api/transmitters/DynamicNetwork.java @@ -307,7 +307,7 @@ public abstract class DynamicNetwork> implemen /** * Override this if things can have variable capacity along the network. - * @return An 'average' value of capacity. Calculate it how you will. + * An 'average' value of capacity. Calculate it how you will. */ protected synchronized void updateMeanCapacity() { diff --git a/src/main/java/mekanism/client/MekKeyHandler.java b/src/main/java/mekanism/client/MekKeyHandler.java index 688686402..dcb215b8b 100644 --- a/src/main/java/mekanism/client/MekKeyHandler.java +++ b/src/main/java/mekanism/client/MekKeyHandler.java @@ -15,8 +15,8 @@ public abstract class MekKeyHandler /** * Pass an array of keybindings and a repeat flag for each one * - * @param bindings - * @param rep + * @param bindings Bindings to set + * @param rep Repeat flags for bindings */ public MekKeyHandler(KeyBinding[] bindings, boolean[] rep) { @@ -30,7 +30,7 @@ public abstract class MekKeyHandler * Register the keys into the system. You will do your own keyboard * management elsewhere. No events will fire if you use this method * - * @param bindings + * @param bindings Bindings to set */ public MekKeyHandler(KeyBinding[] bindings) { @@ -78,4 +78,4 @@ public abstract class MekKeyHandler public abstract void keyDown(KeyBinding kb, boolean isRepeat); public abstract void keyUp(KeyBinding kb); -} \ No newline at end of file +} diff --git a/src/main/java/mekanism/common/FluidSlot.java b/src/main/java/mekanism/common/FluidSlot.java index 38ff5b9eb..e4c4b0f8a 100644 --- a/src/main/java/mekanism/common/FluidSlot.java +++ b/src/main/java/mekanism/common/FluidSlot.java @@ -30,7 +30,7 @@ public class FluidSlot /** * Sets the fluid to a new amount. - * @param fluid - amount to store + * @param amount - amount to store */ public void setFluid(int amount) { diff --git a/src/main/java/mekanism/common/MekanismItems.java b/src/main/java/mekanism/common/MekanismItems.java index bbd164c64..0aa8f185f 100644 --- a/src/main/java/mekanism/common/MekanismItems.java +++ b/src/main/java/mekanism/common/MekanismItems.java @@ -96,7 +96,7 @@ public class MekanismItems /** * Adds and registers all items. - * @param registry + * @param registry Forge registry to add the items to */ public static void registerItems(IForgeRegistry registry) { diff --git a/src/main/java/mekanism/common/Version.java b/src/main/java/mekanism/common/Version.java index 582e5634c..894834493 100644 --- a/src/main/java/mekanism/common/Version.java +++ b/src/main/java/mekanism/common/Version.java @@ -40,11 +40,8 @@ public class Version } /** - * 1: greater than - * 0: equal to - * -1: less than - * @param version - * @return + * @param version Version to check against + * @return 1: greater than, 0: equal to, -1: less than */ public byte comparedState(Version version) { diff --git a/src/main/java/mekanism/common/base/ISideConfiguration.java b/src/main/java/mekanism/common/base/ISideConfiguration.java index 2331b79d6..2bbb33e0d 100644 --- a/src/main/java/mekanism/common/base/ISideConfiguration.java +++ b/src/main/java/mekanism/common/base/ISideConfiguration.java @@ -25,7 +25,7 @@ public interface ISideConfiguration /** * Gets this machine's ejector. - * @return + * @return this machine's ejector */ TileComponentEjector getEjector(); } diff --git a/src/main/java/mekanism/common/base/ISustainedTank.java b/src/main/java/mekanism/common/base/ISustainedTank.java index 5b5702aba..b4d5bf335 100644 --- a/src/main/java/mekanism/common/base/ISustainedTank.java +++ b/src/main/java/mekanism/common/base/ISustainedTank.java @@ -11,7 +11,7 @@ public interface ISustainedTank { /** * Sets the tank tag list to a new value. - * @param nbtTags - NBTTagList value to set + * @param fluidStack - Fluidstack to apply to * @param data - ItemStack parameter if using on item */ void setFluidStack(FluidStack fluidStack, Object... data); diff --git a/src/main/java/mekanism/common/base/ITileNetwork.java b/src/main/java/mekanism/common/base/ITileNetwork.java index a51af63fb..32c9a62ca 100644 --- a/src/main/java/mekanism/common/base/ITileNetwork.java +++ b/src/main/java/mekanism/common/base/ITileNetwork.java @@ -13,14 +13,14 @@ public interface ITileNetwork { /** * Receive and manage a packet's data. - * @param dataStream + * @param dataStream Datastream to parse */ void handlePacketData(ByteBuf dataStream) throws Exception; /** * Gets an ArrayList of data this tile entity keeps synchronized with the client. * @param data - list of data - * @return ArrayList + * @return ArrayList of network data */ ArrayList getNetworkedData(ArrayList data); } diff --git a/src/main/java/mekanism/common/multiblock/UpdateProtocol.java b/src/main/java/mekanism/common/multiblock/UpdateProtocol.java index b58a24cf4..a1aba2bf1 100644 --- a/src/main/java/mekanism/common/multiblock/UpdateProtocol.java +++ b/src/main/java/mekanism/common/multiblock/UpdateProtocol.java @@ -33,7 +33,7 @@ public abstract class UpdateProtocol> /** * Recursively loops through each node connected to the given TileEntity. - * @param tile - the TileEntity to loop over + * @param coord - the TileEntity coords to loop over */ public void loopThrough(Coord4D coord) { @@ -271,11 +271,10 @@ public abstract class UpdateProtocol> } /** - * Whether or not the block at the specified location is an air block. * @param x - x coordinate * @param y - y coordinate * @param z - z coordinate - * @return + * @return Whether or not the block at the specified location is an air block. */ protected boolean isAir(int x, int y, int z) { @@ -288,11 +287,10 @@ public abstract class UpdateProtocol> } /** - * Whether or not the block at the specified location is a viable node for a multiblock structure. * @param x - x coordinate * @param y - y coordinate * @param z - z coordinate - * @return + * @return Whether or not the block at the specified location is a viable node for a multiblock structure. */ public boolean isViableNode(int x, int y, int z) { @@ -315,9 +313,8 @@ public abstract class UpdateProtocol> } /** - * Whether or not the block at the specified location is a viable node for a multiblock structure. * @param pos - coordinates - * @return + * @return Whether or not the block at the specified location is a viable node for a multiblock structure. */ public boolean isViableNode(BlockPos pos) { @@ -345,13 +342,13 @@ public abstract class UpdateProtocol> } /** - * If the block at the specified location is on the minimum of all angles of this multiblock structure, and the one to use for the - * actual calculation. + * * @param obj - location to check * @param xmin - minimum x value * @param ymin - minimum y value * @param zmin - minimum z value - * @return + * @return If the block at the specified location is on the minimum of all angles of this multiblock structure, and the one to use for the + * actual calculation. */ private boolean isCorrectCorner(Coord4D obj, int xmin, int ymin, int zmin) { @@ -364,7 +361,6 @@ public abstract class UpdateProtocol> } /** - * Whether or not the block at the specified location is considered a frame on the multiblock structure. * @param obj - location to check * @param xmin - minimum x value * @param xmax - maximum x value @@ -372,7 +368,7 @@ public abstract class UpdateProtocol> * @param ymax - maximum y value * @param zmin - minimum z value * @param zmax - maximum z value - * @return + * @return Whether or not the block at the specified location is considered a frame on the multiblock structure. */ private boolean isFrame(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax) { @@ -407,11 +403,10 @@ public abstract class UpdateProtocol> } /** - * Whether or not the block at the specified location serves as a frame for a multiblock structure. * @param x - x coordinate * @param y - y coordinate * @param z - z coordinate - * @return + * @return Whether or not the block at the specified location serves as a frame for a multiblock structure. */ protected abstract boolean isValidFrame(int x, int y, int z); diff --git a/src/main/java/mekanism/common/recipe/inputs/ChemicalPairInput.java b/src/main/java/mekanism/common/recipe/inputs/ChemicalPairInput.java index 7be009fdf..23e08074a 100644 --- a/src/main/java/mekanism/common/recipe/inputs/ChemicalPairInput.java +++ b/src/main/java/mekanism/common/recipe/inputs/ChemicalPairInput.java @@ -67,8 +67,7 @@ public class ChemicalPairInput extends MachineInput } /** - * If this is a valid ChemicalPair - * @return + * @return True if this is a valid ChemicalPair */ @Override public boolean isValid() diff --git a/src/main/java/mekanism/common/recipe/inputs/MachineInput.java b/src/main/java/mekanism/common/recipe/inputs/MachineInput.java index b30f1ca9b..cb3b311fd 100644 --- a/src/main/java/mekanism/common/recipe/inputs/MachineInput.java +++ b/src/main/java/mekanism/common/recipe/inputs/MachineInput.java @@ -20,8 +20,9 @@ public abstract class MachineInput> * This should return true if the input matches this one, * IGNORING AMOUNTS. * Allows usage of HashMap optimisation to get recipes. - * @param other - * @return + * + * @param other The other input to check + * @return True if input matches this one, IGNORING AMOUNTS! */ public abstract boolean testEquality(INPUT other); diff --git a/src/main/java/mekanism/common/recipe/outputs/ChemicalPairOutput.java b/src/main/java/mekanism/common/recipe/outputs/ChemicalPairOutput.java index a5e621e86..ed477c1ae 100644 --- a/src/main/java/mekanism/common/recipe/outputs/ChemicalPairOutput.java +++ b/src/main/java/mekanism/common/recipe/outputs/ChemicalPairOutput.java @@ -38,8 +38,7 @@ public class ChemicalPairOutput extends MachineOutput } /** - * If this is a valid ChemicalPair - * @return + * @return True if this is a valid ChemicalPair */ public boolean isValid() { diff --git a/src/main/java/mekanism/common/tile/TileEntityTeleporter.java b/src/main/java/mekanism/common/tile/TileEntityTeleporter.java index 0bcda6ad3..ecd39f0c5 100644 --- a/src/main/java/mekanism/common/tile/TileEntityTeleporter.java +++ b/src/main/java/mekanism/common/tile/TileEntityTeleporter.java @@ -302,11 +302,7 @@ public class TileEntityTeleporter extends TileEntityElectricBlock implements ICo } /** - * 1: yes - * 2: no frame - * 3: no link found - * 4: not enough electricity - * @return + * @return 1: yes, 2: no frame, 3: no link found, 4: not enough electricity */ public byte canTeleport() { diff --git a/src/main/java/mekanism/common/util/CableUtils.java b/src/main/java/mekanism/common/util/CableUtils.java index fb78c05b9..c0e8340f4 100644 --- a/src/main/java/mekanism/common/util/CableUtils.java +++ b/src/main/java/mekanism/common/util/CableUtils.java @@ -39,7 +39,7 @@ public final class CableUtils /** * Gets the adjacent connections to a TileEntity, from a subset of its sides. * @param tileEntity - center TileEntity - * @param sides - set of sides to check + * @param sideFunction - set of sides to check * @return boolean[] of adjacent connections */ public static boolean[] getConnections(TileEntity tileEntity, Function sideFunction) diff --git a/src/main/java/mekanism/common/util/MekanismUtils.java b/src/main/java/mekanism/common/util/MekanismUtils.java index 240839d68..db2c37429 100644 --- a/src/main/java/mekanism/common/util/MekanismUtils.java +++ b/src/main/java/mekanism/common/util/MekanismUtils.java @@ -374,8 +374,8 @@ public final class MekanismUtils /** * Checks if a machine is in it's active state. - * @param world - * @param pos + * @param world World of the machine to check + * @param pos The position of the machine * @return if machine is active */ public static boolean isActive(IBlockAccess world, BlockPos pos) @@ -395,7 +395,7 @@ public final class MekanismUtils /** * Gets the left side of a certain orientation. - * @param orientation + * @param orientation Current orientation of the machine * @return left side */ public static EnumFacing getLeft(EnumFacing orientation) @@ -405,7 +405,7 @@ public final class MekanismUtils /** * Gets the right side of a certain orientation. - * @param orientation + * @param orientation Current orientation of the machine * @return right side */ public static EnumFacing getRight(EnumFacing orientation) @@ -415,7 +415,7 @@ public final class MekanismUtils /** * Gets the opposite side of a certain orientation. - * @param orientation + * @param orientation Current orientation of the machine * @return opposite side */ public static EnumFacing getBack(EnumFacing orientation) @@ -811,7 +811,7 @@ public final class MekanismUtils /** * Updates a block's light value and marks it for a render update. * @param world - world the block is in - * @param pos + * @param pos Position of the block */ public static void updateBlock(World world, BlockPos pos) { diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java index a289fce05..c04f76689 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityBioGenerator.java @@ -168,7 +168,7 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IFlui /** * Gets the scaled fuel level for the GUI. * @param i - multiplier - * @return + * @return Scaled fuel level */ public int getScaledFuelLevel(int i) { @@ -325,4 +325,4 @@ public class TileEntityBioGenerator extends TileEntityGenerator implements IFlui return super.getCapability(capability, side); } -} \ No newline at end of file +} diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java index 00bccad0c..f22161c01 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityGasGenerator.java @@ -199,7 +199,7 @@ public class TileEntityGasGenerator extends TileEntityGenerator implements IGasH /** * Gets the scaled gas level for the GUI. * @param i - multiplier - * @return + * @return Scaled gas level */ public int getScaledGasLevel(int i) { diff --git a/src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java b/src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java index 1c496d388..23c44ff2e 100644 --- a/src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java +++ b/src/main/java/mekanism/generators/common/tile/TileEntityHeatGenerator.java @@ -226,7 +226,7 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu /** * Gets the scaled fuel level for the GUI. * @param i - multiplier - * @return + * @return Scaled fuel level */ public int getScaledFuelLevel(int i) {