Remove AE2 rv1 support, update API to rv2

This commit is contained in:
tterrag1098 committed 2014-12-30 10:22:38 -05:00
1 parent e17c938814
commit 97bdb5f209
153 files changed
+2747 -2659

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
*.class
# Package Files #
*.jar
*.war
*.ear
+4 -4
View File
@@ -54,16 +54,16 @@ public interface IAppEngApi
/**
* create a grid node for your {@link IGridHost}
*
* @param block
* @return
* @param block grid block
* @return grid node of block
*/
IGridNode createGridNode(IGridBlock block);
/**
* create a connection between two {@link IGridNode}
*
* @param a
* @param b
* @param a to be connected gridnode
* @param b to be connected gridnode
* @throws FailedConnection
*/
IGridConnection createGridConnection(IGridNode a, IGridNode b) throws FailedConnection;
+20
View File
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2013 AlgorithmX2
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+19
View File
@@ -0,0 +1,19 @@
Applied-Energistics-2-API
=========================
The API for Applied Energistics 2. It is open source to discuss changes, improve documentation, and provide better add-on support in general.
Development and standard builds can be obtained [Here](http://ae2.ae-mod.info/Downloads/).
Maven
=========================
When compiling against the AE2 API you can use gradle dependencies, just add
dependencies {
compile "appeng:appliedenergistics2:rv_-_____-__:dev"
}
or add the compile line to your existing dependencies task to your build.gradle
Where the __ are filled in with the correct version criteria; AE2 is available from the default forge maven so no additional repositories are necessary.
@@ -4,30 +4,30 @@ public enum AccessRestriction
{
NO_ACCESS(0), READ(1), WRITE(2), READ_WRITE(3);
private final int permisionBit;
private final int permissionBit;
private AccessRestriction(int v) {
permisionBit = v;
permissionBit = v;
}
public boolean hasPermission(AccessRestriction ar)
{
return (permisionBit & ar.permisionBit) == ar.permisionBit;
return (permissionBit & ar.permissionBit) == ar.permissionBit;
}
public AccessRestriction restrictPermissions(AccessRestriction ar)
{
return getPermByBit( permisionBit & ar.permisionBit );
return getPermByBit( permissionBit & ar.permissionBit);
}
public AccessRestriction addPermissions(AccessRestriction ar)
{
return getPermByBit( permisionBit | ar.permisionBit );
return getPermByBit( permissionBit | ar.permissionBit);
}
public AccessRestriction removePermissions(AccessRestriction ar)
{
return getPermByBit( permisionBit & (~ar.permisionBit) );
return getPermByBit( permissionBit & (~ar.permissionBit) );
}
private AccessRestriction getPermByBit(int bit)
@@ -1,7 +1,7 @@
package appeng.api.config;
public enum CondenserOuput
public enum CondenserOutput
{
TRASH, // 0
@@ -5,6 +5,6 @@ public enum LevelEmitterMode
STORED_AMOUNT,
STOREABLE_AMOUNT
STORABLE_AMOUNT
}
@@ -1,6 +1,6 @@
package appeng.api.config;
public enum ModSettings
{
}
package appeng.api.config;
public enum ModSettings
{
}
@@ -30,8 +30,8 @@ public enum PowerUnits
*
* will normally returns 64, as it will convert the EU, to AE with AE's power settings.
*
* @param target
* @param value
* @param target target power unit
* @param value value
* @return value converted to target units, from this units.
*/
public double convertTo(PowerUnits target, double value)
+46 -46
View File
@@ -1,46 +1,46 @@
package appeng.api.config;
import java.util.EnumSet;
public enum Settings
{
LEVEL_EMITTER_MODE(EnumSet.allOf( LevelEmitterMode.class )),
REDSTONE_EMITTER(EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL )), REDSTONE_CONTROLLED(EnumSet.allOf( RedstoneMode.class )),
CONDENSER_OUTPUT(EnumSet.allOf( CondenserOuput.class )),
POWER_UNITS(EnumSet.allOf( PowerUnits.class )), ACCESS(EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE )),
SORT_DIRECTION(EnumSet.allOf( SortDir.class )), SORT_BY(EnumSet.allOf( SortOrder.class )),
SEARCH_TOOLTIPS(EnumSet.of( YesNo.YES, YesNo.NO )), VIEW_MODE(EnumSet.allOf( ViewItems.class )), SEARCH_MODE(EnumSet.allOf( SearchBoxMode.class )),
ACTIONS(EnumSet.allOf( ActionItems.class )), IO_DIRECTION(EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT )),
BLOCK(EnumSet.of( YesNo.YES, YesNo.NO )), OPERATION_MODE(EnumSet.allOf( OperationMode.class )),
FULLNESS_MODE(EnumSet.allOf( FullnessMode.class )), CRAFT_ONLY(EnumSet.of( YesNo.YES, YesNo.NO )),
FUZZY_MODE(EnumSet.allOf( FuzzyMode.class )), LEVEL_TYPE(EnumSet.allOf( LevelType.class )),
TERMINAL_STYLE(EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL )), COPY_MODE(EnumSet.allOf( CopyMode.class )),
INTERFACE_TERMINAL(EnumSet.of( YesNo.YES, YesNo.NO )), CRAFT_VIA_REDSTONE(EnumSet.of( YesNo.YES, YesNo.NO )),
STORAGE_FILTER(EnumSet.allOf( StorageFilter.class ));
private EnumSet values;
public EnumSet getPossibleValues()
{
return values;
}
private Settings(EnumSet set) {
if ( set == null || set.isEmpty() )
throw new RuntimeException( "Invalid configuration." );
values = set;
}
}
package appeng.api.config;
import java.util.EnumSet;
public enum Settings
{
LEVEL_EMITTER_MODE(EnumSet.allOf( LevelEmitterMode.class )),
REDSTONE_EMITTER(EnumSet.of( RedstoneMode.HIGH_SIGNAL, RedstoneMode.LOW_SIGNAL )), REDSTONE_CONTROLLED(EnumSet.allOf( RedstoneMode.class )),
CONDENSER_OUTPUT(EnumSet.allOf( CondenserOutput.class )),
POWER_UNITS(EnumSet.allOf( PowerUnits.class )), ACCESS(EnumSet.of( AccessRestriction.READ_WRITE, AccessRestriction.READ, AccessRestriction.WRITE )),
SORT_DIRECTION(EnumSet.allOf( SortDir.class )), SORT_BY(EnumSet.allOf( SortOrder.class )),
SEARCH_TOOLTIPS(EnumSet.of( YesNo.YES, YesNo.NO )), VIEW_MODE(EnumSet.allOf( ViewItems.class )), SEARCH_MODE(EnumSet.allOf( SearchBoxMode.class )),
ACTIONS(EnumSet.allOf( ActionItems.class )), IO_DIRECTION(EnumSet.of( RelativeDirection.LEFT, RelativeDirection.RIGHT )),
BLOCK(EnumSet.of( YesNo.YES, YesNo.NO )), OPERATION_MODE(EnumSet.allOf( OperationMode.class )),
FULLNESS_MODE(EnumSet.allOf( FullnessMode.class )), CRAFT_ONLY(EnumSet.of( YesNo.YES, YesNo.NO )),
FUZZY_MODE(EnumSet.allOf( FuzzyMode.class )), LEVEL_TYPE(EnumSet.allOf( LevelType.class )),
TERMINAL_STYLE(EnumSet.of( TerminalStyle.TALL, TerminalStyle.SMALL )), COPY_MODE(EnumSet.allOf( CopyMode.class )),
INTERFACE_TERMINAL(EnumSet.of( YesNo.YES, YesNo.NO )), CRAFT_VIA_REDSTONE(EnumSet.of( YesNo.YES, YesNo.NO )),
STORAGE_FILTER(EnumSet.allOf( StorageFilter.class ));
private EnumSet values;
public EnumSet getPossibleValues()
{
return values;
}
private Settings(EnumSet set) {
if ( set == null || set.isEmpty() )
throw new RuntimeException( "Invalid configuration." );
values = set;
}
}
+1 -1
View File
@@ -2,5 +2,5 @@ package appeng.api.config;
public enum SortDir
{
ASCENDING, DESCENDING;
ASCENDING, DESCENDING
}
@@ -5,6 +5,6 @@ public enum StorageFilter
NONE,
EXTACTABLE_ONLY
EXTRACTABLE_ONLY
}
+15 -15
View File
@@ -1,15 +1,15 @@
package appeng.api.config;
public enum TunnelType
{
ME, // Network Tunnel
BC_POWER, // MJ Tunnel
IC2_POWER, // EU Tunnel
RF_POWER, // RF Tunnel
REDSTONE, // Redstone Tunnel
FLUID, // Fluid Tunnel
ITEM, // Item Tunnel
LIGHT, // Light Tunnel
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
COMPUTER_MESSAGE // Computer Message Tunnel
}
package appeng.api.config;
public enum TunnelType
{
ME, // Network Tunnel
BC_POWER, // MJ Tunnel
IC2_POWER, // EU Tunnel
RF_POWER, // RF Tunnel
REDSTONE, // Redstone Tunnel
FLUID, // Fluid Tunnel
ITEM, // Item Tunnel
LIGHT, // Light Tunnel
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
COMPUTER_MESSAGE // Computer Message Tunnel
}
@@ -16,7 +16,7 @@ public class Blocks
* Decorative
*/
public AEItemDefinition blockQuartz;
public AEItemDefinition blockQuartzPiller;
public AEItemDefinition blockQuartzPillar;
public AEItemDefinition blockQuartzChiseled;
public AEItemDefinition blockQuartzGlass;
public AEItemDefinition blockQuartzVibrantGlass;
@@ -32,9 +32,9 @@ public class Materials
public AEItemDefinition materialBasicCard;
public AEItemDefinition materialAdvCard;
public AEItemDefinition materialPureifiedCertusQuartzCrystal;
public AEItemDefinition materialPureifiedNetherQuartzCrystal;
public AEItemDefinition materialPureifiedFluixCrystal;
public AEItemDefinition materialPurifiedCertusQuartzCrystal;
public AEItemDefinition materialPurifiedNetherQuartzCrystal;
public AEItemDefinition materialPurifiedFluixCrystal;
public AEItemDefinition materialCell1kPart;
public AEItemDefinition materialCell4kPart;
@@ -15,7 +15,7 @@ public class LocatableEventAnnounce extends Event
{
Register, // Adds the locatable to the registry
Unregister // Removes the locatable from the registry
};
}
final public ILocatable target;
final public LocatableEvent change;
@@ -1,11 +1,11 @@
package appeng.api.exceptions;
public class MissingIngredientError extends Exception {
private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientError(String n) {
super( n );
}
}
package appeng.api.exceptions;
public class MissingIngredientError extends Exception {
private static final long serialVersionUID = -998858343831371697L;
public MissingIngredientError(String n) {
super( n );
}
}
@@ -1,12 +1,12 @@
package appeng.api.exceptions;
public class ModNotInstalled extends Exception
{
private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalled(String t) {
super( t );
}
}
package appeng.api.exceptions;
public class ModNotInstalled extends Exception
{
private static final long serialVersionUID = -9052435206368425494L;
public ModNotInstalled(String t) {
super( t );
}
}
@@ -1,12 +1,12 @@
package appeng.api.exceptions;
public class RecipeError extends Exception
{
private static final long serialVersionUID = -6602870588617670262L;
public RecipeError(String n) {
super( n );
}
}
package appeng.api.exceptions;
public class RecipeError extends Exception
{
private static final long serialVersionUID = -6602870588617670262L;
public RecipeError(String n) {
super( n );
}
}
@@ -18,7 +18,7 @@ public interface IGrinderEntry
/**
* lets you change the grinder recipe by changing its input.
*
* @param input
* @param input input item
*/
public void setInput(ItemStack input);
@@ -46,37 +46,37 @@ public interface IGrinderEntry
/**
* allows you to change the output.
*
* @param output
* @param output output item
*/
public void setOutput(ItemStack output);
/**
* stack, and 0.0-1.0 chance that it will be generated.
*
* @param output
* @param chance
* @param output output item
* @param chance generation chance
*/
public void setOptionalOutput(ItemStack output, float chance);
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return
* @return chance of optional output
*/
public float getOptionalChance();
/**
* stack, and 0.0-1.0 chance that it will be generated.
*
* @param output
* @param chance
* @param output second optional output item
* @param chance second optional output chance
*/
public void setSecondOptionalOutput(ItemStack output, float chance);
/**
* 0.0 - 1.0 the chance that the optional output will be generated.
*
* @return
* @return second optional output chance
*/
public float getSecondOptionalChance();
@@ -90,7 +90,7 @@ public interface IGrinderEntry
/**
* Allows you to adjust the number of turns
*
* @param new number of turns to produce output.
* @param c number of turns to produce output.
*/
public void setEnergyCost(int c);
}
@@ -1,9 +1,9 @@
package appeng.api.features;
import java.util.List;
import net.minecraft.item.ItemStack;
import java.util.List;
/**
* Lets you manipulate Grinder Recipes, by adding or editing existing ones.
*/
@@ -13,12 +13,12 @@ public interface IGrinderRegistry
/**
* Current list of registered recipes, you can modify this if you want too.
*
* @return currentlyRegistredRecipes
* @return currentlyRegisteredRecipes
*/
public List<IGrinderEntry> getRecipes();
/**
* add a new recipe the easy way, in -> out, how many turns., duplicates will not be added.
* add a new recipe the easy way, in &#8594; out, how many turns., duplicates will not be added.
*
* @param in input
* @param out output
@@ -7,14 +7,14 @@ import net.minecraft.item.ItemStack;
* if the comparison function handles the item, by trying to request a
* IItemComparison class.
*/
public interface IItemComparisionProvider
public interface IItemComparisonProvider
{
/**
* should return a new IItemComparison, or return null if it doesn't handle
* the supplied item.
*
* @param is
* @param is item
* @return IItemComparison, or null
*/
IItemComparison getComparison(ItemStack is);
@@ -22,7 +22,7 @@ public interface IItemComparisionProvider
/**
* Simple test for support ( AE generally skips this and calls the above function. )
*
* @param stack
* @param stack item
* @return true, if getComparison will return a valid IItemComparison Object
*/
public boolean canHandle(ItemStack stack);
@@ -10,9 +10,9 @@ public interface ILocatableRegistry
* Attempts to find the object with the serial specified, if it can it
* returns the object.
*
* @param ser
* @param serial serial
* @return requestedObject, or null
*/
public abstract Object findLocateableBySerial(long ser);
public abstract Object findLocatableBySerial(long serial);
}
@@ -8,15 +8,15 @@ public interface IMatterCannonAmmoRegistry
/**
* register a new ammo, generally speaking this is based off of atomic weight to make it easier to guess at
*
* @param ammo
* @param weight
* @param ammo new ammo
* @param weight atomic weight
*/
void registerAmmo(ItemStack ammo, double weight);
/**
* get the penetration value for a particular ammo, 0 indicates a non-ammo.
*
* @param is
* @param is ammo
* @return 0 or a valid penetration value.
*/
float getPenetration(ItemStack is);
@@ -1,28 +1,27 @@
package appeng.api.features;
import net.minecraft.item.ItemStack;
public interface INetworkEncodable {
/**
* Used to get the current key from the item.
*
* @param player
* @param item
* @return
*/
String getEncryptionKey(ItemStack item);
/**
* Encode the wireless frequency via the Controller.
*
* @param item
* the wireless terminal.
* @param encKey
* the wireless encryption key.
* @param name
* null for now.
*/
void setEncryptionKey(ItemStack item, String encKey, String name);
}
package appeng.api.features;
import net.minecraft.item.ItemStack;
public interface INetworkEncodable {
/**
* Used to get the current key from the item.
*
* @param item item
* @return string key of item
*/
String getEncryptionKey(ItemStack item);
/**
* Encode the wireless frequency via the Controller.
*
* @param item
* the wireless terminal.
* @param encKey
* the wireless encryption key.
* @param name
* null for now.
*/
void setEncryptionKey(ItemStack item, String encKey, String name);
}
@@ -23,8 +23,8 @@ public interface IP2PTunnelRegistry
/**
* returns null if no attunement can be found.
*
* @param trigger
* @return
* @param trigger attunement trigger
* @return null if no attunement can be found or attunement
*/
TunnelType getTunnelTypeByItem(ItemStack trigger);
@@ -12,15 +12,21 @@ public interface IPlayerRegistry
{
/**
* @param player
* @param gameProfile user game profile
* @return user id of a username.
*/
int getID(GameProfile gameProfile);
/**
* @param player
* @param player player
* @return user id of a player entity.
*/
int getID(EntityPlayer player);
/**
* @param playerID to be found player id
* @return PlayerEntity, or null if the player could not be found.
*/
EntityPlayer findPlayer(int playerID);
}
@@ -1,48 +1,49 @@
package appeng.api.features;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.ISubItemResolver;
public interface IRecipeHandlerRegistry
{
/**
* Add a new Recipe Handler to the parser.
*
* MUST BE CALLED IN PRE-INIT
*
* @param name
* @param handler
*/
void addNewCraftHandler(String name, Class<? extends ICraftHandler> handler);
/**
* Add a new resolver to the parser.
*
* MUST BE CALLED IN PRE-INIT
*
* @param sir
*/
void addNewSubItemResolver(ISubItemResolver sir);
/**
* @param name
* @return A recipe handler by name, returns null on failure.
*/
ICraftHandler getCraftHandlerFor(String name);
/**
* @return a new recipe handler, which can be used to parse, and read recipe files.
*/
public IRecipeHandler createNewRecipehandler();
/**
* resolve sub items by name.
*
* @param tmpName
* @return ResolerResult or ResolverResultSet
*/
Object resolveItem(String nameSpace, String itemName);
}
package appeng.api.features;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.ISubItemResolver;
public interface IRecipeHandlerRegistry
{
/**
* Add a new Recipe Handler to the parser.
*
* MUST BE CALLED IN PRE-INIT
*
* @param name name of crafthandler
* @param handler class of crafthandler
*/
void addNewCraftHandler(String name, Class<? extends ICraftHandler> handler);
/**
* Add a new resolver to the parser.
*
* MUST BE CALLED IN PRE-INIT
*
* @param sir sub item resolver
*/
void addNewSubItemResolver(ISubItemResolver sir);
/**
* @param name name of crafting handler
* @return A recipe handler by name, returns null on failure.
*/
ICraftHandler getCraftHandlerFor(String name);
/**
* @return a new recipe handler, which can be used to parse, and read recipe files.
*/
public IRecipeHandler createNewRecipehandler();
/**
* resolve sub items by name.
*
* @param nameSpace namespace of item
* @param itemName full name of item
* @return ResolverResult or ResolverResultSet
*/
Object resolveItem(String nameSpace, String itemName);
}
@@ -11,7 +11,7 @@ public interface IRegistryContainer
/**
* Use the movable registry to white list your tiles.
*/
IMovableRegistry moveable();
IMovableRegistry movable();
/**
* Add new Grid Caches for use during run time, only use during loading phase.
@@ -20,19 +20,19 @@ public interface IRegistryContainer
/**
* Add additional storage bus handlers to improve interplay with mod blocks that contains special inventories that
* function unlike vanilla chests. AE uses this internally for barrels, dsu's, quantum chests, AE Networks and more.
* function unlike vanilla chests. AE uses this internally for barrels, DSU's, quantum chests, AE Networks and more.
*/
IExternalStorageRegistry externalStorage();
/**
* Add additional special comparison functionality, AE Uses this internally for Bees.
*/
ISpecialComparisonRegistry specialComparson();
ISpecialComparisonRegistry specialComparison();
/**
* Lets you register your items as wireless terminals
*/
IWirelessTermRegistery wireless();
IWirelessTermRegistry wireless();
/**
* Allows you to register new cell types, these will function in drives
@@ -47,7 +47,7 @@ public interface IRegistryContainer
/**
* get access to the locatable registry
*/
ILocatableRegistry locateable();
ILocatableRegistry locatable();
/**
* get access to the p2p tunnel registry.
@@ -12,16 +12,16 @@ public interface ISpecialComparisonRegistry
/**
* return TheHandler or null.
*
* @param stack
* @param stack item
* @return a handler it found for a specific item
*/
IItemComparison getSpecialComparion(ItemStack stack);
IItemComparison getSpecialComparison(ItemStack stack);
/**
* Register a new special comparison function with AE.
*
* @param prov
* @param prov comparison provider
*/
public void addComparisonProvider(IItemComparisionProvider prov);
public void addComparisonProvider(IItemComparisonProvider prov);
}
@@ -11,7 +11,7 @@ public interface IWirelessTermHandler extends INetworkEncodable
{
/**
* @param is
* @param is wireless terminal
* @return true, if usePower, hasPower, etc... can be called for the provided item
*/
boolean canHandle(ItemStack is);
@@ -22,24 +22,24 @@ public interface IWirelessTermHandler extends INetworkEncodable
* @param amount
* is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
* hasPower
* @param is
* @return
* @param is wireless terminal
* @return true if wireless terminal uses power
*/
boolean usePower(EntityPlayer player, double amount, ItemStack is);
/**
* gets the power status of the item.
*
* @param is
* @param is wireless terminal
* @return returns true if there is any power left.
*/
boolean hasPower(EntityPlayer player, double amount, ItemStack is);
/**
* Return the config manage for the wireless terminal.
* Return the config manager for the wireless terminal.
*
* @param is
* @return
* @param is wireless terminal
* @return config manager of wireless terminal
*/
IConfigManager getConfigManager(ItemStack is);
@@ -7,24 +7,24 @@ import net.minecraft.world.World;
/**
* Registration record for a Custom Cell handler.
*/
public interface IWirelessTermRegistery
public interface IWirelessTermRegistry
{
/**
* add this handler to the list of other wireless handler.
*
* @param handler
* @param handler wireless handler
*/
void registerWirelessHandler(IWirelessTermHandler handler);
/**
* @param is
* @param is item which might have a handler
* @return true if there is a handler for this item
*/
boolean isWirelessTerminal(ItemStack is);
/**
* @param is
* @param is item with handler
* @return a register handler for the item in question, or null if there
* isn't one
*/
@@ -34,6 +34,6 @@ public interface IWirelessTermRegistery
* opens the wireless terminal gui, the wireless terminal item, must be in
* the active slot on the tool bar.
*/
void OpenWirelessTermainlGui(ItemStack item, World w, EntityPlayer player);
void openWirelessTerminalGui(ItemStack item, World w, EntityPlayer player);
}
}
@@ -8,12 +8,14 @@ public interface IWorldGen
public enum WorldGenType
{
CertusQuartz, ChargedCertusQuartz, Metorites
};
CertusQuartz, ChargedCertusQuartz, Meteorites
}
public void disableWorldGenForProviderID(WorldGenType type, Class<? extends WorldProvider> provider);
public void disableWorldGenForDimension(WorldGenType type, int dimid);
public void enableWorldGenForDimension(WorldGenType type, int dimID);
public void disableWorldGenForDimension(WorldGenType type, int dimID);
boolean isWorldGenEnabled(WorldGenType type, World w);
@@ -12,11 +12,11 @@ public interface ICraftingPatternItem
{
/**
* Access Details about a patern
* Access Details about a pattern
*
* @param is
* @param w
* @return
* @param is pattern
* @param w crafting world
* @return details of pattern
*/
ICraftingPatternDetails getPatternForItem(ItemStack is, World w);
}
@@ -1,7 +1,7 @@
package appeng.api.implementations;
/**
* This is intended for use on the client side to provide details to Waila.
* This is intended for use on the client side to provide details to WAILA.
*/
public interface IPowerChannelState
{
@@ -1,11 +1,11 @@
package appeng.api.implementations;
import appeng.api.util.IConfigurableObject;
import net.minecraft.tileentity.TileEntity;
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.util.IConfigureableObject;
public interface IUpgradeableHost extends IConfigureableObject, ISegmentedInventory
public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInventory
{
/**
@@ -16,7 +16,7 @@ public interface IUpgradeableHost extends IConfigureableObject, ISegmentedInvent
/**
* the tile...
*
* @return
* @return tile entity
*/
TileEntity getTile();
@@ -6,13 +6,11 @@ package appeng.api.implementations;
*/
public class TransitionResult
{
public final boolean success;
public final double energyUsage;
public TransitionResult(boolean _success, double power) {
success = _success;
energyUsage = power;
}
public final boolean success;
public final double energyUsage;
}
@@ -1,15 +1,15 @@
package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**
* Implemented on Item objects, to return objects used to manage, and interact
* with the contents.
*/
public interface IGuiItem
{
IGuiItemObject getGuiObject(ItemStack is, World world, int x, int y, int z);
}
package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
/**
* Implemented on Item objects, to return objects used to manage, and interact
* with the contents.
*/
public interface IGuiItem
{
IGuiItemObject getGuiObject(ItemStack is, World world, int x, int y, int z);
}
@@ -1,9 +1,9 @@
package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
public interface IGuiItemObject
{
public ItemStack getItemStack();
}
package appeng.api.implementations.guiobjects;
import net.minecraft.item.ItemStack;
public interface IGuiItemObject
{
public ItemStack getItemStack();
}
@@ -1,14 +1,14 @@
package appeng.api.implementations.guiobjects;
import net.minecraft.inventory.IInventory;
import appeng.api.networking.IGridHost;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
public interface INetworkTool extends IInventory, IGuiItemObject
{
IGridHost getGridHost(); // null for most purposes.
}
package appeng.api.implementations.guiobjects;
import net.minecraft.inventory.IInventory;
import appeng.api.networking.IGridHost;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
public interface INetworkTool extends IInventory, IGuiItemObject
{
IGridHost getGridHost(); // null for most purposes.
}
@@ -1,14 +1,14 @@
package appeng.api.implementations.guiobjects;
import appeng.api.networking.energy.IEnergySource;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
public interface IPortableCell extends ITerminalHost, IMEMonitor<IAEItemStack>, IEnergySource, IGuiItemObject
{
}
package appeng.api.implementations.guiobjects;
import appeng.api.networking.energy.IEnergySource;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack;
/**
* Obtained via {@link IGuiItem} getGuiObject
*/
public interface IPortableCell extends ITerminalHost, IMEMonitor<IAEItemStack>, IEnergySource, IGuiItemObject
{
}
@@ -14,7 +14,7 @@ public interface IAEItemPowerStorage
* Inject amt, power into the device, it will store what it can, and return
* the amount unable to be stored.
*
* @return
* @return amount unable to be stored
*/
public double injectAEPower(ItemStack is, double amt);
@@ -22,8 +22,8 @@ public interface IAEItemPowerStorage
* Attempt to extract power from the device, it will extract what it can and
* return it.
*
* @param amt
* @return
* @param amt to be extracted power from device
* @return what it could extract
*/
public double extractAEPower(ItemStack is, double amt);
@@ -41,7 +41,7 @@ public interface IAEItemPowerStorage
* Control the power flow by telling what the network can do, either add? or
* subtract? or both!
*
* @return
* @return access restriction of network
*/
public AccessRestriction getPowerFlow(ItemStack is);
@@ -13,11 +13,12 @@ public interface IAEWrench
/**
* Check if the wrench can be used.
*
* @param player
* @param x
* @param y
* @param z
* @return
* @param player wrenching player
* @param x x pos of wrenched block
* @param y y pos of wrenched block
* @param z z pos of wrenched block
*
* @return true if wrench can be used
*/
boolean canWrench(ItemStack wrench, EntityPlayer player, int x, int y, int z);
@@ -1,13 +1,12 @@
package appeng.api.implementations.items;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import appeng.api.config.SecurityPermissions;
import appeng.api.features.IPlayerRegistry;
import appeng.api.networking.security.ISecurityRegister;
import appeng.api.networking.security.ISecurityRegistry;
import com.mojang.authlib.GameProfile;
import net.minecraft.item.ItemStack;
import java.util.EnumSet;
public interface IBiometricCard
{
@@ -23,7 +22,7 @@ public interface IBiometricCard
GameProfile getProfile(ItemStack is);
/**
* @param itemStack
* @param itemStack card
* @return the full list of permissions encoded on the card.
*/
EnumSet<SecurityPermissions> getPermissions(ItemStack itemStack);
@@ -31,7 +30,7 @@ public interface IBiometricCard
/**
* Check if a permission is encoded on the card.
*
* @param permission
* @param permission card
* @return true if this permission is set on the card.
*/
boolean hasPermission(ItemStack is, SecurityPermissions permission);
@@ -39,26 +38,26 @@ public interface IBiometricCard
/**
* remove a permission from the item stack.
*
* @param itemStack
* @param permission
* @param itemStack card
* @param permission to be removed permission
*/
void removePermission(ItemStack itemStack, SecurityPermissions permission);
/**
* add a permission to the item stack.
*
* @param itemStack
* @param permission
* @param itemStack card
* @param permission to be added permission
*/
void addPermission(ItemStack itemStack, SecurityPermissions permission);
/**
* lets you handle submission of security values on the card for custom behavior.
*
* @param register
* @param pr
* @param is
* @param registry security registry
* @param pr player registry
* @param is card
*/
void registerPermissions(ISecurityRegister register, IPlayerRegistry pr, ItemStack is);
void registerPermissions(ISecurityRegistry registry, IPlayerRegistry pr, ItemStack is);
}
@@ -1,9 +1,9 @@
package appeng.api.implementations.items;
import java.util.Set;
import net.minecraft.item.ItemStack;
import java.util.Set;
/**
* Lets you specify the name of the group of items this falls under.
*/
@@ -13,7 +13,7 @@ public interface IItemGroup
/**
* returning null, is the same as not implementing the interface at all.
*
* @param is
* @param is item
* @return an unlocalized string to use for the items group name.
*/
String getUnlocalizedGroupName(Set<ItemStack> otherItems, ItemStack is);
@@ -16,7 +16,7 @@ public interface IMemoryCard
* Configures the data stored on the memory card, the SettingsName, will be
* localized when displayed.
*
* @param is
* @param is item
* @param SettingsName
* unlocalized string that represents the tile entity.
* @param data
@@ -27,17 +27,17 @@ public interface IMemoryCard
void setMemoryCardContents(ItemStack is, String SettingsName, NBTTagCompound data);
/**
* returns the settings name provided by a pervious call to
* returns the settings name provided by a previous call to
* setMemoryCardContents, or "AppEng.GuiITooltip.Blank" if there was no
* previous call to setMemoryCardContents.
*
* @param is
* @return
* @param is item
* @return setting name
*/
String getSettingsName(ItemStack is);
/**
* @param is
* @param is item
* @return the NBT Data previously saved by setMemoryCardContents, or an
* empty NBTCompound
*/
@@ -48,7 +48,7 @@ public interface IMemoryCard
*
* @param player
* that used the card.
* @param settingsSaved
* @param msg
* which message to send.
*/
void notifyUser(EntityPlayer player, MemoryCardMessages msg);
@@ -13,19 +13,19 @@ public interface ISpatialStorageCell
{
/**
* @param is
* @param is spatial storage cell
* @return true if this item is a spatial storage cell
*/
boolean isSpatialStorage(ItemStack is);
/**
* @param is
* @param is spatial storage cell
* @return the maximum size of the spatial storage cell along any given axis
*/
int getMaxStoredDim(ItemStack is);
/**
* @param is
* @param is spatial storage cell
* @return the world for this cell
*/
World getWorld(ItemStack is);
@@ -33,36 +33,36 @@ public interface ISpatialStorageCell
/**
* get the currently stored size.
*
* @param is
* @return
* @param is spatial storage cell
* @return size of spatial
*/
WorldCoord getStoredSize(ItemStack is);
/**
* Minimum coordinates in its world for the storage cell.
*
* @param is
* @return
* @param is spatial storage cell
* @return minimum coordinate of dimension
*/
WorldCoord getMin(ItemStack is);
/**
* Maximum coordinates in its world for the storage cell.
*
* @param is
* @return
* @param is spatial storage cell
* @return maximum coordinate of dimension
*/
WorldCoord getMax(ItemStack is);
/**
* Perform a spatial swap with the contents of the cell, and the world.
*
* @param is
* @param w
* @param min
* @param max
* @param doTransition
* @return
* @param is spatial storage cell
* @param w world of spatial
* @param min min coord
* @param max max coord
* @param doTransition transition
* @return result of transition
*/
TransitionResult doSpatialTransition(ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition);
@@ -22,16 +22,16 @@ public interface IStorageCell extends ICellWorkbenchItem
* If this returns something where N % 8 != 0 Then you will be shot on
* sight, or your car will explode, something like that least...
*
* @param cellItem
* @return numberofBytes
* @param cellItem item
* @return number of bytes
*/
int getBytes(ItemStack cellItem);
/**
* Determines the number of bytes used for any type included on the cell.
*
* @param cellItem
* @return numberOfBytes
* @param cellItem item
* @return number of bytes
*/
int BytePerType(ItemStack cellItem);
@@ -39,8 +39,8 @@ public interface IStorageCell extends ICellWorkbenchItem
* Must be between 1 and 63, indicates how many types you want to store on
* the item.
*
* @param cellItem
* @return numberOfTypes
* @param cellItem item
* @return number of types
*/
int getTotalTypes(ItemStack cellItem);
@@ -49,8 +49,8 @@ public interface IStorageCell extends ICellWorkbenchItem
* don't care, just return false; As the handler for this type of cell is
* still the default cells, the normal AE black list is also applied.
*
* @param cellItem
* @param requestedAddition
* @param cellItem item
* @param requestedAddition requested addition
* @return true to preventAdditionOfItem
*/
boolean isBlackListed(ItemStack cellItem, IAEItemStack requestedAddition);
@@ -70,7 +70,7 @@ public interface IStorageCell extends ICellWorkbenchItem
* Allows an item to selectively enable or disable its status as a storage
* cell.
*
* @param i
* @param i item
* @return if the ItemStack should behavior as a storage cell.
*/
boolean isStorageCell(ItemStack i);
@@ -14,16 +14,16 @@ public interface IStorageComponent
* but all of AE's default cells do it that way, its currently only used for
* the condenser.
*
* @param cellItem
* @return numberofBytes
* @param is item
* @return number of bytes
*/
int getBytes(ItemStack is);
/**
* Just true or false for the item stack.
*
* @param is
* @return
* @param is item
* @return true if item is a storage component
*/
boolean isStorageComponent(ItemStack is);
@@ -7,7 +7,7 @@ public interface IUpgradeModule
{
/**
* @param itemstack
* @param itemstack item with potential upgrades
* @return null, or a valid upgrade type.
*/
Upgrades getType(ItemStack itemstack);
@@ -1,18 +1,18 @@
package appeng.api.implementations.parts;
import java.util.EnumSet;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.IGridHost;
import appeng.api.parts.BusSupport;
import appeng.api.parts.IPart;
import appeng.api.parts.IPartHost;
import appeng.api.util.AECableType;
import appeng.api.util.AEColor;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.EnumSet;
/**
* Implemented on the {@link IPart}s cable objects that can be placed at {@link ForgeDirection}.UNKNWON in
* Implemented on the {@link IPart}s cable objects that can be placed at {@link ForgeDirection}.UNKNOWN in
* {@link IPartHost}s
*/
public interface IPartCable extends IPart, IGridHost
@@ -36,7 +36,7 @@ public interface IPartCable extends IPart, IGridHost
/**
* Change the color of the cable, this should cost a small amount of dye, or something.
*
* @param newColor
* @param newColor new color
* @return if the color change was successful.
*/
boolean changeColor(AEColor newColor, EntityPlayer who);
@@ -46,14 +46,14 @@ public interface IPartCable extends IPart, IGridHost
*
* Called by AE, do not invoke.
*
* @param sides
* @param sides sides of cable
*/
void setValidSides(EnumSet<ForgeDirection> sides);
/**
* used to tests if a cable connects to neighbors visually.
*
* @param side
* @param side neighbor side
* @return true if this side is currently connects to an external block.
*/
boolean isConnected(ForgeDirection side);
@@ -21,7 +21,7 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable
*
* 3 - red
*
* @param slot
* @param slot slot index
* @return status of the slot, one of the above indices.
*/
int getCellStatus(int slot);
@@ -32,7 +32,7 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable
boolean isPowered();
/**
* @param slot
* @param slot slot index
* @return is the cell currently blinking to show activity.
*/
boolean isCellBlinking(int slot);
@@ -10,17 +10,17 @@ public interface ICraftingMachine
/**
* inserts a crafting plan, and the necessary items into the crafting machine.
*
* @param patternDetails
* @param table
* @param ejectionDirection
* @param patternDetails details of pattern
* @param table crafting table
* @param ejectionDirection ejection direction
*
* @return if it was accepted, all or nothing.
*/
boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table, ForgeDirection ejectionDirection);
/**
* check if the crafting machine is accepting pushes via pushPattern, if this is false, all cals to push will fail,
* you can try inserting into the inventry instead.
* check if the crafting machine is accepting pushes via pushPattern, if this is false, all calls to push will fail,
* you can try inserting into the inventory instead.
*
* @return true, if pushPattern can complete, if its false push will always be false.
*/
@@ -9,8 +9,8 @@ public interface ISegmentedInventory
* Access an internal inventory, note, not all inventories contain real items, some may be ghost items, and treating
* them a real inventories will result in duplication.
*
* @param name
* @return
* @param name inventory name
* @return inventory with inventory name
*/
IInventory getInventoryByName(String name);
@@ -1,15 +1,15 @@
package appeng.api.implementations.tiles;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.IStorageMonitorable;
/**
* Implemented on inventories that can share their inventories with other networks, best example, ME Interface.
*/
public interface ITileStorageMonitorable
{
IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src);
}
package appeng.api.implementations.tiles;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.IStorageMonitorable;
/**
* Implemented on inventories that can share their inventories with other networks, best example, ME Interface.
*/
public interface ITileStorageMonitorable
{
IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src);
}
@@ -1,30 +1,30 @@
package appeng.api.implementations.tiles;
import appeng.api.networking.IGrid;
import appeng.api.networking.security.IActionHost;
import appeng.api.util.DimensionalCoord;
public interface IWirelessAccessPoint extends IActionHost
{
/**
* @return location of WAP
*/
DimensionalCoord getLocation();
/**
* @return max range for this WAP
*/
double getRange();
/**
* @return can you use this WAP?
*/
boolean isActive();
/**
* @return
*/
IGrid getGrid();
}
package appeng.api.implementations.tiles;
import appeng.api.networking.IGrid;
import appeng.api.networking.security.IActionHost;
import appeng.api.util.DimensionalCoord;
public interface IWirelessAccessPoint extends IActionHost
{
/**
* @return location of WAP
*/
DimensionalCoord getLocation();
/**
* @return max range for this WAP
*/
double getRange();
/**
* @return can you use this WAP?
*/
boolean isActive();
/**
* @return grid of linked WAP
*/
IGrid getGrid();
}
@@ -1,20 +1,20 @@
package appeng.api.integration;
/**
* An interface to get access to the individual settings for AE's Internal Bee
* Comparison handler.
*
* Assessable via: ( IBeeComparison )
* IAEItemStack.getTagCompound().getSpecialComparison()
*
* If you don't have the forestry API, just delete this file when using the API.
*/
public interface IBeeComparison
{
/**
* @return the Forestry IIndividual for this comparison object - cast this to a IIndividual if you want to use it.
*/
Object getIndividual();
/**
* An interface to get access to the individual settings for AE's Internal Bee
* Comparison handler.
*
* Assessable via: ( IBeeComparison )
* IAEItemStack.getTagCompound().getSpecialComparison()
*
* If you don't have the forestry API, just delete this file when using the API.
*/
public interface IBeeComparison
{
/**
* @return the Forestry IIndividual for this comparison object - cast this to a IIndividual if you want to use it.
*/
Object getIndividual();
}
@@ -10,9 +10,9 @@ public interface IMovableHandler
* if you return true from this, your saying you can handle the class, not
* that single entity, you cannot opt out of single entities.
*
* @param myClass
* @param tile
* @return
* @param myClass tile entity class
* @param tile tile entity
* @return true if it can handle moving
*/
boolean canHandle(Class<? extends TileEntity> myClass, TileEntity tile);
@@ -22,19 +22,22 @@ public interface IMovableHandler
* already been fully moved.
*
* Potential Example:
*
*
* <pre>
* {@code
* Chunk c = world.getChunkFromBlockCoords( x, z ); c.setChunkBlockTileEntity( x
* & 0xF, y + y, z & 0xF, tile );
*
* if ( c.isChunkLoaded ) { world.addTileEntity( tile ); world.markBlockForUpdate( x,
* y, z ); }
* }
* </pre>
*
* @param tile
* @param world
* @param x
* @param y
* @param z
* @return
* @param tile to be moved tile
* @param world world of tile
* @param x x coord of tile
* @param y y coord of tile
* @param z z coord of tile
*/
void moveTile(TileEntity tile, World world, int x, int y, int z);
@@ -39,7 +39,7 @@ public interface IMovableRegistry
* You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial",
* "appeng.common.AppEngTile" );
*
* @param blk
* @param blk block
*/
void blacklistBlock(Block blk);
@@ -54,7 +54,7 @@ public interface IMovableRegistry
void whiteListTileEntity(Class<? extends TileEntity> c);
/**
* @param te
* @param te to be moved tile entity
* @return true if the tile has accepted your request to move it
*/
boolean askToMove(TileEntity te);
@@ -62,14 +62,14 @@ public interface IMovableRegistry
/**
* tells the tile you are done moving it.
*
* @param te
* @param te moved tile entity
*/
void doneMoving(TileEntity te);
/**
* add a new handler movable handler.
*
* @param handler
* @param handler moving handler
*/
void addHandler(IMovableHandler handler);
@@ -78,8 +78,8 @@ public interface IMovableRegistry
*
* only valid after askToMove(...) = true
*
* @param te
* @return
* @param te tile entity
* @return moving handler of tile entity
*/
IMovableHandler getHandler(TileEntity te);
@@ -89,7 +89,7 @@ public interface IMovableRegistry
IMovableHandler getDefaultHandler();
/**
* @param blk
* @param blk block
* @return true if this block is blacklisted
*/
boolean isBlacklisted(Block blk);
@@ -11,7 +11,7 @@ public interface IMovableTile
* notification that your block will be moved, called instead of invalidate,
* return false to prevent movement.
*
* @return
* @return false to prevent movement
*/
boolean prepareToMove();
@@ -1,45 +1,45 @@
package appeng.api.networking;
/**
* Various flags to determine network node behavior.
*/
public enum GridFlags
{
/**
* import/export buses, terminals, and other devices that use network features, will use this setting.
*/
REQUIRE_CHANNEL,
/**
* P2P ME tunnels use this setting.
*/
COMPRESSED_CHANNEL,
/**
* cannot carry channels over this node.
*/
CANNOT_CARRY,
/**
* Used by P2P Tunnels to prevent tunnels from tunneling recursively.
*/
CANNOT_CARRY_COMPRESSED,
/**
* This node can transmit 32 signals, this should only apply to Tier2 Cable, P2P Tunnels, and Quantum Network
* Bridges.
*/
DENSE_CAPACITY,
/**
* This block is part of a multiblock, used in conjunction with REQUIRE_CANNEL, and {@link IGridMultiblock} see this
* interface for details.
*/
MULTIBLOCK,
/**
* Indicates which path might be preferred, this only matters if two routes of equal length exist, ad only changes
* the order they are processed in.
*/
PREFERED
}
package appeng.api.networking;
/**
* Various flags to determine network node behavior.
*/
public enum GridFlags
{
/**
* import/export buses, terminals, and other devices that use network features, will use this setting.
*/
REQUIRE_CHANNEL,
/**
* P2P ME tunnels use this setting.
*/
COMPRESSED_CHANNEL,
/**
* cannot carry channels over this node.
*/
CANNOT_CARRY,
/**
* Used by P2P Tunnels to prevent tunnels from tunneling recursively.
*/
CANNOT_CARRY_COMPRESSED,
/**
* This node can transmit 32 signals, this should only apply to Tier2 Cable, P2P Tunnels, and Quantum Network
* Bridges.
*/
DENSE_CAPACITY,
/**
* This block is part of a multiblock, used in conjunction with REQUIRE_CHANNEL, and {@link IGridMultiblock} see this
* interface for details.
*/
MULTIBLOCK,
/**
* Indicates which path might be preferred, this only matters if two routes of equal length exist, ad only changes
* the order they are processed in.
*/
PREFERRED
}
@@ -1,9 +1,9 @@
package appeng.api.networking;
public enum GridNotification
{
/**
* the visible connections for this node have changed, useful for cable.
*/
ConnectionsChanged,
}
package appeng.api.networking;
public enum GridNotification
{
/**
* the visible connections for this node have changed, useful for cable.
*/
ConnectionsChanged,
}
+71 -71
View File
@@ -1,71 +1,71 @@
package appeng.api.networking;
import appeng.api.networking.events.MENetworkEvent;
import appeng.api.util.IReadOnlyCollection;
/**
* Gives you access to Grid based information.
*
* Don't Implement.
*/
public interface IGrid
{
/**
* Get Access to various grid modules
*
* @param iface
* @return the IGridCache you requested.
*/
public <C extends IGridCache> C getCache(Class<? extends IGridCache> iface);
/**
* Post an event into the network event bus.
*
* @param ev
* - event to post
* @return returns ev back to original poster
*/
public MENetworkEvent postEvent(MENetworkEvent ev);
/**
* Post an event into the network event bus, but direct it at a single node.
*
* @param ev
* event to post
* @return returns ev back to original poster
*/
public 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,
* rather then iterating the entire grid to test them.
*
* @return IReadOnlyCollection of all available host types (Of Type IGridHost).
*/
public IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
/**
* Get machines on the network.
*
* @param classofIGridHost
* @return IMachineSet of all nodes belonging to hosts of specified class.
*/
public IMachineSet getMachines(Class<? extends IGridHost> classofIGridHost);
/**
* @return IReadOnlyCollection for all nodes on the network, node visitors are prefered.
*/
IReadOnlyCollection<IGridNode> getNodes();
/**
* @return true if the last node has been removed from the grid.
*/
public boolean isEmpty();
/**
* @return the node considered the pivot point of the grid.
*/
public IGridNode getPivot();
}
package appeng.api.networking;
import appeng.api.networking.events.MENetworkEvent;
import appeng.api.util.IReadOnlyCollection;
/**
* Gives you access to Grid based information.
*
* Don't Implement.
*/
public interface IGrid
{
/**
* Get Access to various grid modules
*
* @param iface face
* @return the IGridCache you requested.
*/
public <C extends IGridCache> C getCache(Class<? extends IGridCache> iface);
/**
* Post an event into the network event bus.
*
* @param ev
* - event to post
* @return returns ev back to original poster
*/
public MENetworkEvent postEvent(MENetworkEvent ev);
/**
* Post an event into the network event bus, but direct it at a single node.
*
* @param ev
* event to post
* @return returns ev back to original poster
*/
public 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,
* rather then iterating the entire grid to test them.
*
* @return IReadOnlyCollection of all available host types (Of Type IGridHost).
*/
public IReadOnlyCollection<Class<? extends IGridHost>> getMachinesClasses();
/**
* Get machines on the network.
*
* @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);
/**
* @return IReadOnlyCollection for all nodes on the network, node visitors are preferred.
*/
IReadOnlyCollection<IGridNode> getNodes();
/**
* @return true if the last node has been removed from the grid.
*/
public boolean isEmpty();
/**
* @return the node considered the pivot point of the grid.
*/
public IGridNode getPivot();
}
@@ -1,88 +1,89 @@
package appeng.api.networking;
import java.util.EnumSet;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
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
*
* Implement for use with IGridHost
*/
public interface IGridBlock
{
/**
* how much power to drain per tick as part of idle network usage.
*
* if the value of this changes, you must post a MENetworkPowerIdleChange
*
* @return ae/t to use.
*/
double getIdlePowerUsage();
/**
* Various flags that AE uses to modify basic behavior for various parts of the network.
*
* @return Set of flags for this IGridBlock
*/
EnumSet<GridFlags> getFlags();
/**
* generally speaking you will return true for this, the one exception is buses, or worm holes where the node
* represents something that isn't a real connection in the world, but rather one represented internally to the
* block.
*
* @return if the world can connect to this node, and the node can connect to the world.
*/
boolean isWorldAccessable();
/**
* @return current location of this node
*/
DimensionalCoord getLocation();
/**
* @return Transparent, or a valid color, NULL IS NOT A VALID RETURN
*/
AEColor getGridColor();
/**
* Notifies your IGridBlock that changes were made to your connections
*/
void onGridNotification(GridNotification notification);
/**
* Update Blocks network/connection/booting status. grid,
*
* @param isReady
*/
public void setNetworkStatus(IGrid grid, int channelsInUse);
/**
* Determine which sides of the block can be connected too, only used when isWorldAccessable returns true, not used
* for {@link IPart} implementations.
*/
EnumSet<ForgeDirection> getConnectableSides();
/**
* @return the IGridHost for the node, this will be an IGridPart or a TileEntity generally speaking.
*/
IGridHost getMachine();
/**
* called when the grid for the node has changed, the general grid state should not be trusted at this point.
*/
void gridChanged();
/**
* Determines what item stack is used to render this node in the GUI.
*
* @return the render item stack to use to render this node, null is valid, and will not show this node.
*/
public ItemStack getMachineRepresentation();
}
package appeng.api.networking;
import appeng.api.parts.IPart;
import appeng.api.util.AEColor;
import appeng.api.util.DimensionalCoord;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.EnumSet;
/**
* An Implementation is required to create your node for IGridHost
*
* Implement for use with IGridHost
*/
public interface IGridBlock
{
/**
* how much power to drain per tick as part of idle network usage.
*
* if the value of this changes, you must post a MENetworkPowerIdleChange
*
* @return ae/t to use.
*/
double getIdlePowerUsage();
/**
* Various flags that AE uses to modify basic behavior for various parts of the network.
*
* @return Set of flags for this IGridBlock
*/
EnumSet<GridFlags> getFlags();
/**
* generally speaking you will return true for this, the one exception is buses, or worm holes where the node
* represents something that isn't a real connection in the world, but rather one represented internally to the
* block.
*
* @return if the world can connect to this node, and the node can connect to the world.
*/
boolean isWorldAccessible();
/**
* @return current location of this node
*/
DimensionalCoord getLocation();
/**
* @return Transparent, or a valid color, NULL IS NOT A VALID RETURN
*/
AEColor getGridColor();
/**
* Notifies your IGridBlock that changes were made to your connections
*/
void onGridNotification(GridNotification notification);
/**
* Update Blocks network/connection/booting status. grid,
*
* @param grid grid
* @param channelsInUse used channels
*/
public void setNetworkStatus(IGrid grid, int channelsInUse);
/**
* Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
* for {@link IPart} implementations.
*/
EnumSet<ForgeDirection> getConnectableSides();
/**
* @return the IGridHost for the node, this will be an IGridPart or a TileEntity generally speaking.
*/
IGridHost getMachine();
/**
* called when the grid for the node has changed, the general grid state should not be trusted at this point.
*/
void gridChanged();
/**
* Determines what item stack is used to render this node in the GUI.
*
* @return the render item stack to use to render this node, null is valid, and will not show this node.
*/
public ItemStack getMachineRepresentation();
}
@@ -1,71 +1,71 @@
package appeng.api.networking;
/**
*
* Allows you to create a network wise service, AE2 uses these for providing
* item, spatial, and tunnel services.
*
* Any Class that implements this, should have a public default constructor that
* takes a single argument of type IGrid.
*
*/
public interface IGridCache
{
/**
* Called each tick for the network, allows you to have active network wide
* behaviors.
*
*/
void onUpdateTick();
/**
* inform your cache, that a machine was removed from the grid.
*
* Important: Do not trust the grids state in this method, interact only
* with the node you are passed, if you need to manage other grid
* information, do it on the next updateTick.
*
* @param gridNode
* @param machine
*/
void removeNode(IGridNode gridNode, IGridHost machine);
/**
* informs you cache that a machine was added to the grid.
*
* Important: Do not trust the grids state in this method, interact only
* with the node you are passed, if you need to manage other grid
* information, do it on the next updateTick.
*
* @param gridNode
* @param machine
*/
void addNode(IGridNode gridNode, IGridHost machine);
/**
* Called when a grid splits into two grids, AE will call a split as it
* Iteratively processes changes. The destination should receive half, and
* the current cache should receive half.
*
* @param destinationStorage
*/
void onSplit(IGridStorage destinationStorage);
/**
* Called when two grids merge into one, AE will call a join as it
* Iteratively processes changes. Use this method to incorporate all the
* data from the source into your cache.
*
* @param sourceStorage
*/
void onJoin(IGridStorage sourceStorage);
/**
* Called when saving changes,
*
* @param destinationStorage
*/
void populateGridStorage(IGridStorage destinationStorage);
}
package appeng.api.networking;
/**
*
* Allows you to create a network wise service, AE2 uses these for providing
* item, spatial, and tunnel services.
*
* Any Class that implements this, should have a public default constructor that
* takes a single argument of type IGrid.
*
*/
public interface IGridCache
{
/**
* Called each tick for the network, allows you to have active network wide
* behaviors.
*
*/
void onUpdateTick();
/**
* inform your cache, that a machine was removed from the grid.
*
* Important: Do not trust the grids state in this method, interact only
* with the node you are passed, if you need to manage other grid
* information, do it on the next updateTick.
*
* @param gridNode removed from that grid
* @param machine to be removed machine
*/
void removeNode(IGridNode gridNode, IGridHost machine);
/**
* informs you cache that a machine was added to the grid.
*
* Important: Do not trust the grids state in this method, interact only
* with the node you are passed, if you need to manage other grid
* information, do it on the next updateTick.
*
* @param gridNode added to grid node
* @param machine to be added machine
*/
void addNode(IGridNode gridNode, IGridHost machine);
/**
* Called when a grid splits into two grids, AE will call a split as it
* Iteratively processes changes. The destination should receive half, and
* the current cache should receive half.
*
* @param destinationStorage storage which receives half of old grid
*/
void onSplit(IGridStorage destinationStorage);
/**
* Called when two grids merge into one, AE will call a join as it
* Iteratively processes changes. Use this method to incorporate all the
* data from the source into your cache.
*
* @param sourceStorage old storage
*/
void onJoin(IGridStorage sourceStorage);
/**
* Called when saving changes,
*
* @param destinationStorage storage
*/
void populateGridStorage(IGridStorage destinationStorage);
}
@@ -1,28 +1,27 @@
package appeng.api.networking;
import java.util.HashMap;
/**
* A registry of grid caches to extend grid functionality.
*/
public interface IGridCacheRegistry
{
/**
* Register a new grid cache for use during operation, must be called during the loading phase.
*
* @param cl
* @return cache id ( can be used later to ask the grid for you cache. )
*/
void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation);
/**
* requests a new instance of a grid cache for use, used internally
*
* @param grid
*
* @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid.
*/
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance(IGrid grid);
}
package appeng.api.networking;
import java.util.HashMap;
/**
* A registry of grid caches to extend grid functionality.
*/
public interface IGridCacheRegistry
{
/**
* Register a new grid cache for use during operation, must be called during the loading phase.
*
* @param iface grid cache class
*/
void registerGridCache(Class<? extends IGridCache> iface, Class<? extends IGridCache> implementation);
/**
* requests a new instance of a grid cache for use, used internally
*
* @param grid grid
*
* @return a new HashMap of IGridCaches from the registry, called from IGrid when constructing a new grid.
*/
HashMap<Class<? extends IGridCache>, IGridCache> createCacheInstance(IGrid grid);
}
@@ -1,58 +1,58 @@
package appeng.api.networking;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Access to AE's internal grid connections.
*
* Messing with connection is generally completely unnecessary, you should be able to just use IGridNode.updateState()
* to have AE manage them for you.
*
* Don't Implement.
*/
public interface IGridConnection
{
/**
* lets you get the opposing node of the connection by passing your own node.
*
* @param gridNode
* @return the IGridNode which represents the opposite side of the connection.
*/
IGridNode getOtherSide(IGridNode gridNode);
/**
* determine the direction of the connection based on your node.
*
* @param gridNode
* @return the direction of the connection, only valid for in world connections.
*/
ForgeDirection getDirection(IGridNode gridNode);
/**
* by destroying a connection you may create new grids, and trigger un-expected behavior, you should only destroy
* connections if you created them.
*/
void destroy();
/**
* @return node A
*/
IGridNode a();
/**
* @return node B
*/
IGridNode b();
/**
* @return if the connection is invisible this returns false
*/
boolean hasDirection();
/**
* @return how many channels pass over this connections.
*/
int getUsedChannels();
package appeng.api.networking;
import net.minecraftforge.common.util.ForgeDirection;
/**
* Access to AE's internal grid connections.
*
* Messing with connection is generally completely unnecessary, you should be able to just use IGridNode.updateState()
* to have AE manage them for you.
*
* Don't Implement.
*/
public interface IGridConnection
{
/**
* lets you get the opposing node of the connection by passing your own node.
*
* @param gridNode current grid node
* @return the IGridNode which represents the opposite side of the connection.
*/
IGridNode getOtherSide(IGridNode gridNode);
/**
* determine the direction of the connection based on your node.
*
* @param gridNode current grid node
* @return the direction of the connection, only valid for in world connections.
*/
ForgeDirection getDirection(IGridNode gridNode);
/**
* by destroying a connection you may create new grids, and trigger un-expected behavior, you should only destroy
* connections if you created them.
*/
void destroy();
/**
* @return node A
*/
IGridNode a();
/**
* @return node B
*/
IGridNode b();
/**
* @return if the connection is invisible this returns false
*/
boolean hasDirection();
/**
* @return how many channels pass over this connections.
*/
int getUsedChannels();
}
@@ -1,6 +1,6 @@
package appeng.api.networking;
public interface IGridConnecitonVisitor extends IGridVisitor
public interface IGridConnectionVisitor extends IGridVisitor
{
/**
@@ -1,43 +1,43 @@
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;
/**
*
* Implement to create a networked {@link TileEntity} or {@link IPart} must
* be implemented for a part, or tile entity to become part of a grid.
*
*/
public interface IGridHost
{
/**
* get the grid node for a particular side of a block, you can return null,
* by returning a valid node later and calling updateState, you can join the
* Grid when your block is ready.
*
* @param dir
* feel free to ignore this, most blocks will use the same node
* for every side.
* @return a new IGridNode, create these with
* AEApi.instance().createGridNode( MyIGridBlock )
*/
public IGridNode getGridNode(ForgeDirection dir);
/**
* Determines how cables render when they connect to this block. Priority is
* Smart > Covered > Glass
*
* @param dir
*/
public AECableType getCableConnectionType(ForgeDirection dir);
/**
* break this host, its violating security rules, just break your block, or part.
*/
public void securityBreak();
}
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;
/**
*
* Implement to create a networked {@link TileEntity} or {@link IPart} must
* be implemented for a part, or tile entity to become part of a grid.
*
*/
public interface IGridHost
{
/**
* get the grid node for a particular side of a block, you can return null,
* by returning a valid node later and calling updateState, you can join the
* Grid when your block is ready.
*
* @param dir
* feel free to ignore this, most blocks will use the same node
* for every side.
* @return a new IGridNode, create these with
* AEApi.instance().createGridNode( MyIGridBlock )
*/
public IGridNode getGridNode(ForgeDirection dir);
/**
* Determines how cables render when they connect to this block. Priority is
* Smart &gt; Covered &gt; Glass
*
* @param dir direction
*/
public AECableType getCableConnectionType(ForgeDirection dir);
/**
* break this host, its violating security rules, just break your block, or part.
*/
public void securityBreak();
}
+140 -140
View File
@@ -1,141 +1,141 @@
package appeng.api.networking;
import java.util.EnumSet;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.IAppEngApi;
import appeng.api.util.IReadOnlyCollection;
/**
*
* Gives you a view into your Nodes connections and information.
*
* updateState, getGrid, destroy are required to implement a proper IGridHost.
*
* Don't Implement; Acquire from {@link IAppEngApi}.createGridNode
*
*/
public interface IGridNode
{
/**
* lets you walk the grid stating at the current node using a IGridVisitor, generally not needed, please use only if
* required.
*
* @param g
*/
void beginVisition(IGridVisitor g);
/**
* inform the node that your IGridBlock has changed its internal state, and force the node to update.
*
* ALWAYS make sure that your tile entity is in the world, and has its node properly saved to be returned from the
* host before updating state,
*
* If your entity is not in the world, or if you IGridHost returns a different node for the same side you will
* likely crash the game.
*
*/
void updateState();
/**
* get the machine represented by the node.
*
* @return
*/
IGridHost getMachine();
/**
* get the grid for the node, this can change at a moments notice.
*
* @return
*/
IGrid getGrid();
/**
* By destroying your node, you destroy any connections, and its existence in the grid, use in invalidate, or
* onChunkUnload
*/
void destroy();
/**
* @return the world the node is located in
*/
World getWorld();
/**
*
* @return a set of the connected sides, UNKNOWN represents an invisible connection
*/
EnumSet<ForgeDirection> getConnectedSides();
/**
* lets you iterate a nodes connections
*
* @return
*/
IReadOnlyCollection<IGridConnection> getConnections();
/**
* @return the IGridBlock for this node
*/
IGridBlock getGridBlock();
/**
* Reflects the networks status, returns true only if the network is powered, and the network is not booting, this
* also takes into account channels.
*
* @return true if is Network node active, and participating.
*/
boolean isActive();
/**
* this should be called for each node you create, if you have a nodeData compound to load from, you can store all
* your nods on a single compound using name.
*
* Important: You must call this before updateState.
*
* @param name
* @param nodeData
*/
void loadFromNBT(String name, NBTTagCompound nodeData);
/**
* this should be called for each node you maintain, you can save all your nodes to the same tag with different
* names, if you fail to complete the load / save procedure, network state may be lost between game load/saves.
*
* @param name
* @param nodeData
*/
void saveToNBT(String name, NBTTagCompound nodeData);
/**
* @return if the node's channel requirements are currently met, use this for display purposes, use isActive for
* status.
*/
boolean meetsChannelRequirements();
/**
* see if this node has a certain flag
*
* @param tier2Capacity
* @return
*/
boolean hasFlag(GridFlags flag);
/**
* tell the node who was responsible for placing it, failure to do this may result in in-compatibility with the
* security system. Called instead of loadFromNBT when intialily placed, once set never required again, the value is saved with the Node NBT.
*
* @param p
*/
void setPlayerID(int playerID);
/**
* @return the ownerID this represents the person who placed the node.
*/
int getPlayerID();
package appeng.api.networking;
import appeng.api.IAppEngApi;
import appeng.api.util.IReadOnlyCollection;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.EnumSet;
/**
*
* Gives you a view into your Nodes connections and information.
*
* updateState, getGrid, destroy are required to implement a proper IGridHost.
*
* Don't Implement; Acquire from {@link IAppEngApi}.createGridNode
*
*/
public interface IGridNode
{
/**
* lets you walk the grid stating at the current node using a IGridVisitor, generally not needed, please use only if
* required.
*
* @param visitor visitor
*/
void beginVisit(IGridVisitor visitor);
/**
* inform the node that your IGridBlock has changed its internal state, and force the node to update.
*
* ALWAYS make sure that your tile entity is in the world, and has its node properly saved to be returned from the
* host before updating state,
*
* If your entity is not in the world, or if you IGridHost returns a different node for the same side you will
* likely crash the game.
*
*/
void updateState();
/**
* get the machine represented by the node.
*
* @return grid host
*/
IGridHost getMachine();
/**
* get the grid for the node, this can change at a moments notice.
*
* @return grid
*/
IGrid getGrid();
/**
* By destroying your node, you destroy any connections, and its existence in the grid, use in invalidate, or
* onChunkUnload
*/
void destroy();
/**
* @return the world the node is located in
*/
World getWorld();
/**
*
* @return a set of the connected sides, UNKNOWN represents an invisible connection
*/
EnumSet<ForgeDirection> getConnectedSides();
/**
* lets you iterate a nodes connections
*
* @return grid connections
*/
IReadOnlyCollection<IGridConnection> getConnections();
/**
* @return the IGridBlock for this node
*/
IGridBlock getGridBlock();
/**
* Reflects the networks status, returns true only if the network is powered, and the network is not booting, this
* also takes into account channels.
*
* @return true if is Network node active, and participating.
*/
boolean isActive();
/**
* this should be called for each node you create, if you have a nodeData compound to load from, you can store all
* your nods on a single compound using name.
*
* Important: You must call this before updateState.
*
* @param name nbt name
* @param nodeData to be loaded data
*/
void loadFromNBT(String name, NBTTagCompound nodeData);
/**
* this should be called for each node you maintain, you can save all your nodes to the same tag with different
* names, if you fail to complete the load / save procedure, network state may be lost between game load/saves.
*
* @param name nbt name
* @param nodeData to be saved data
*/
void saveToNBT(String name, NBTTagCompound nodeData);
/**
* @return if the node's channel requirements are currently met, use this for display purposes, use isActive for
* status.
*/
boolean meetsChannelRequirements();
/**
* see if this node has a certain flag
*
* @param flag flags
* @return true if has flag
*/
boolean hasFlag(GridFlags flag);
/**
* tell the node who was responsible for placing it, failure to do this may result in in-compatibility with the
* security system. Called instead of loadFromNBT when initially placed, once set never required again, the value is saved with the Node NBT.
*
* @param playerID new player id
*/
void setPlayerID(int playerID);
/**
* @return the ownerID this represents the person who placed the node.
*/
int getPlayerID();
}
@@ -1,21 +1,21 @@
package appeng.api.networking;
/**
* Simple Visitor pattern access to network nodes.
*/
public interface IGridVisitor
{
/**
* Called for each node on the network.
*
* By returning false your informing the host to stop visiting nodes beyond the current node.
*
* @param n
* the current node.
*
* @return true to continue visiting nodes beyond this node.
*/
public boolean visitNode(IGridNode n);
}
package appeng.api.networking;
/**
* Simple Visitor pattern access to network nodes.
*/
public interface IGridVisitor
{
/**
* Called for each node on the network.
*
* By returning false your informing the host to stop visiting nodes beyond the current node.
*
* @param n
* the current node.
*
* @return true to continue visiting nodes beyond this node.
*/
public boolean visitNode(IGridNode n);
}
@@ -1,24 +1,23 @@
package appeng.api.networking.crafting;
import java.util.concurrent.Future;
import net.minecraft.world.World;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridCache;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.data.IAEItemStack;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableSet;
import net.minecraft.world.World;
import java.util.concurrent.Future;
public interface ICraftingGrid extends IGridCache
{
/**
* @param whatToCraft
* @param world
* @param slot
* @param details
* @param whatToCraft requested craft
* @param world crafting world
* @param slot slot index
* @param details pattern details
* @return a collection of crafting patterns for the item in question.
*/
ImmutableCollection<ICraftingPatternDetails> getCraftingFor(IAEItemStack whatToCraft, ICraftingPatternDetails details, int slot, World world);
@@ -26,11 +25,11 @@ public interface ICraftingGrid extends IGridCache
/**
* Begin calculating a crafting job.
*
* @param world
* @param grid
* @param actionSrc
* @param craftWhat
* @param callback
* @param world crafting world
* @param grid network
* @param actionSrc source
* @param craftWhat result
* @param callback callback
* -- optional
*
* @return a future which will at an undetermined point in the future get you the {@link ICraftingJob} do not wait
@@ -41,18 +40,18 @@ public interface ICraftingGrid extends IGridCache
/**
* Submit the job to the Crafting system for processing.
*
* @param result
* @param job
* - the crafting job from beginCraftingJob
* @param requestingMachine
* - a machine if its being requested via automation, may be null.
* @param cpu
* @param target
* - can be null
*
* @param prioritizePower
* - if cpu is null, this determine if the system should prioritize power, or if it should find the lower
* end cpus, automatic processes generally should pick lower end cpus.
*
* @param actionSrc
* @param src
* - the action source to use when starting the job, this will be used for extracting items, should
* usually be the same as the one provided to beginCraftingJob.
*
@@ -69,7 +68,7 @@ public interface ICraftingGrid extends IGridCache
ImmutableSet<ICraftingCPU> getCpus();
/**
* @param what
* @param what to be requested item
* @return true if the item can be requested via a crafting emitter.
*/
boolean canEmitFor(IAEItemStack what);
@@ -77,8 +76,8 @@ public interface ICraftingGrid extends IGridCache
/**
* is this item being crafted?
*
* @param aeStackInSlot
* @return
* @param aeStackInSlot item being crafted
* @return true if it is being crafting
*/
boolean isRequesting(IAEItemStack aeStackInSlot);
@@ -21,7 +21,7 @@ public interface ICraftingJob
* Populates the plan list with stack size, and requestable values that represent the stored, and crafting job
* contents respectively.
*
* @param plan
* @param plan plan
*/
void populatePlan(IItemList<IAEItemStack> plan);
@@ -28,7 +28,7 @@ public interface ICraftingLink
/**
* write the link to an NBT Tag
*
* @param tag
* @param tag to be written data
*/
void writeToNBT(NBTTagCompound tag);
@@ -12,9 +12,8 @@ public interface ICraftingMedium
* instruct a medium to create the item represented by the pattern+details, the items on the table, and where if
* possible the output should be directed.
*
* @param pattern
* @param patternDetails
* @param table
* @param patternDetails details
* @param table crafting table
* @return if the pattern was successfully pushed.
*/
boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table);
@@ -9,7 +9,7 @@ import appeng.api.storage.data.IAEItemStack;
/**
* do not implement provided by {@link ICraftingPatternItem}
*
* caching this instance will increase preformance of validation and checks.
* caching this instance will increase performance of validation and checks.
*/
public interface ICraftingPatternDetails
{
@@ -20,9 +20,9 @@ public interface ICraftingPatternDetails
ItemStack getPattern();
/**
* @param slotIndex
* @param itemStack
* @param world
* @param slotIndex specific slot index
* @param itemStack item in slot
* @param world crafting world
*
* @return if an item can be used in the specific slot for this pattern.
*/
@@ -41,12 +41,12 @@ public interface ICraftingPatternDetails
/**
* @return a list of the inputs, will be clean
*/
IAEItemStack[] getCondencedInputs();
IAEItemStack[] getCondensedInputs();
/**
* @return a list of the outputs, will be clean
*/
IAEItemStack[] getCondencedOutputs();
IAEItemStack[] getCondensedOutputs();
/**
* @return a list of the outputs, will include nulls.
@@ -59,10 +59,10 @@ public interface ICraftingPatternDetails
boolean canSubstitute();
/**
* Allow using this instance of the pattern details to preform the crafting action with preformance enhancements.
* Allow using this instance of the pattern details to preform the crafting action with performance enhancements.
*
* @param craftingInv
* @param world
* @param craftingInv inventory
* @param world crafting world
* @return the crafted ( work bench ) item.
*/
ItemStack getOutput(InventoryCrafting craftingInv, World world);
@@ -70,8 +70,14 @@ public interface ICraftingPatternDetails
/**
* Set the priority the of this pattern.
*
* @param priority
* @param priority priority of pattern
*/
void setPriority(int priority);
/**
* Get the priority of this pattern
*
* @return the priority of this pattern
*/
int getPriority();
}
@@ -12,7 +12,7 @@ public interface ICraftingProvider extends ICraftingMedium
/**
* called when the network is looking for possible crafting jobs.
*
* @param craftingTracker
* @param craftingTracker crafting helper
*/
void provideCrafting(ICraftingProviderHelper craftingTracker);
@@ -21,11 +21,11 @@ public interface ICraftingRequester extends IActionHost
* items are injected into the requester as they are completed, any items that cannot be taken, or are unwanted can
* be returned.
*
* @param items
* @param mode
* @return
* @param items item
* @param mode action mode
* @return unwanted item
*/
IAEItemStack injectCratedItems(ICraftingLink link, IAEItemStack items, Actionable mode);
IAEItemStack injectCraftedItems(ICraftingLink link, IAEItemStack items, Actionable mode);
/**
* called when the job changes from in progress, to either complete, or canceled.
@@ -6,18 +6,18 @@ public interface ICraftingWatcherHost
{
/**
* provides the ICraftngiWatcher for this host, for the current network, is called when the hot changes networks.
* provides the ICraftingWatcher for this host, for the current network, is called when the hot changes networks.
* You do not need to clear your old watcher, its already been removed by the time this gets called.
*
* @param newWatcher
* @param newWatcher crafting watcher for this host
*/
void updateWatcher(ICraftingWatcher newWatcher);
/**
* Called when a crafting status changes.
*
* @param craftingGrid
* @param what
* @param craftingGrid current crafting grid
* @param what change
*/
void onRequestChange(ICraftingGrid craftingGrid, IAEItemStack what);
@@ -12,9 +12,10 @@ public interface IAEPowerStorage extends IEnergySource
/**
* Inject amt, power into the device, it will store what it can, and return the amount unable to be stored.
*
* @param simulate
* @param amt to be injected amount
* @param mode action mode
*
* @return
* @return amount of power which was unable to be stored
*/
public double injectAEPower(double amt, Actionable mode);
@@ -32,14 +33,14 @@ public interface IAEPowerStorage extends IEnergySource
* Checked on network reset to see if your block can be used as a public power storage ( use getPowerFlow to control
* the behavior )
*
* @return
* @return true if it can be used as a public power storage
*/
public boolean isAEPublicPowerStorage();
/**
* Control the power flow by telling what the network can do, either add? or subtract? or both!
*
* @return
* @return access restriction what the network can do
*/
public AccessRestriction getPowerFlow();
@@ -1,82 +1,82 @@
package appeng.api.networking.energy;
import appeng.api.config.Actionable;
import appeng.api.networking.IGridCache;
import appeng.api.networking.events.MENetworkPowerStatusChange;
/**
* AE's Power system.
*/
public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvider
{
/**
* @return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
*/
public 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();
/**
* @return the average energy injected into the system per tick, for the last 10 ticks.
*/
public double getAvgPowerInjection();
/**
* AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation
* that determines the networks "powered state" if the network is considered off-line, your machines should not
* function.
*
* {@link MENetworkPowerStatusChange} events are posted when this value changes if you need to be notified of the
* change, most machines can simply test the value when they operate.
*
* @return if the network is powered or not.
*/
public boolean isNetworkPowered();
/**
* AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time.
*
* IMPORTANT: Network power knows no bounds, for less spamy power flow, networks can store more then their alloted
* storage, however, it should be kept to a minimum, to help with this, this method returns the networks current
* OVERFLOW, this is not energy you can store some where else, its already stored in the network, you can extract it
* if you want, however it it owned by the network, this is different then IAEEnergyStore
*
* Another important note, is that if a network that had overflow is deleted, its power is gone, this is one of the
* reasons why keeping overflow to a minimum is important.
*
* @param amt
* power to inject into the network
* @param mode
* 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);
/**
* this is should be considered an estimate, and not relied upon for real calculations.
*
* @return estimated available power.
*/
public double getStoredPower();
/**
* this is should be considered an estimate, and not relied upon for real calculations.
*
* @return estimated available power.
*/
double getMaxStoredPower();
/**
* Calculation will be capped at maxRequired, this improves performance by limiting the number of nodes needed to
* calculate the demand.
*
* @return Amount of power required to charge the grid, in AE.
*/
public double getEnergyDemand(double maxRequired);
}
package appeng.api.networking.energy;
import appeng.api.config.Actionable;
import appeng.api.networking.IGridCache;
import appeng.api.networking.events.MENetworkPowerStatusChange;
/**
* AE's Power system.
*/
public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvider
{
/**
* @return the current calculated idle energy drain each tick, is used internally to drain power for each tick.
*/
public 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();
/**
* @return the average energy injected into the system per tick, for the last 10 ticks.
*/
public double getAvgPowerInjection();
/**
* AE maintains an idle draw of power separate from active power draw, it condenses this into a single operation
* that determines the networks "powered state" if the network is considered off-line, your machines should not
* function.
*
* {@link MENetworkPowerStatusChange} events are posted when this value changes if you need to be notified of the
* change, most machines can simply test the value when they operate.
*
* @return if the network is powered or not.
*/
public boolean isNetworkPowered();
/**
* AE will accept any power, and store it, to maintain sanity please don't send more then 10,000 at a time.
*
* IMPORTANT: Network power knows no bounds, for less spamy power flow, networks can store more then their allotted
* storage, however, it should be kept to a minimum, to help with this, this method returns the networks current
* OVERFLOW, this is not energy you can store some where else, its already stored in the network, you can extract it
* if you want, however it it owned by the network, this is different then IAEEnergyStore
*
* Another important note, is that if a network that had overflow is deleted, its power is gone, this is one of the
* reasons why keeping overflow to a minimum is important.
*
* @param amt
* power to inject into the network
* @param mode
* 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);
/**
* this is should be considered an estimate, and not relied upon for real calculations.
*
* @return estimated available power.
*/
public double getStoredPower();
/**
* this is should be considered an estimate, and not relied upon for real calculations.
*
* @return estimated available power.
*/
double getMaxStoredPower();
/**
* Calculation will be capped at maxRequired, this improves performance by limiting the number of nodes needed to
* calculate the demand.
*
* @return Amount of power required to charge the grid, in AE.
*/
public double getEnergyDemand(double maxRequired);
}
@@ -1,28 +1,28 @@
package appeng.api.networking.energy;
import java.util.Set;
import appeng.api.config.Actionable;
/**
* internal use only.
*/
public interface IEnergyGridProvider
{
/**
* internal use only
*/
public double extractAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen);
/**
* internal use only
*/
public double injectAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen);
/**
* internal use only
*/
public double getEnergyDemand(double d, Set<IEnergyGrid> seen);
}
package appeng.api.networking.energy;
import java.util.Set;
import appeng.api.config.Actionable;
/**
* internal use only.
*/
public interface IEnergyGridProvider
{
/**
* internal use only
*/
public double extractAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen);
/**
* internal use only
*/
public double injectAEPower(double amt, Actionable mode, Set<IEnergyGrid> seen);
/**
* internal use only
*/
public double getEnergyDemand(double d, Set<IEnergyGrid> seen);
}
@@ -9,9 +9,8 @@ public interface IEnergySource
/**
* Extract power from the network.
*
* @param amt
* @param mode
* should the action be simulated or performed?
* @param amt extracted power
* @param mode should the action be simulated or performed?
* @return returns extracted power.
*/
public double extractAEPower(double amt, Actionable mode, PowerMultiplier usePowerMultiplier);
@@ -7,15 +7,15 @@ public interface IEnergyWatcherHost
* provides the IEnergyWatcher for this host, for the current network, is called when the hot changes networks. You
* do not need to clear your old watcher, its already been removed by the time this gets called.
*
* @param newWatcher
* @param newWatcher new watcher
*/
void updateWatcher(IEnergyWatcher newWatcher);
/**
* Called when a threshold is crossed.
*
* @param energyGrid
* @param energyGrid grid
*/
void onThreshholdPass(IEnergyGrid energyGrid);
void onThresholdPass(IEnergyGrid energyGrid);
}
@@ -1,7 +1,7 @@
package appeng.api.networking.events;
/**
* Posted by storage devices to inform AE to refreash its storage structure.
* Posted by storage devices to inform AE to refresh its storage structure.
*
* This is done in cases such as a storage cell being removed or added to a
* drive.
@@ -3,7 +3,7 @@ package appeng.api.networking.events;
import appeng.api.networking.IGridNode;
/**
* Posted by storage devices to inform AE he channel chache that the included node has changed its mind about its
* Posted by storage devices to inform AE the channel cache that the included node has changed its mind about its
* channel requirements.
*/
public class MENetworkChannelChanged extends MENetworkEvent
@@ -24,7 +24,7 @@ public class MENetworkEvent
/**
* called by AE after each object is called to cancel any future calls.
*
* @return
* @return true to cancel future calls
*/
public boolean isCanceled()
{
@@ -34,7 +34,7 @@ public class MENetworkEvent
/**
* the number of objects that were visited by the event.
*
* @return
* @return number of visitors
*/
public int getVisitedObjects()
{
@@ -44,7 +44,7 @@ public class MENetworkEvent
/**
* Called by AE after iterating the event subscribers.
*
* @param v
* @param v current number of visitors
*/
public void setVisitedObjects(int v)
{
@@ -1,10 +1,10 @@
package appeng.api.networking.events;
/**
* Posted after all the caches are available, but before the grid is fully
* constructed, can be used to perform cross cache construction processes.
*/
public class MENetworkPostCacheConstruction extends MENetworkEvent
{
}
package appeng.api.networking.events;
/**
* Posted after all the caches are available, but before the grid is fully
* constructed, can be used to perform cross cache construction processes.
*/
public class MENetworkPostCacheConstruction extends MENetworkEvent
{
}
@@ -3,7 +3,7 @@ package appeng.api.networking.events;
import appeng.api.networking.IGridNode;
/**
* Implementors of a IGridBlock must post this event when your getIdlePowerUsage
* Implementers of a IGridBlock must post this event when your getIdlePowerUsage
* starts returning a new value, if you do not post this event the network will
* not change the idle draw.
*
@@ -25,7 +25,7 @@ public class MENetworkPowerStorage extends MENetworkEvent
* informs the network this tile is ready to provide power again.
*/
PROVIDE_POWER
};
}
public final IAEPowerStorage storage;
public final PowerEventType type;
@@ -3,24 +3,20 @@ package appeng.api.networking.events;
import appeng.api.networking.IGridHost;
/**
* An event that is posted Whenever a spatial IO is Actived, called for IGridCache
*
* @param IGridHost ( instance of the SpatialIO block )
* @param double ( the amount of energy that the SpatialIO uses)
* An event that is posted whenever a spatial IO is actived, called for IGridCache
*/
public class MENetworkSpatialEvent extends MENetworkEvent
{
public final IGridHost host;
public final double spatialEnergyUsage;
public final IGridHost host;
public final double spatialEnergyUsage;
public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage) {
host = SpatialIO;
spatialEnergyUsage = EnergyUsage;
}
/**
* @param SpatialIO ( instance of the SpatialIO block )
* @param EnergyUsage ( the amount of energy that the SpatialIO uses)
*/
public MENetworkSpatialEvent(IGridHost SpatialIO, double EnergyUsage)
{
host = SpatialIO;
spatialEnergyUsage = EnergyUsage;
}
}
@@ -1,24 +1,24 @@
package appeng.api.networking.pathing;
import appeng.api.networking.IGridCache;
public interface IPathingGrid extends IGridCache
{
/**
* @return true if the network is in its booting stage
*/
boolean isNetworkBooting();
/**
* @return the controller state of the network, useful if you want to
* require a controller for a feature.
*/
ControllerState getControllerState();
/**
* trigger a network reset, booting, pathfinding and all.
*/
void repath();
package appeng.api.networking.pathing;
import appeng.api.networking.IGridCache;
public interface IPathingGrid extends IGridCache
{
/**
* @return true if the network is in its booting stage
*/
boolean isNetworkBooting();
/**
* @return the controller state of the network, useful if you want to
* require a controller for a feature.
*/
ControllerState getControllerState();
/**
* trigger a network reset, booting, pathfinding and all.
*/
void repath();
}
@@ -15,8 +15,8 @@ public interface ISecurityGrid extends IGridCache
/**
* Check if a player has permissions.
*
* @param player
* @param perm
* @param player to be checked player
* @param perm checked permissions
*
* @return true if the player has permissions.
*/
@@ -25,8 +25,8 @@ public interface ISecurityGrid extends IGridCache
/**
* Check if a player has permissions.
*
* @param player
* @param perm
* @param playerID id of player
* @param perm checked permissions
*
* @return true if the player has permissions.
*/
@@ -1,10 +1,10 @@
package appeng.api.networking.security;
import appeng.api.config.SecurityPermissions;
import java.util.EnumSet;
import java.util.HashMap;
import appeng.api.config.SecurityPermissions;
/**
* Implemented on Security Terminal to interface with security cache.
*/
@@ -21,7 +21,7 @@ public interface ISecurityProvider
/**
* Push permission data into security cache.
*
* @param playerPerms
* @param playerPerms player permissions
*/
void readPermissions(HashMap<Integer, EnumSet<SecurityPermissions>> playerPerms);
@@ -1,20 +1,20 @@
package appeng.api.networking.security;
import java.util.EnumSet;
import appeng.api.config.SecurityPermissions;
import java.util.EnumSet;
/**
* Used by vanilla Security Terminal to post biometric data into the security cache.
*/
public interface ISecurityRegister
public interface ISecurityRegistry
{
/**
* Submit Permissions into the register.
*
* @param PlayerID
* @param permissions
* @param PlayerID player id
* @param permissions permissions of player
*/
void addPlayer(int PlayerID, EnumSet<SecurityPermissions> permissions);
@@ -7,7 +7,7 @@ public interface ISpatialCache extends IGridCache
{
/**
* @return true if a region is defined at all, it dosn't have to be valid, but all points must be in the same world.
* @return true if a region is defined at all, it doesn't have to be valid, but all points must be in the same world.
*/
boolean hasRegion();
@@ -32,8 +32,8 @@ public interface ISpatialCache extends IGridCache
long requiredPower();
/**
* @return current 100% - 0% effiency.
* @return current 100% - 0% efficiency.
*/
float currentEffiency();
float currentEfficiency();
}
@@ -12,18 +12,18 @@ public interface IStackWatcherHost
* provides the IStackWatcher for this host, for the current network, is called when the hot changes networks. You
* do not need to clear your old watcher, its already been removed by the time this gets called.
*
* @param newWatcher
* @param newWatcher stack watcher
*/
void updateWatcher(IStackWatcher newWatcher);
/**
* Called when a watched item changes amounts.
*
* @param o
* @param fullStack
* @param diffStack
* @param src
* @param chan
* @param o changed item list
* @param fullStack old stack
* @param diffStack new stack
* @param src action source
* @param chan storage channel
*/
void onStackChange(IItemList o, IAEStack fullStack, IAEStack diffStack, BaseActionSource src, StorageChannel chan);
@@ -1,45 +1,45 @@
package appeng.api.networking.storage;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridHost;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.ICellContainer;
import appeng.api.storage.ICellProvider;
import appeng.api.storage.IStorageMonitorable;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEStack;
/**
* Common base class for item / fluid storage caches.
*/
public interface IStorageGrid extends IGridCache, IStorageMonitorable
{
/**
* Used to inform the network of alterations to the storage system that fall outside of the standard Network
* operations, Examples, ME Chest inputs from the world, or a Storage Bus detecting modifications made to the chest
* by an outside force.
*
* Expects the input to have either a negative or a positive stack size to correspond to the injection, or
* extraction operation.
*
* @param input
*/
void postAlterationOfStoredItems(StorageChannel chan, Iterable<? extends IAEStack> input, BaseActionSource src);
/**
* Used to add a cell provider to the storage system
*
* THIS IT NOT FOR USE {@link IGridHost} THAT PROVIDE {@link ICellContainer} - those are automatically handled by
* the storage system.
*
* @param cc
*/
void registerCellProvider(ICellProvider cc);
/**
* remove a provider added with addCellContainer
*/
void unregisterCellProvider(ICellProvider cc);
}
package appeng.api.networking.storage;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridHost;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.ICellContainer;
import appeng.api.storage.ICellProvider;
import appeng.api.storage.IStorageMonitorable;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEStack;
/**
* Common base class for item / fluid storage caches.
*/
public interface IStorageGrid extends IGridCache, IStorageMonitorable
{
/**
* Used to inform the network of alterations to the storage system that fall outside of the standard Network
* operations, Examples, ME Chest inputs from the world, or a Storage Bus detecting modifications made to the chest
* by an outside force.
*
* Expects the input to have either a negative or a positive stack size to correspond to the injection, or
* extraction operation.
*
* @param input injected items
*/
void postAlterationOfStoredItems(StorageChannel chan, Iterable<? extends IAEStack> input, BaseActionSource src);
/**
* Used to add a cell provider to the storage system
*
* THIS IT NOT FOR USE {@link IGridHost} THAT PROVIDE {@link ICellContainer} - those are automatically handled by
* the storage system.
*
* @param cc to be added cell provider
*/
void registerCellProvider(ICellProvider cc);
/**
* remove a provider added with addCellContainer
*/
void unregisterCellProvider(ICellProvider cc);
}
@@ -1,56 +1,56 @@
package appeng.api.networking.ticking;
import appeng.api.networking.IGridNode;
/**
* Implement on IGridHosts which want to use AE's Network Ticking Feature.
*/
public interface IGridTickable
{
/**
* Important note regarding IGridTickables with more then one one node,
*
* If your IGridHost hosts multiple nodes, it may be on multiple grids, or
* its node may be present on the same grid multiple times, this is as
* designed, however if you choose to use the grid to tick these Hosts you
* must be aware that they they should probably pick a single node to tick
* for, and not tick for each node.
*
*/
/**
* You can return null, if you wish to tick using MC's ticking mechanism, or
* you can return a valid TickingRequest to tell AE a guide for which type
* of responsiveness your device wants.
*
* this will be called for your tile any time your tile changes grids, this
* can happen at any time, so if your using the sleep feature you may wish
* to preserve your sleep, in the result of this method. or you can simply
* reset it.
*
* @return null or a valid new TickingRequest
*
*/
TickingRequest getTickingRequest(IGridNode node);
/**
* AE lets you adjust your tick rate based on the results of your tick, if
* your block as accomplished work you may wish to increase the ticking
* speed, if your block is idle you may wish to slow it down.
*
* Its up to you.
*
* Note: this is never called if you return null from getTickingRequest.
*
* @param TicksSinceLastCall
* the number of world ticks that were skipped since your last
* tick, you can use this to adjust speed of processing or adjust
* your tick rate.
*
* @return tick rate adjustment.
*
*/
TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall);
}
package appeng.api.networking.ticking;
import appeng.api.networking.IGridNode;
/**
* Implement on IGridHosts which want to use AE's Network Ticking Feature.
*/
public interface IGridTickable
{
/**
* Important note regarding IGridTickables with more then one one node,
*
* If your IGridHost hosts multiple nodes, it may be on multiple grids, or
* its node may be present on the same grid multiple times, this is as
* designed, however if you choose to use the grid to tick these Hosts you
* must be aware that they they should probably pick a single node to tick
* for, and not tick for each node.
*
*/
/**
* You can return null, if you wish to tick using MC's ticking mechanism, or
* you can return a valid TickingRequest to tell AE a guide for which type
* of responsiveness your device wants.
*
* this will be called for your tile any time your tile changes grids, this
* can happen at any time, so if your using the sleep feature you may wish
* to preserve your sleep, in the result of this method. or you can simply
* reset it.
*
* @return null or a valid new TickingRequest
*
*/
TickingRequest getTickingRequest(IGridNode node);
/**
* AE lets you adjust your tick rate based on the results of your tick, if
* your block as accomplished work you may wish to increase the ticking
* speed, if your block is idle you may wish to slow it down.
*
* Its up to you.
*
* Note: this is never called if you return null from getTickingRequest.
*
* @param TicksSinceLastCall
* the number of world ticks that were skipped since your last
* tick, you can use this to adjust speed of processing or adjust
* your tick rate.
*
* @return tick rate adjustment.
*
*/
TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall);
}
@@ -1,44 +1,44 @@
package appeng.api.networking.ticking;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridNode;
/**
*
* The network tick manager.
*
*/
public interface ITickManager extends IGridCache
{
/**
* immediately sets the node to tick, only valid if your node is marked as "Alertable" in its TickingRequest
*
* Sleeping Devices Still Alertable, when your tile is alerted its new status is determined by the result of its
* tick.
*
* @param node
*/
boolean alertDevice(IGridNode node);
/**
*
* disables ticking for your device.
*
* @param node
*
* @return if the call was successful.
*/
boolean sleepDevice(IGridNode node);
/**
*
* enables ticking for your device, undoes a sleepDevice call.
*
* @param node
*
* @return if the call was successful.
*/
boolean wakeDevice(IGridNode node);
}
package appeng.api.networking.ticking;
import appeng.api.networking.IGridCache;
import appeng.api.networking.IGridNode;
/**
*
* The network tick manager.
*
*/
public interface ITickManager extends IGridCache
{
/**
* immediately sets the node to tick, only valid if your node is marked as "Alertable" in its TickingRequest
*
* Sleeping Devices Still Alertable, when your tile is alerted its new status is determined by the result of its
* tick.
*
* @param node gridnode
*/
boolean alertDevice(IGridNode node);
/**
*
* disables ticking for your device.
*
* @param node gridnode
*
* @return if the call was successful.
*/
boolean sleepDevice(IGridNode node);
/**
*
* enables ticking for your device, undoes a sleepDevice call.
*
* @param node gridnode
*
* @return if the call was successful.
*/
boolean wakeDevice(IGridNode node);
}
Loaded 100 of 153 files, more files were not shown because too many files have changed in this diff. Show more