Some javadoc fixes
This commit is contained in:
parent
a1e57c068e
commit
c40c81924a
10 changed files with 150 additions and 154 deletions
|
@ -203,7 +203,6 @@ public class DimensionManager
|
|||
/**
|
||||
* Not public API: used internally to get dimensions that should load at
|
||||
* server startup
|
||||
* @return
|
||||
*/
|
||||
public static Integer[] getStaticDimensionIDs()
|
||||
{
|
||||
|
@ -256,7 +255,7 @@ public class DimensionManager
|
|||
/**
|
||||
* Return the next free dimension ID. Note: you are not guaranteed a contiguous
|
||||
* block of free ids. Always call for each individual ID you wish to get.
|
||||
* @return
|
||||
* @return the next free dimension ID
|
||||
*/
|
||||
public static int getNextFreeDimId() {
|
||||
int next = 0;
|
||||
|
@ -318,8 +317,8 @@ public class DimensionManager
|
|||
}
|
||||
|
||||
/**
|
||||
* Return the current root directory for the world save. Accesses getSaveHandler from the
|
||||
* @return
|
||||
* Return the current root directory for the world save. Accesses getSaveHandler from the overworld
|
||||
* @return the root directory of the save
|
||||
*/
|
||||
public static File getCurrentSaveRootDirectory()
|
||||
{
|
||||
|
|
|
@ -291,7 +291,7 @@ public class ForgeChunkManager
|
|||
|
||||
/**
|
||||
* Get the entity associated with this {@link Type#ENTITY} type ticket
|
||||
* @return
|
||||
* @return the entity
|
||||
*/
|
||||
public Entity getEntity()
|
||||
{
|
||||
|
@ -789,7 +789,7 @@ public class ForgeChunkManager
|
|||
/**
|
||||
* The list of persistent chunks in the world. This set is immutable.
|
||||
* @param world
|
||||
* @return
|
||||
* @return the list of persistent chunks in the world
|
||||
*/
|
||||
public static ImmutableSetMultimap<ChunkCoordIntPair, Ticket> getPersistentChunksFor(World world)
|
||||
{
|
||||
|
|
|
@ -9,51 +9,50 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
*
|
||||
*/
|
||||
public interface IBlockLiquid extends ILiquid {
|
||||
/**
|
||||
* Controls the type of block that is generated by this IBlockLiquid
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
public enum BlockType {
|
||||
/**
|
||||
* No block. Completeness really.
|
||||
*/
|
||||
NONE,
|
||||
/**
|
||||
* Vanilla style block, up to 8 flowing states. May be able to generate new sources.
|
||||
*/
|
||||
VANILLA,
|
||||
/**
|
||||
* Finite liquid style, uses cellular automata to model flowing behaviour.
|
||||
*/
|
||||
FINITE;
|
||||
}
|
||||
/**
|
||||
* Controls the type of block that is generated by this IBlockLiquid
|
||||
*
|
||||
*/
|
||||
public enum BlockType {
|
||||
/**
|
||||
* No block. Completeness really.
|
||||
*/
|
||||
NONE,
|
||||
/**
|
||||
* Vanilla style block, up to 8 flowing states. May be able to generate new sources.
|
||||
*/
|
||||
VANILLA,
|
||||
/**
|
||||
* Finite liquid style, uses cellular automata to model flowing behaviour.
|
||||
*/
|
||||
FINITE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can this liquid, when placed in a specific configuration, generate new source blocks of the liquid.
|
||||
* @return
|
||||
*/
|
||||
public boolean willGenerateSources();
|
||||
/**
|
||||
* Can this liquid, when placed in a specific configuration, generate new source blocks of the liquid.
|
||||
* @return if this liquid will generate new sources
|
||||
*/
|
||||
public boolean willGenerateSources();
|
||||
|
||||
/**
|
||||
* @return the distance this liquid will flow if placed in the world. Maximum of 7 levels for vanilla types.
|
||||
*/
|
||||
public int getFlowDistance();
|
||||
/**
|
||||
* @return the distance this liquid will flow if placed in the world. Maximum of 7 levels for vanilla types.
|
||||
*/
|
||||
public int getFlowDistance();
|
||||
|
||||
/**
|
||||
* @return the RGB rendering for this liquid
|
||||
*/
|
||||
public byte[] getLiquidRGB();
|
||||
/**
|
||||
* @return the RGB rendering for this liquid
|
||||
*/
|
||||
public byte[] getLiquidRGB();
|
||||
|
||||
/**
|
||||
* Get the texture file for rendering the liquid
|
||||
* @return
|
||||
*/
|
||||
public String getLiquidBlockTextureFile();
|
||||
/**
|
||||
* Custom properties of the liquid.
|
||||
* @return
|
||||
*/
|
||||
public NBTTagCompound getLiquidProperties();
|
||||
/**
|
||||
* Get the texture file for rendering the liquid
|
||||
* @return the texture file for this liquid
|
||||
*/
|
||||
public String getLiquidBlockTextureFile();
|
||||
/**
|
||||
* Custom properties of the liquid.
|
||||
* @return a compound tag of custom liquid properties
|
||||
*/
|
||||
public NBTTagCompound getLiquidProperties();
|
||||
|
||||
}
|
||||
|
|
|
@ -15,21 +15,21 @@ package net.minecraftforge.liquids;
|
|||
*/
|
||||
public interface ILiquid {
|
||||
|
||||
/**
|
||||
* The itemId of the liquid item
|
||||
* @return
|
||||
*/
|
||||
public int stillLiquidId();
|
||||
/**
|
||||
* The itemId of the liquid item
|
||||
* @return the itemId
|
||||
*/
|
||||
public int stillLiquidId();
|
||||
|
||||
/**
|
||||
* Is this liquid a metadata based liquid
|
||||
* @return
|
||||
*/
|
||||
public boolean isMetaSensitive();
|
||||
/**
|
||||
* Is this liquid a metadata based liquid
|
||||
* @return if this is a metadata liquid
|
||||
*/
|
||||
public boolean isMetaSensitive();
|
||||
|
||||
/**
|
||||
* The item metadata of the liquid
|
||||
* @return
|
||||
*/
|
||||
public int stillLiquidMeta();
|
||||
/**
|
||||
* The item metadata of the liquid
|
||||
* @return the metadata of the liquid
|
||||
*/
|
||||
public int stillLiquidMeta();
|
||||
}
|
||||
|
|
|
@ -7,38 +7,38 @@ package net.minecraftforge.liquids;
|
|||
*/
|
||||
public interface ILiquidTank {
|
||||
|
||||
/**
|
||||
* @return LiquidStack representing the liquid contained in the tank, null if empty.
|
||||
*/
|
||||
LiquidStack getLiquid();
|
||||
/**
|
||||
* @return LiquidStack representing the liquid contained in the tank, null if empty.
|
||||
*/
|
||||
LiquidStack getLiquid();
|
||||
|
||||
/**
|
||||
* @return capacity of this tank
|
||||
*/
|
||||
int getCapacity();
|
||||
/**
|
||||
* @return capacity of this tank
|
||||
*/
|
||||
int getCapacity();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param resource
|
||||
* @param doFill
|
||||
* @return Amount of liquid used for filling.
|
||||
*/
|
||||
int fill(LiquidStack resource, boolean doFill);
|
||||
/**
|
||||
*
|
||||
* @param maxDrain
|
||||
* @param doDrain
|
||||
* @return Null if nothing was drained, otherwise a LiquidStack containing the drained.
|
||||
*/
|
||||
LiquidStack drain(int maxDrain, boolean doDrain);
|
||||
/**
|
||||
*
|
||||
* @param resource
|
||||
* @param doFill
|
||||
* @return Amount of liquid used for filling.
|
||||
*/
|
||||
int fill(LiquidStack resource, boolean doFill);
|
||||
/**
|
||||
*
|
||||
* @param maxDrain
|
||||
* @param doDrain
|
||||
* @return Null if nothing was drained, otherwise a LiquidStack containing the drained.
|
||||
*/
|
||||
LiquidStack drain(int maxDrain, boolean doDrain);
|
||||
|
||||
/**
|
||||
* Positive values indicate a positive liquid pressure (liquid wants to leave this tank)
|
||||
* Negative values indicate a negative liquid pressure (liquid wants to fill this tank)
|
||||
* Zero indicates no pressure
|
||||
*
|
||||
* @return a number indicating tank pressure
|
||||
*/
|
||||
public int getTankPressure();
|
||||
/**
|
||||
* Positive values indicate a positive liquid pressure (liquid wants to leave this tank)
|
||||
* Negative values indicate a negative liquid pressure (liquid wants to fill this tank)
|
||||
* Zero indicates no pressure
|
||||
*
|
||||
* @return a number indicating tank pressure
|
||||
*/
|
||||
public int getTankPressure();
|
||||
|
||||
}
|
||||
|
|
|
@ -4,53 +4,53 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
|
||||
public interface ITankContainer {
|
||||
|
||||
/**
|
||||
* Fills liquid into internal tanks, distribution is left to the ITankContainer.
|
||||
* @param from Orientation the liquid is pumped in from.
|
||||
* @param resource LiquidStack representing the maximum amount of liquid filled into the ITankContainer
|
||||
* @param doFill If false filling will only be simulated.
|
||||
* @return Amount of resource that was filled into internal tanks.
|
||||
*/
|
||||
int fill(ForgeDirection from, LiquidStack resource, boolean doFill);
|
||||
/**
|
||||
* Fills liquid into the specified internal tank.
|
||||
* @param from Orientation the liquid is pumped in from.
|
||||
* @param resource LiquidStack representing the maximum amount of liquid filled into the ITankContainer
|
||||
* @param doFill If false filling will only be simulated.
|
||||
* @return Amount of resource that was filled into internal tanks.
|
||||
*/
|
||||
int fill(int tankIndex, LiquidStack resource, boolean doFill);
|
||||
/**
|
||||
* Fills liquid into internal tanks, distribution is left to the ITankContainer.
|
||||
* @param from Orientation the liquid is pumped in from.
|
||||
* @param resource LiquidStack representing the maximum amount of liquid filled into the ITankContainer
|
||||
* @param doFill If false filling will only be simulated.
|
||||
* @return Amount of resource that was filled into internal tanks.
|
||||
*/
|
||||
int fill(ForgeDirection from, LiquidStack resource, boolean doFill);
|
||||
/**
|
||||
* Fills liquid into the specified internal tank.
|
||||
* @param tankIndex the index of the tank to fill
|
||||
* @param resource LiquidStack representing the maximum amount of liquid filled into the ITankContainer
|
||||
* @param doFill If false filling will only be simulated.
|
||||
* @return Amount of resource that was filled into internal tanks.
|
||||
*/
|
||||
int fill(int tankIndex, LiquidStack resource, boolean doFill);
|
||||
|
||||
/**
|
||||
* Drains liquid out of internal tanks, distribution is left to the ITankContainer.
|
||||
* @param from Orientation the liquid is drained to.
|
||||
* @param maxDrain Maximum amount of liquid to drain.
|
||||
* @param doDrain If false draining will only be simulated.
|
||||
* @return LiquidStack representing the liquid and amount actually drained from the ITankContainer
|
||||
*/
|
||||
LiquidStack drain(ForgeDirection from, int maxDrain, boolean doDrain);
|
||||
/**
|
||||
* Drains liquid out of the specified internal tank.
|
||||
* @param from Orientation the liquid is drained to.
|
||||
* @param maxDrain Maximum amount of liquid to drain.
|
||||
* @param doDrain If false draining will only be simulated.
|
||||
* @return LiquidStack representing the liquid and amount actually drained from the ITankContainer
|
||||
*/
|
||||
LiquidStack drain(int tankIndex, int maxDrain, boolean doDrain);
|
||||
/**
|
||||
* Drains liquid out of internal tanks, distribution is left to the ITankContainer.
|
||||
* @param from Orientation the liquid is drained to.
|
||||
* @param maxDrain Maximum amount of liquid to drain.
|
||||
* @param doDrain If false draining will only be simulated.
|
||||
* @return LiquidStack representing the liquid and amount actually drained from the ITankContainer
|
||||
*/
|
||||
LiquidStack drain(ForgeDirection from, int maxDrain, boolean doDrain);
|
||||
/**
|
||||
* Drains liquid out of the specified internal tank.
|
||||
* @param tankIndex the index of the tank to drain
|
||||
* @param maxDrain Maximum amount of liquid to drain.
|
||||
* @param doDrain If false draining will only be simulated.
|
||||
* @return LiquidStack representing the liquid and amount actually drained from the ITankContainer
|
||||
*/
|
||||
LiquidStack drain(int tankIndex, int maxDrain, boolean doDrain);
|
||||
|
||||
/**
|
||||
* @param direction tank side: UNKNOWN for default tank set
|
||||
* @return Array of {@link LiquidTank}s contained in this ITankContainer for this direction
|
||||
*/
|
||||
ILiquidTank[] getTanks(ForgeDirection direction);
|
||||
/**
|
||||
* @param direction tank side: UNKNOWN for default tank set
|
||||
* @return Array of {@link LiquidTank}s contained in this ITankContainer for this direction
|
||||
*/
|
||||
ILiquidTank[] getTanks(ForgeDirection direction);
|
||||
|
||||
/**
|
||||
* Return the tank that this tank container desired to be used for the specified liquid type from the specified direction
|
||||
*
|
||||
* @param direction the direction
|
||||
* @param type the liquid type, null is always an acceptable value
|
||||
* @return a tank or null for no such tank
|
||||
*/
|
||||
ILiquidTank getTank(ForgeDirection direction, LiquidStack type);
|
||||
/**
|
||||
* Return the tank that this tank container desired to be used for the specified liquid type from the specified direction
|
||||
*
|
||||
* @param direction the direction
|
||||
* @param type the liquid type, null is always an acceptable value
|
||||
* @return a tank or null for no such tank
|
||||
*/
|
||||
ILiquidTank getTank(ForgeDirection direction, LiquidStack type);
|
||||
|
||||
}
|
||||
|
|
|
@ -14,18 +14,18 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class LiquidContainerData {
|
||||
|
||||
public final LiquidStack stillLiquid;
|
||||
public final ItemStack filled;
|
||||
public final ItemStack container;
|
||||
public final LiquidStack stillLiquid;
|
||||
public final ItemStack filled;
|
||||
public final ItemStack container;
|
||||
|
||||
|
||||
public LiquidContainerData(LiquidStack stillLiquid, ItemStack filled, ItemStack container) {
|
||||
this.stillLiquid = stillLiquid;
|
||||
this.filled = filled;
|
||||
this.container = container;
|
||||
public LiquidContainerData(LiquidStack stillLiquid, ItemStack filled, ItemStack container) {
|
||||
this.stillLiquid = stillLiquid;
|
||||
this.filled = filled;
|
||||
this.container = container;
|
||||
|
||||
if(stillLiquid == null || filled == null || container == null)
|
||||
throw new RuntimeException("stillLiquid, filled, or container is null, this is an error");
|
||||
}
|
||||
if(stillLiquid == null || filled == null || container == null)
|
||||
throw new RuntimeException("stillLiquid, filled, or container is null, this is an error");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public abstract class LiquidDictionary
|
|||
*
|
||||
* @param name the name of the liquid
|
||||
* @param liquid the liquid to use if one doesn't exist
|
||||
* @return
|
||||
* @return the matching liquid stack
|
||||
*/
|
||||
public static LiquidStack getOrCreateLiquid(String name, LiquidStack liquid)
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ public abstract class LiquidDictionary
|
|||
*
|
||||
* @param name the name of the liquid
|
||||
* @param amount the amout of liquid
|
||||
* @return
|
||||
* @return a liquidstack for the requested liquid
|
||||
*/
|
||||
public static LiquidStack getLiquid(String name, int amount)
|
||||
{
|
||||
|
@ -75,8 +75,6 @@ public abstract class LiquidDictionary
|
|||
/**
|
||||
* Fired when a new liquid is created
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
public static class LiquidRegisterEvent extends Event
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ public class LiquidStack
|
|||
this.itemMeta = itemDamage;
|
||||
}
|
||||
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbt)
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound nbt)
|
||||
{
|
||||
nbt.setShort("Id", (short)itemID);
|
||||
nbt.setInteger("Amount", amount);
|
||||
|
@ -90,7 +90,7 @@ public class LiquidStack
|
|||
* Reads a liquid stack from the passed nbttagcompound and returns it.
|
||||
*
|
||||
* @param nbt
|
||||
* @return
|
||||
* @return the liquid stack
|
||||
*/
|
||||
public static LiquidStack loadLiquidStackFromNBT(NBTTagCompound nbt)
|
||||
{
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue