Unnecessary modifier in interfaces

This commit is contained in:
thatsIch
2015-03-26 11:03:30 +01:00
parent 6aeca93b85
commit 14df50dbf3
32 changed files with 113 additions and 98 deletions
@@ -36,42 +36,42 @@ public interface IGrinderEntry
*
* @return input that the grinder will accept.
*/
public ItemStack getInput();
ItemStack getInput();
/**
* lets you change the grinder recipe by changing its input.
*
* @param input input item
*/
public void setInput(ItemStack input);
void setInput( ItemStack input );
/**
* gets the current output
*
* @return output that the grinder will produce
*/
public ItemStack getOutput();
ItemStack getOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
public ItemStack getOptionalOutput();
ItemStack getOptionalOutput();
/**
* gets the current output
*
* @return output that the grinder will produce
*/
public ItemStack getSecondOptionalOutput();
ItemStack getSecondOptionalOutput();
/**
* allows you to change the output.
*
* @param output output item
*/
public void setOutput(ItemStack output);
void setOutput( ItemStack output );
/**
* stack, and 0.0-1.0 chance that it will be generated.
@@ -79,14 +79,14 @@ public interface IGrinderEntry
* @param output output item
* @param chance generation chance
*/
public void setOptionalOutput(ItemStack output, float chance);
void setOptionalOutput( ItemStack output, float chance );
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return chance of optional output
*/
public float getOptionalChance();
float getOptionalChance();
/**
* stack, and 0.0-1.0 chance that it will be generated.
@@ -94,26 +94,26 @@ public interface IGrinderEntry
* @param output second optional output item
* @param chance second optional output chance
*/
public void setSecondOptionalOutput(ItemStack output, float chance);
void setSecondOptionalOutput( ItemStack output, float chance );
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return second optional output chance
*/
public float getSecondOptionalChance();
float getSecondOptionalChance();
/**
* Energy cost, in turns.
*
* @return number of turns it takes to produce the output from the input.
*/
public int getEnergyCost();
int getEnergyCost();
/**
* Allows you to adjust the number of turns
*
* @param c number of turns to produce output.
*/
public void setEnergyCost(int c);
void setEnergyCost( int c );
}
@@ -23,10 +23,11 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
import java.util.List;
import net.minecraft.item.ItemStack;
/**
* Lets you manipulate Grinder Recipes, by adding or editing existing ones.
*/
@@ -38,7 +39,7 @@ public interface IGrinderRegistry
*
* @return currentlyRegisteredRecipes
*/
public List<IGrinderEntry> getRecipes();
List<IGrinderEntry> getRecipes();
/**
* add a new recipe the easy way, in &#8594; out, how many turns., duplicates will not be added.
@@ -47,7 +48,7 @@ public interface IGrinderRegistry
* @param out output
* @param turns amount of turns to turn the input into the output
*/
public void addRecipe(ItemStack in, ItemStack out, int turns);
void addRecipe( ItemStack in, ItemStack out, int turns );
/**
* add a new recipe with optional outputs, duplicates will not be added.
@@ -79,6 +80,6 @@ public interface IGrinderRegistry
* @param input input
* @return identified recipe or null
*/
public IGrinderEntry getRecipeForInput(ItemStack input);
IGrinderEntry getRecipeForInput( ItemStack input );
}
@@ -26,8 +26,8 @@ package appeng.api.features;
public interface IItemComparison
{
public boolean sameAsPrecise(IItemComparison comp);
boolean sameAsPrecise( IItemComparison comp );
public boolean sameAsFuzzy(IItemComparison comp);
boolean sameAsFuzzy( IItemComparison comp );
}
@@ -48,6 +48,6 @@ public interface IItemComparisonProvider
* @param stack item
* @return true, if getComparison will return a valid IItemComparison Object
*/
public boolean canHandle(ItemStack stack);
boolean canHandle( ItemStack stack );
}
@@ -23,7 +23,9 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
import appeng.api.config.TunnelType;
/**
@@ -41,7 +43,7 @@ public interface IP2PTunnelRegistry
* @param type
* - the type of tunnel
*/
public abstract void addNewAttunement(ItemStack trigger, TunnelType type);
void addNewAttunement( ItemStack trigger, TunnelType type );
/**
* returns null if no attunement can be found.
@@ -58,7 +58,7 @@ public interface IRecipeHandlerRegistry
/**
* @return a new recipe handler, which can be used to parse, and read recipe files.
*/
public IRecipeHandler createNewRecipehandler();
IRecipeHandler createNewRecipehandler();
/**
* resolve sub items by name.
@@ -45,6 +45,6 @@ public interface ISpecialComparisonRegistry
*
* @param prov comparison provider
*/
public void addComparisonProvider(IItemComparisonProvider prov);
void addComparisonProvider( IItemComparisonProvider prov );
}
@@ -29,16 +29,16 @@ import net.minecraft.world.WorldProvider;
public interface IWorldGen
{
public enum WorldGenType
enum WorldGenType
{
CertusQuartz, ChargedCertusQuartz, Meteorites
}
public void disableWorldGenForProviderID(WorldGenType type, Class<? extends WorldProvider> provider);
void disableWorldGenForProviderID( WorldGenType type, Class<? extends WorldProvider> provider );
public void enableWorldGenForDimension(WorldGenType type, int dimID);
void enableWorldGenForDimension( WorldGenType type, int dimID );
public void disableWorldGenForDimension(WorldGenType type, int dimID);
void disableWorldGenForDimension( WorldGenType type, int dimID );
boolean isWorldGenEnabled(WorldGenType type, World w);
@@ -28,5 +28,5 @@ import net.minecraft.item.ItemStack;
public interface IGuiItemObject
{
public ItemStack getItemStack();
ItemStack getItemStack();
}
@@ -23,7 +23,9 @@
package appeng.api.implementations.items;
import net.minecraft.item.ItemStack;
import appeng.api.config.AccessRestriction;
import appeng.api.networking.energy.IAEPowerStorage;
@@ -39,7 +41,7 @@ public interface IAEItemPowerStorage
*
* @return amount unable to be stored
*/
public double injectAEPower(ItemStack is, double amt);
double injectAEPower( ItemStack is, double amt );
/**
* Attempt to extract power from the device, it will extract what it can and
@@ -48,17 +50,17 @@ public interface IAEItemPowerStorage
* @param amt to be extracted power from device
* @return what it could extract
*/
public double extractAEPower(ItemStack is, double amt);
double extractAEPower( ItemStack is, double amt );
/**
* @return the current maximum power ( this can change :P )
*/
public double getAEMaxPower(ItemStack is);
double getAEMaxPower( ItemStack is );
/**
* @return the current AE Power Level, this may exceed getMEMaxPower()
*/
public double getAECurrentPower(ItemStack is);
double getAECurrentPower( ItemStack is );
/**
* Control the power flow by telling what the network can do, either add? or
@@ -66,6 +68,6 @@ public interface IAEItemPowerStorage
*
* @return access restriction of network
*/
public AccessRestriction getPowerFlow(ItemStack is);
AccessRestriction getPowerFlow( ItemStack is );
}
@@ -40,7 +40,7 @@ public interface IGrid
* @param iface face
* @return the IGridCache you requested.
*/
public <C extends IGridCache> C getCache(Class<? extends IGridCache> iface);
<C extends IGridCache> C getCache( Class<? extends IGridCache> iface );
/**
* Post an event into the network event bus.
@@ -49,7 +49,7 @@ public interface IGrid
* - event to post
* @return returns ev back to original poster
*/
public MENetworkEvent postEvent(MENetworkEvent ev);
MENetworkEvent postEvent( MENetworkEvent ev );
/**
* Post an event into the network event bus, but direct it at a single node.
@@ -58,7 +58,7 @@ public interface IGrid
* event to post
* @return returns ev back to original poster
*/
public MENetworkEvent postEventTo(IGridNode node, MENetworkEvent ev);
MENetworkEvent postEventTo( IGridNode node, MENetworkEvent ev );
/**
* get a list of the diversity of classes, you can use this to better detect which machines your interested in,
@@ -66,7 +66,7 @@ public interface IGrid
*
* @return IReadOnlyCollection of all available host types (Of Type IGridHost).
*/
public IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
/**
* Get machines on the network.
@@ -74,7 +74,7 @@ public interface IGrid
* @param gridHostClass class of the grid host
* @return IMachineSet of all nodes belonging to hosts of specified class.
*/
public IMachineSet getMachines(Class<? extends IGridHost> gridHostClass);
IMachineSet getMachines( Class<? extends IGridHost> gridHostClass );
/**
* @return IReadOnlyCollection for all nodes on the network, node visitors are preferred.
@@ -84,11 +84,11 @@ public interface IGrid
/**
* @return true if the last node has been removed from the grid.
*/
public boolean isEmpty();
boolean isEmpty();
/**
* @return the node considered the pivot point of the grid.
*/
public IGridNode getPivot();
IGridNode getPivot();
}
@@ -23,13 +23,15 @@
package appeng.api.networking;
import appeng.api.parts.IPart;
import appeng.api.util.AEColor;
import appeng.api.util.DimensionalCoord;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.EnumSet;
import appeng.api.parts.IPart;
import appeng.api.util.AEColor;
import appeng.api.util.DimensionalCoord;
/**
* An Implementation is required to create your node for IGridHost
@@ -85,7 +87,7 @@ public interface IGridBlock
* @param grid grid
* @param channelsInUse used channels
*/
public void setNetworkStatus(IGrid grid, int channelsInUse);
void setNetworkStatus( IGrid grid, int channelsInUse );
/**
* Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
@@ -108,5 +110,5 @@ public interface IGridBlock
*
* @return the render item stack to use to render this node, null is valid, and will not show this node.
*/
public ItemStack getMachineRepresentation();
ItemStack getMachineRepresentation();
}
@@ -32,6 +32,6 @@ public interface IGridConnectionVisitor extends IGridVisitor
* @param n
* the connection.
*/
public void visitConnection(IGridConnection n);
void visitConnection( IGridConnection n );
}
@@ -23,8 +23,10 @@
package appeng.api.networking;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.parts.IPart;
import appeng.api.util.AECableType;
@@ -48,7 +50,7 @@ public interface IGridHost
* @return a new IGridNode, create these with
* AEApi.INSTANCE().createGridNode( MyIGridBlock )
*/
public IGridNode getGridNode(ForgeDirection dir);
IGridNode getGridNode( ForgeDirection dir );
/**
* Determines how cables render when they connect to this block. Priority is
@@ -56,11 +58,11 @@ public interface IGridHost
*
* @param dir direction
*/
public AECableType getCableConnectionType(ForgeDirection dir);
AECableType getCableConnectionType( ForgeDirection dir );
/**
* break this host, its violating security rules, just break your block, or part.
*/
public void securityBreak();
void securityBreak();
}
@@ -39,6 +39,6 @@ public interface IGridVisitor
*
* @return true to continue visiting nodes beyond this node.
*/
public boolean visitNode(IGridNode n);
boolean visitNode( IGridNode n );
}
@@ -32,6 +32,6 @@ public interface ICraftingCallback
* @param job
* - final job
*/
public void calculationComplete(ICraftingJob job);
void calculationComplete( ICraftingJob job );
}
@@ -40,17 +40,17 @@ public interface IAEPowerStorage extends IEnergySource
*
* @return amount of power which was unable to be stored
*/
public double injectAEPower(double amt, Actionable mode);
double injectAEPower( double amt, Actionable mode );
/**
* @return the current maximum power ( this can change :P )
*/
public double getAEMaxPower();
double getAEMaxPower();
/**
* @return the current AE Power Level, this may exceed getMEMaxPower()
*/
public double getAECurrentPower();
double getAECurrentPower();
/**
* Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control
@@ -58,13 +58,13 @@ public interface IAEPowerStorage extends IEnergySource
*
* @return true if it can be used as a public power storage
*/
public boolean isAEPublicPowerStorage();
boolean isAEPublicPowerStorage();
/**
* Control the power flow by telling what the network can do, either add? or subtract? or both!
*
* @return access restriction what the network can do
*/
public AccessRestriction getPowerFlow();
AccessRestriction getPowerFlow();
}
@@ -36,18 +36,18 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
/**
* @return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
*/
public double getIdlePowerUsage();
double getIdlePowerUsage();
/**
* @return the average power drain over the past 10 ticks, includes idle usage during this time, and all use of
* extractPower.
*/
public double getAvgPowerUsage();
double getAvgPowerUsage();
/**
* @return the average energy injected into the system per tick, for the last 10 ticks.
*/
public double getAvgPowerInjection();
double getAvgPowerInjection();
/**
* AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation
@@ -59,7 +59,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
*
* @return if the network is powered or not.
*/
public boolean isNetworkPowered();
boolean isNetworkPowered();
/**
* AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time.
@@ -78,14 +78,14 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
* should the action be simulated or performed?
* @return the amount of power that the network has OVER the limit.
*/
public double injectPower(double amt, Actionable mode);
double injectPower( double amt, Actionable mode );
/**
* this is should be considered an estimate, and not relied upon for real calculations.
*
* @return estimated available power.
*/
public double getStoredPower();
double getStoredPower();
/**
* this is should be considered an estimate, and not relied upon for real calculations.
@@ -100,6 +100,6 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
*
* @return Amount of power required to charge the grid, in AE.
*/
public double getEnergyDemand(double maxRequired);
double getEnergyDemand( double maxRequired );
}
@@ -36,16 +36,16 @@ public interface IEnergyGridProvider
/**
* internal use only
*/
public double extractAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen);
double extractAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
/**
* internal use only
*/
public double injectAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen);
double injectAEPower( double amt, Actionable mode, Set<IEnergyGrid> seen );
/**
* internal use only
*/
public double getEnergyDemand(double d, Set<IEnergyGrid> seen);
double getEnergyDemand( double d, Set<IEnergyGrid> seen );
}
@@ -36,6 +36,6 @@ public interface IEnergySource
* @param mode should the action be simulated or performed?
* @return returns extracted power.
*/
public double extractAEPower(double amt, Actionable mode, PowerMultiplier usePowerMultiplier);
double extractAEPower( double amt, Actionable mode, PowerMultiplier usePowerMultiplier );
}
@@ -23,12 +23,13 @@
package appeng.api.recipes;
import java.util.List;
import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RecipeError;
import appeng.api.exceptions.RegistrationError;
import java.util.List;
public interface ICraftHandler
{
@@ -39,7 +40,7 @@ public interface ICraftHandler
* @param output parsed outputs
* @throws RecipeError
*/
public void setup(List<List<IIngredient>> input, List<List<IIngredient>> output) throws RecipeError;
void setup( List<List<IIngredient>> input, List<List<IIngredient>> output ) throws RecipeError;
/**
* called when all recipes are parsed, and your required to register your recipe.
@@ -47,6 +48,6 @@ public interface ICraftHandler
* @throws RegistrationError
* @throws MissingIngredientError
*/
public void register() throws RegistrationError, MissingIngredientError;
void register() throws RegistrationError, MissingIngredientError;
}
@@ -23,7 +23,9 @@
package appeng.api.recipes;
import net.minecraft.item.ItemStack;
import appeng.api.exceptions.MissingIngredientError;
import appeng.api.exceptions.RegistrationError;
@@ -55,27 +57,27 @@ public interface IIngredient {
*
* @return true if this slot contains no ItemStack, this is passed as "_"
*/
public boolean isAir();
boolean isAir();
/**
* @return The Name Space of the item. Prefer getItemStack or getItemStackSet
*/
public String getNameSpace();
String getNameSpace();
/**
* @return The Name of the item. Prefer getItemStack or getItemStackSet
*/
public String getItemName();
String getItemName();
/**
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
*/
public int getDamageValue();
int getDamageValue();
/**
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
*/
public int getQty();
int getQty();
/**
* Bakes the lists in for faster runtime look-ups.
@@ -31,6 +31,6 @@ public interface ISubItemResolver
* @param fullName name of sub item
* @return either a ResolveResult, or a ResolverResultSet
*/
public Object resolveItemByName(String namespace, String fullName);
Object resolveItemByName( String namespace, String fullName );
}
@@ -40,7 +40,7 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
*
* @return the access
*/
public AccessRestriction getAccess();
AccessRestriction getAccess();
/**
* determine if a particular item is prioritized for this inventory handler, if it is, then it will be added to this
@@ -50,7 +50,7 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* - item that might be added
* @return if its prioritized
*/
public boolean isPrioritized(StackType input);
boolean isPrioritized( StackType input );
/**
* determine if an item can be accepted and stored.
@@ -59,14 +59,14 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* - item that might be added
* @return if the item can be added
*/
public boolean canAccept(StackType input);
boolean canAccept( StackType input );
/**
* determine what the priority of the inventory is.
*
* @return the priority, zero is default, positive and negative are supported.
*/
public int getPriority();
int getPriority();
/**
* pass back value for blinkCell.
@@ -75,7 +75,7 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* {@link ICellContainer} will be called with this value, only trust the return value of this method if you
* are the implementer of this.
*/
public int getSlot();
int getSlot();
/**
* AE Uses a two pass placement system, the first pass checks contents and tries to find a place where the item
@@ -86,5 +86,5 @@ public interface IMEInventoryHandler<StackType extends IAEStack> extends IMEInve
* - pass number ( 1 or 2 )
* @return true, if this inventory is valid for this pass.
*/
public boolean validForPass(int i);
boolean validForPass( int i );
}
@@ -54,7 +54,7 @@ public interface IAEFluidStack extends IAEStack<IAEFluidStack>
* @return the copy.
*/
@Override
public IAEFluidStack copy();
IAEFluidStack copy();
/**
* Combines two IAEItemStacks via addition.
@@ -44,7 +44,7 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
*
* @return new ItemStack
*/
public ItemStack getItemStack();
ItemStack getItemStack();
/**
* create a AE Item clone
@@ -52,7 +52,7 @@ public interface IAEItemStack extends IAEStack<IAEItemStack>
* @return the copy
*/
@Override
public IAEItemStack copy();
IAEItemStack copy();
/**
* is there NBT Data for this item?
@@ -23,7 +23,9 @@
package appeng.api.storage.data;
import net.minecraft.nbt.NBTTagCompound;
import appeng.api.features.IItemComparison;
/**
@@ -37,7 +39,7 @@ public interface IAETagCompound
/**
* @return a copy ( the copy will not be a IAETagCompound, it will be a NBTTagCompound )
*/
public NBTTagCompound getNBTTagCompoundCopy();
NBTTagCompound getNBTTagCompoundCopy();
/**
* compare to other NBTTagCompounds or IAETagCompounds
@@ -23,10 +23,11 @@
package appeng.api.storage.data;
import appeng.api.config.FuzzyMode;
import java.util.Collection;
import appeng.api.config.FuzzyMode;
/**
* Represents a list of items in AE.
*
@@ -42,7 +43,7 @@ public interface IItemContainer<StackType extends IAEStack>
*
* @param option added stack
*/
public void add(StackType option); // adds stack as is
void add( StackType option ); // adds stack as is
/**
* @param i compared item
@@ -55,11 +56,11 @@ public interface IItemContainer<StackType extends IAEStack>
* @param input compared item
* @return a list of relevant fuzzy matched stacks
*/
public Collection<StackType> findFuzzy(StackType input, FuzzyMode fuzzy);
Collection<StackType> findFuzzy( StackType input, FuzzyMode fuzzy );
/**
* @return true if there are no items in the list
*/
public boolean isEmpty();
boolean isEmpty();
}
@@ -41,14 +41,14 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
*
* @param option stacktype option
*/
public void addStorage(StackType option); // adds a stack as stored
void addStorage( StackType option ); // adds a stack as stored
/**
* add a stack to the list as craftable, this will merge the stack with an item already in the list if found.
*
* @param option stacktype option
*/
public void addCrafting(StackType option);
void addCrafting( StackType option );
/**
* add a stack to the list, stack size is used to add to requestable, this will merge the stack with an item already
@@ -56,7 +56,7 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
*
* @param option stacktype option
*/
public void addRequestable(StackType option); // adds a stack as requestable
void addRequestable( StackType option ); // adds a stack as requestable
/**
* @return the first item in the list
@@ -72,7 +72,7 @@ public interface IItemList<StackType extends IAEStack> extends IItemContainer<St
* allows you to iterate the list.
*/
@Override
public Iterator<StackType> iterator();
Iterator<StackType> iterator();
/**
* resets stack sizes to 0.