mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Will this work?
This commit is contained in:
1 parent
f42f3d3685
commit
f477187ede
193 files changed
+715
-746
No files matched your search
@@ -1,11 +1,11 @@
|
||||
package appeng.api;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Entry point for api.
|
||||
*
|
||||
*
|
||||
* Available IMCs:
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class AEApi
|
||||
{
|
||||
@@ -14,7 +14,7 @@ public class AEApi
|
||||
|
||||
/**
|
||||
* API Entry Point.
|
||||
*
|
||||
*
|
||||
* @return the {@link IAppEngApi} or null if the instance could not be retrieved
|
||||
*/
|
||||
public static IAppEngApi instance()
|
||||
|
||||
@@ -53,7 +53,7 @@ public interface IAppEngApi
|
||||
|
||||
/**
|
||||
* create a grid node for your {@link IGridHost}
|
||||
*
|
||||
*
|
||||
* @param block grid block
|
||||
* @return grid node of block
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ public interface IAppEngApi
|
||||
|
||||
/**
|
||||
* create a connection between two {@link IGridNode}
|
||||
*
|
||||
*
|
||||
* @param a to be connected gridnode
|
||||
* @param b to be connected gridnode
|
||||
* @throws FailedConnection
|
||||
|
||||
@@ -25,11 +25,11 @@ public enum PowerUnits
|
||||
|
||||
/**
|
||||
* do power conversion using AE's conversion rates.
|
||||
*
|
||||
*
|
||||
* Example: PowerUnits.EU.convertTo( PowerUnits.AE, 32 );
|
||||
*
|
||||
*
|
||||
* will normally returns 64, as it will convert the EU, to AE with AE's power settings.
|
||||
*
|
||||
*
|
||||
* @param target target power unit
|
||||
* @param value value
|
||||
* @return value converted to target units, from this units.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package appeng.api.config;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public enum Upgrades
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,7 @@ import cpw.mods.fml.common.eventhandler.Event;
|
||||
|
||||
/**
|
||||
* Input Event:
|
||||
*
|
||||
*
|
||||
* Used to Notify the Location Registry of objects, and their availability.
|
||||
*/
|
||||
public class LocatableEventAnnounce extends Event
|
||||
|
||||
@@ -10,49 +10,49 @@ public interface IGrinderEntry
|
||||
|
||||
/**
|
||||
* the current input
|
||||
*
|
||||
*
|
||||
* @return input that the grinder will accept.
|
||||
*/
|
||||
public ItemStack getInput();
|
||||
|
||||
/**
|
||||
* lets you change the grinder recipe by changing its input.
|
||||
*
|
||||
*
|
||||
* @param input input item
|
||||
*/
|
||||
public void setInput(ItemStack input);
|
||||
|
||||
/**
|
||||
* gets the current output
|
||||
*
|
||||
*
|
||||
* @return output that the grinder will produce
|
||||
*/
|
||||
public ItemStack getOutput();
|
||||
|
||||
/**
|
||||
* gets the current output
|
||||
*
|
||||
*
|
||||
* @return output that the grinder will produce
|
||||
*/
|
||||
public ItemStack getOptionalOutput();
|
||||
|
||||
/**
|
||||
* gets the current output
|
||||
*
|
||||
*
|
||||
* @return output that the grinder will produce
|
||||
*/
|
||||
public ItemStack getSecondOptionalOutput();
|
||||
|
||||
/**
|
||||
* allows you to change the output.
|
||||
*
|
||||
*
|
||||
* @param output output item
|
||||
*/
|
||||
public void setOutput(ItemStack output);
|
||||
|
||||
/**
|
||||
* stack, and 0.0-1.0 chance that it will be generated.
|
||||
*
|
||||
*
|
||||
* @param output output item
|
||||
* @param chance generation chance
|
||||
*/
|
||||
@@ -60,14 +60,14 @@ public interface IGrinderEntry
|
||||
|
||||
/**
|
||||
* 0.0 - 1.0 the chance that the optional output will be generated.
|
||||
*
|
||||
*
|
||||
* @return chance of optional output
|
||||
*/
|
||||
public float getOptionalChance();
|
||||
|
||||
/**
|
||||
* stack, and 0.0-1.0 chance that it will be generated.
|
||||
*
|
||||
*
|
||||
* @param output second optional output item
|
||||
* @param chance second optional output chance
|
||||
*/
|
||||
@@ -75,21 +75,21 @@ public interface IGrinderEntry
|
||||
|
||||
/**
|
||||
* 0.0 - 1.0 the chance that the optional output will be generated.
|
||||
*
|
||||
*
|
||||
* @return second optional output chance
|
||||
*/
|
||||
public float getSecondOptionalChance();
|
||||
|
||||
/**
|
||||
* Energy cost, in turns.
|
||||
*
|
||||
*
|
||||
* @return number of turns it takes to produce the output from the input.
|
||||
*/
|
||||
public int getEnergyCost();
|
||||
|
||||
/**
|
||||
* Allows you to adjust the number of turns
|
||||
*
|
||||
*
|
||||
* @param c number of turns to produce output.
|
||||
*/
|
||||
public void setEnergyCost(int c);
|
||||
|
||||
@@ -12,14 +12,14 @@ public interface IGrinderRegistry
|
||||
|
||||
/**
|
||||
* Current list of registered recipes, you can modify this if you want too.
|
||||
*
|
||||
*
|
||||
* @return currentlyRegisteredRecipes
|
||||
*/
|
||||
public List<IGrinderEntry> getRecipes();
|
||||
|
||||
/**
|
||||
* add a new recipe the easy way, in → out, how many turns., duplicates will not be added.
|
||||
*
|
||||
*
|
||||
* @param in input
|
||||
* @param out output
|
||||
* @param turns amount of turns to turn the input into the output
|
||||
@@ -28,7 +28,7 @@ public interface IGrinderRegistry
|
||||
|
||||
/**
|
||||
* add a new recipe with optional outputs, duplicates will not be added.
|
||||
*
|
||||
*
|
||||
* @param in input
|
||||
* @param out output
|
||||
* @param optional optional output
|
||||
@@ -39,7 +39,7 @@ public interface IGrinderRegistry
|
||||
|
||||
/**
|
||||
* add a new recipe with optional outputs, duplicates will not be added.
|
||||
*
|
||||
*
|
||||
* @param in input
|
||||
* @param out output
|
||||
* @param optional optional output
|
||||
@@ -52,7 +52,7 @@ public interface IGrinderRegistry
|
||||
|
||||
/**
|
||||
* Searches for a recipe for a given input, and returns it.
|
||||
*
|
||||
*
|
||||
* @param input input
|
||||
* @return identified recipe or null
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface IItemComparisonProvider
|
||||
/**
|
||||
* should return a new IItemComparison, or return null if it doesn't handle
|
||||
* the supplied item.
|
||||
*
|
||||
*
|
||||
* @param is item
|
||||
* @return IItemComparison, or null
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface IItemComparisonProvider
|
||||
|
||||
/**
|
||||
* Simple test for support ( AE generally skips this and calls the above function. )
|
||||
*
|
||||
*
|
||||
* @param stack item
|
||||
* @return true, if getComparison will return a valid IItemComparison Object
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ public interface ILocatableRegistry
|
||||
/**
|
||||
* Attempts to find the object with the serial specified, if it can it
|
||||
* returns the object.
|
||||
*
|
||||
*
|
||||
* @param serial serial
|
||||
* @return requestedObject, or null
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@ 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 new ammo
|
||||
* @param weight atomic weight
|
||||
*/
|
||||
@@ -15,7 +15,7 @@ public interface IMatterCannonAmmoRegistry
|
||||
|
||||
/**
|
||||
* get the penetration value for a particular ammo, 0 indicates a non-ammo.
|
||||
*
|
||||
*
|
||||
* @param is ammo
|
||||
* @return 0 or a valid penetration value.
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@ public interface INetworkEncodable {
|
||||
|
||||
/**
|
||||
* Used to get the current key from the item.
|
||||
*
|
||||
*
|
||||
* @param item item
|
||||
* @return string key of item
|
||||
*/
|
||||
@@ -14,7 +14,7 @@ public interface INetworkEncodable {
|
||||
|
||||
/**
|
||||
* Encode the wireless frequency via the Controller.
|
||||
*
|
||||
*
|
||||
* @param item
|
||||
* the wireless terminal.
|
||||
* @param encKey
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package appeng.api.features;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.config.TunnelType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* A Registry for how p2p Tunnels are attuned
|
||||
@@ -12,7 +12,7 @@ public interface IP2PTunnelRegistry
|
||||
/**
|
||||
* Allows third parties to register items from their mod as potential
|
||||
* attunements for AE's P2P Tunnels
|
||||
*
|
||||
*
|
||||
* @param trigger
|
||||
* - the item which triggers attunement
|
||||
* @param type
|
||||
@@ -22,7 +22,7 @@ public interface IP2PTunnelRegistry
|
||||
|
||||
/**
|
||||
* returns null if no attunement can be found.
|
||||
*
|
||||
*
|
||||
* @param trigger attunement trigger
|
||||
* @return null if no attunement can be found or attunement
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package appeng.api.features;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
/**
|
||||
* Maintains a save specific list of userids and username combinations this greatly simplifies storage internally and
|
||||
|
||||
@@ -9,9 +9,9 @@ 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
|
||||
*/
|
||||
@@ -19,9 +19,9 @@ public interface IRecipeHandlerRegistry
|
||||
|
||||
/**
|
||||
* Add a new resolver to the parser.
|
||||
*
|
||||
*
|
||||
* MUST BE CALLED IN PRE-INIT
|
||||
*
|
||||
*
|
||||
* @param sir sub item resolver
|
||||
*/
|
||||
void addNewSubItemResolver(ISubItemResolver sir);
|
||||
@@ -39,7 +39,7 @@ public interface IRecipeHandlerRegistry
|
||||
|
||||
/**
|
||||
* resolve sub items by name.
|
||||
*
|
||||
*
|
||||
* @param nameSpace namespace of item
|
||||
* @param itemName full name of item
|
||||
* @return ResolverResult or ResolverResultSet
|
||||
|
||||
@@ -4,14 +4,14 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* A Registry of any special comparison handlers for AE To use.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ISpecialComparisonRegistry
|
||||
{
|
||||
|
||||
/**
|
||||
* return TheHandler or null.
|
||||
*
|
||||
*
|
||||
* @param stack item
|
||||
* @return a handler it found for a specific item
|
||||
*/
|
||||
@@ -19,7 +19,7 @@ public interface ISpecialComparisonRegistry
|
||||
|
||||
/**
|
||||
* Register a new special comparison function with AE.
|
||||
*
|
||||
*
|
||||
* @param prov comparison provider
|
||||
*/
|
||||
public void addComparisonProvider(IItemComparisonProvider prov);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package appeng.api.features;
|
||||
|
||||
import appeng.api.util.IConfigManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.util.IConfigManager;
|
||||
|
||||
/**
|
||||
* A handler for a wireless terminal.
|
||||
@@ -18,7 +18,7 @@ public interface IWirelessTermHandler extends INetworkEncodable
|
||||
|
||||
/**
|
||||
* use an amount of power, in AE units
|
||||
*
|
||||
*
|
||||
* @param amount
|
||||
* is in AE units ( 5 per MJ ), if you return false, the item should be dead and return false for
|
||||
* hasPower
|
||||
@@ -29,7 +29,7 @@ public interface IWirelessTermHandler extends INetworkEncodable
|
||||
|
||||
/**
|
||||
* gets the power status of the item.
|
||||
*
|
||||
*
|
||||
* @param is wireless terminal
|
||||
* @return returns true if there is any power left.
|
||||
*/
|
||||
@@ -37,10 +37,10 @@ public interface IWirelessTermHandler extends INetworkEncodable
|
||||
|
||||
/**
|
||||
* Return the config manager for the wireless terminal.
|
||||
*
|
||||
*
|
||||
* @param is wireless terminal
|
||||
* @return config manager of wireless terminal
|
||||
*/
|
||||
IConfigManager getConfigManager(ItemStack is);
|
||||
|
||||
|
||||
}
|
||||
@@ -12,7 +12,7 @@ public interface IWirelessTermRegistry
|
||||
|
||||
/**
|
||||
* add this handler to the list of other wireless handler.
|
||||
*
|
||||
*
|
||||
* @param handler wireless handler
|
||||
*/
|
||||
void registerWirelessHandler(IWirelessTermHandler handler);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package appeng.api.implementations;
|
||||
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
|
||||
/**
|
||||
* Implemented on {@link Item}
|
||||
@@ -13,7 +13,7 @@ public interface ICraftingPatternItem
|
||||
|
||||
/**
|
||||
* Access Details about a pattern
|
||||
*
|
||||
*
|
||||
* @param is pattern
|
||||
* @param w crafting world
|
||||
* @return details of pattern
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
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.IConfigurableObject;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInventory
|
||||
{
|
||||
@@ -15,7 +15,7 @@ public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInvento
|
||||
|
||||
/**
|
||||
* the tile...
|
||||
*
|
||||
*
|
||||
* @return tile entity
|
||||
*/
|
||||
TileEntity getTile();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package appeng.api.implementations.guiobjects;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import appeng.api.networking.IGridHost;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
/**
|
||||
* Obtained via {@link IGuiItem} getGuiObject
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.networking.energy.IAEPowerStorage;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Basically the same as {@link IAEPowerStorage}, but for items.
|
||||
@@ -13,7 +13,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 amount unable to be stored
|
||||
*/
|
||||
public double injectAEPower(ItemStack is, double amt);
|
||||
@@ -21,7 +21,7 @@ public interface IAEItemPowerStorage
|
||||
/**
|
||||
* Attempt to extract power from the device, it will extract what it can and
|
||||
* return it.
|
||||
*
|
||||
*
|
||||
* @param amt to be extracted power from device
|
||||
* @return what it could extract
|
||||
*/
|
||||
@@ -40,7 +40,7 @@ public interface IAEItemPowerStorage
|
||||
/**
|
||||
* Control the power flow by telling what the network can do, either add? or
|
||||
* subtract? or both!
|
||||
*
|
||||
*
|
||||
* @return access restriction of network
|
||||
*/
|
||||
public AccessRestriction getPowerFlow(ItemStack is);
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface IAEWrench
|
||||
|
||||
/**
|
||||
* Check if the wrench can be used.
|
||||
*
|
||||
*
|
||||
* @param player wrenching player
|
||||
* @param x x pos of wrenched block
|
||||
* @param y y pos of wrenched block
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface IBiometricCard
|
||||
|
||||
/**
|
||||
* Check if a permission is encoded on the card.
|
||||
*
|
||||
*
|
||||
* @param permission card
|
||||
* @return true if this permission is set on the card.
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface IBiometricCard
|
||||
|
||||
/**
|
||||
* remove a permission from the item stack.
|
||||
*
|
||||
*
|
||||
* @param itemStack card
|
||||
* @param permission to be removed permission
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface IBiometricCard
|
||||
|
||||
/**
|
||||
* add a permission to the item stack.
|
||||
*
|
||||
*
|
||||
* @param itemStack card
|
||||
* @param permission to be added permission
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ public interface IBiometricCard
|
||||
|
||||
/**
|
||||
* lets you handle submission of security values on the card for custom behavior.
|
||||
*
|
||||
*
|
||||
* @param registry security registry
|
||||
* @param pr player registry
|
||||
* @param is card
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface IItemGroup
|
||||
|
||||
/**
|
||||
* returning null, is the same as not implementing the interface at all.
|
||||
*
|
||||
*
|
||||
* @param is item
|
||||
* @return an unlocalized string to use for the items group name.
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
/**
|
||||
* Memory Card API
|
||||
*
|
||||
*
|
||||
* AE's Memory Card Item Class implements this interface.
|
||||
*/
|
||||
public interface IMemoryCard
|
||||
@@ -15,7 +15,7 @@ public interface IMemoryCard
|
||||
/**
|
||||
* Configures the data stored on the memory card, the SettingsName, will be
|
||||
* localized when displayed.
|
||||
*
|
||||
*
|
||||
* @param is item
|
||||
* @param SettingsName
|
||||
* unlocalized string that represents the tile entity.
|
||||
@@ -30,7 +30,7 @@ public interface IMemoryCard
|
||||
* 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 item
|
||||
* @return setting name
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface IMemoryCard
|
||||
|
||||
/**
|
||||
* notify the user of a outcome related to the memory card.
|
||||
*
|
||||
*
|
||||
* @param player
|
||||
* that used the card.
|
||||
* @param msg
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
import appeng.api.implementations.TransitionResult;
|
||||
import appeng.api.util.WorldCoord;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.api.implementations.TransitionResult;
|
||||
import appeng.api.util.WorldCoord;
|
||||
|
||||
/**
|
||||
* Implemented on a {@link Item}
|
||||
@@ -32,7 +32,7 @@ public interface ISpatialStorageCell
|
||||
|
||||
/**
|
||||
* get the currently stored size.
|
||||
*
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
* @return size of spatial
|
||||
*/
|
||||
@@ -40,7 +40,7 @@ public interface ISpatialStorageCell
|
||||
|
||||
/**
|
||||
* Minimum coordinates in its world for the storage cell.
|
||||
*
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
* @return minimum coordinate of dimension
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ public interface ISpatialStorageCell
|
||||
|
||||
/**
|
||||
* Maximum coordinates in its world for the storage cell.
|
||||
*
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
* @return maximum coordinate of dimension
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ public interface ISpatialStorageCell
|
||||
|
||||
/**
|
||||
* Perform a spatial swap with the contents of the cell, and the world.
|
||||
*
|
||||
*
|
||||
* @param is spatial storage cell
|
||||
* @param w world of spatial
|
||||
* @param min min coord
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.storage.ICellWorkbenchItem;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Any item which implements this can be treated as an IMEInventory via
|
||||
* Util.getCell / Util.isCell It automatically handles the internals and NBT
|
||||
* data, which is both nice, and bad for you!
|
||||
*
|
||||
*
|
||||
* Good cause it means you don't have to do anything, bad because you have
|
||||
* little to no control over it.
|
||||
*
|
||||
*
|
||||
* The standard AE implementation only provides 1-63 Types
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface IStorageCell extends ICellWorkbenchItem
|
||||
{
|
||||
@@ -21,7 +21,7 @@ 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 item
|
||||
* @return number of bytes
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
|
||||
/**
|
||||
* Determines the number of bytes used for any type included on the cell.
|
||||
*
|
||||
*
|
||||
* @param cellItem item
|
||||
* @return number of bytes
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
/**
|
||||
* Must be between 1 and 63, indicates how many types you want to store on
|
||||
* the item.
|
||||
*
|
||||
*
|
||||
* @param cellItem item
|
||||
* @return number of types
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
* Allows you to fine tune which items are allowed on a given cell, if you
|
||||
* 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 item
|
||||
* @param requestedAddition requested addition
|
||||
* @return true to preventAdditionOfItem
|
||||
@@ -59,7 +59,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
* Allows you to specify if this storage cell can be stored inside other
|
||||
* storage cells, only set this for special items like the matter cannon
|
||||
* that are not general purpose storage.
|
||||
*
|
||||
*
|
||||
* @return true if the storage cell can be stored inside other storage
|
||||
* cells, this is generally false, except for certain situations
|
||||
* such as the matter cannon.
|
||||
@@ -69,7 +69,7 @@ public interface IStorageCell extends ICellWorkbenchItem
|
||||
/**
|
||||
* Allows an item to selectively enable or disable its status as a storage
|
||||
* cell.
|
||||
*
|
||||
*
|
||||
* @param i item
|
||||
* @return if the ItemStack should behavior as a storage cell.
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface IStorageComponent
|
||||
* This isn't necessarily the same as if you make a storage cell out of it,
|
||||
* but all of AE's default cells do it that way, its currently only used for
|
||||
* the condenser.
|
||||
*
|
||||
*
|
||||
* @param is item
|
||||
* @return number of bytes
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface IStorageComponent
|
||||
|
||||
/**
|
||||
* Just true or false for the item stack.
|
||||
*
|
||||
*
|
||||
* @param is item
|
||||
* @return true if item is a storage component
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package appeng.api.implementations.items;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.config.Upgrades;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IUpgradeModule
|
||||
{
|
||||
|
||||
@@ -35,7 +35,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 new color
|
||||
* @return if the color change was successful.
|
||||
*/
|
||||
@@ -43,16 +43,16 @@ public interface IPartCable extends IPart, IGridHost
|
||||
|
||||
/**
|
||||
* Change sides on the cables node.
|
||||
*
|
||||
*
|
||||
* Called by AE, do not invoke.
|
||||
*
|
||||
*
|
||||
* @param sides sides of cable
|
||||
*/
|
||||
void setValidSides(EnumSet<ForgeDirection> sides);
|
||||
|
||||
/**
|
||||
* used to tests if a cable connects to neighbors visually.
|
||||
*
|
||||
*
|
||||
* @param side neighbor side
|
||||
* @return true if this side is currently connects to an external block.
|
||||
*/
|
||||
|
||||
@@ -14,13 +14,13 @@ public interface IChestOrDrive extends ICellContainer, IGridHost, IOrientable
|
||||
|
||||
/**
|
||||
* 0 - cell is missing.
|
||||
*
|
||||
*
|
||||
* 1 - green,
|
||||
*
|
||||
*
|
||||
* 2 - orange,
|
||||
*
|
||||
*
|
||||
* 3 - red
|
||||
*
|
||||
*
|
||||
* @param slot slot index
|
||||
* @return status of the slot, one of the above indices.
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.util.AEColor;
|
||||
|
||||
public interface IColorableTile
|
||||
{
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.networking.crafting.ICraftingPatternDetails;
|
||||
|
||||
public interface ICraftingMachine
|
||||
{
|
||||
|
||||
/**
|
||||
* inserts a crafting plan, and the necessary items into the crafting machine.
|
||||
*
|
||||
*
|
||||
* @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);
|
||||
@@ -21,7 +21,7 @@ public interface ICraftingMachine
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
boolean acceptsPlans();
|
||||
|
||||
@@ -4,12 +4,12 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/**
|
||||
* Crank/Crankable API,
|
||||
*
|
||||
*
|
||||
* Tiles that Implement this can receive power, from the crank, and have the
|
||||
* crank placed on them.
|
||||
*
|
||||
*
|
||||
* Tiles that access other tiles that implement this method can act as Cranks.
|
||||
*
|
||||
*
|
||||
* This interface must be implemented by a tile entity.
|
||||
*/
|
||||
public interface ICrankable
|
||||
@@ -17,7 +17,7 @@ public interface ICrankable
|
||||
|
||||
/**
|
||||
* Test if the crank can turn, return false if there is no work to be done.
|
||||
*
|
||||
*
|
||||
* @return if crank should be allowed to turn.
|
||||
*/
|
||||
boolean canTurn();
|
||||
|
||||
@@ -8,7 +8,7 @@ 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 inventory name
|
||||
* @return inventory with inventory name
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.storage.IStorageMonitorable;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/**
|
||||
* Implemented on inventories that can share their inventories with other networks, best example, ME Interface.
|
||||
|
||||
@@ -7,7 +7,7 @@ public interface IViewCellStorage
|
||||
|
||||
/**
|
||||
* should contains at least 5 slot, the first 5
|
||||
*
|
||||
*
|
||||
* @return inventory with at least 5 slot
|
||||
*/
|
||||
IInventory getViewCellStorage();
|
||||
|
||||
@@ -3,10 +3,10 @@ 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
|
||||
|
||||
@@ -9,7 +9,7 @@ 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 tile entity class
|
||||
* @param tile tile entity
|
||||
* @return true if it can handle moving
|
||||
@@ -20,19 +20,19 @@ public interface IMovableHandler
|
||||
* request that the handler move the the tile from its current location to
|
||||
* the new one. the tile has already been invalidated, and the blocks have
|
||||
* 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 to be moved tile
|
||||
* @param world world of tile
|
||||
* @param x x coord of tile
|
||||
|
||||
@@ -5,29 +5,29 @@ import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
/**
|
||||
* Used to determine if a tile is marked as movable, a block will be considered movable, if...
|
||||
*
|
||||
*
|
||||
* 1. The Tile or its super classes have been white listed with whiteListTileEntity.
|
||||
*
|
||||
*
|
||||
* 2. The Tile has been register with the IMC ( which basically calls whiteListTileEntity. )
|
||||
*
|
||||
* 3. The Tile implements IMovableTile 4. A IMovableHandler is register that returns canHandle = true for the Tile
|
||||
* Entity Class
|
||||
*
|
||||
*
|
||||
* IMC Example: FMLInterModComms.sendMessage( "appliedenergistics2", "movabletile", "appeng.common.AppEngTile" );
|
||||
*
|
||||
*
|
||||
* The movement process is as follows,
|
||||
*
|
||||
*
|
||||
* 1. IMovableTile.prepareToMove() or TileEntity.invalidate() depending on your opt-in method. 2. The tile will be
|
||||
* removed from the world. 3. Its world, coordinates will be changed. *** this can be overridden with a IMovableHandler
|
||||
* *** 4. It will then be re-added to the world, or a new world. 5. TileEntity.validate() 6. IMovableTile.doneMoving (
|
||||
* if you implemented IMovableTile )
|
||||
*
|
||||
*
|
||||
* Please note, this is a 100% white list only feature, I will never opt in any non-vanilla, non-AE blocks. If you do
|
||||
* not want to support your tiles being moved, you don't have to do anything.
|
||||
*
|
||||
*
|
||||
* I appreciate anyone that takes the effort to get their tiles to work with this system to create a better use
|
||||
* experience.
|
||||
*
|
||||
*
|
||||
* If you need a build of deobf build of AE for testing, do not hesitate to ask.
|
||||
*/
|
||||
public interface IMovableRegistry
|
||||
@@ -35,20 +35,20 @@ public interface IMovableRegistry
|
||||
|
||||
/**
|
||||
* Black list a block from movement, please only use this to prevent exploits.
|
||||
*
|
||||
*
|
||||
* You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial",
|
||||
* "appeng.common.AppEngTile" );
|
||||
*
|
||||
*
|
||||
* @param blk block
|
||||
*/
|
||||
void blacklistBlock(Block blk);
|
||||
|
||||
/**
|
||||
* White list your tile entity with the registry.
|
||||
*
|
||||
*
|
||||
* You can also use the IMC, FMLInterModComms.sendMessage( "appliedenergistics2", "blacklist-block-spatial", new
|
||||
* ItemStack(...) );
|
||||
*
|
||||
*
|
||||
* If you tile is handled with IMovableHandler or IMovableTile you do not need to white list it.
|
||||
*/
|
||||
void whiteListTileEntity(Class<? extends TileEntity> c);
|
||||
@@ -61,23 +61,23 @@ public interface IMovableRegistry
|
||||
|
||||
/**
|
||||
* tells the tile you are done moving it.
|
||||
*
|
||||
*
|
||||
* @param te moved tile entity
|
||||
*/
|
||||
void doneMoving(TileEntity te);
|
||||
|
||||
/**
|
||||
* add a new handler movable handler.
|
||||
*
|
||||
*
|
||||
* @param handler moving handler
|
||||
*/
|
||||
void addHandler(IMovableHandler handler);
|
||||
|
||||
/**
|
||||
* handlers are used to perform movement, this allows you to override AE's internal version.
|
||||
*
|
||||
*
|
||||
* only valid after askToMove(...) = true
|
||||
*
|
||||
*
|
||||
* @param te tile entity
|
||||
* @return moving handler of tile entity
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ public interface IMovableTile
|
||||
/**
|
||||
* notification that your block will be moved, called instead of invalidate,
|
||||
* return false to prevent movement.
|
||||
*
|
||||
*
|
||||
* @return false to prevent movement
|
||||
*/
|
||||
boolean prepareToMove();
|
||||
|
||||
@@ -5,7 +5,7 @@ import appeng.api.util.IReadOnlyCollection;
|
||||
|
||||
/**
|
||||
* Gives you access to Grid based information.
|
||||
*
|
||||
*
|
||||
* Don't Implement.
|
||||
*/
|
||||
public interface IGrid
|
||||
@@ -13,7 +13,7 @@ public interface IGrid
|
||||
|
||||
/**
|
||||
* Get Access to various grid modules
|
||||
*
|
||||
*
|
||||
* @param iface face
|
||||
* @return the IGridCache you requested.
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface IGrid
|
||||
|
||||
/**
|
||||
* Post an event into the network event bus.
|
||||
*
|
||||
*
|
||||
* @param ev
|
||||
* - event to post
|
||||
* @return returns ev back to original poster
|
||||
@@ -30,7 +30,7 @@ public interface IGrid
|
||||
|
||||
/**
|
||||
* 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
|
||||
@@ -40,14 +40,14 @@ public interface IGrid
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.EnumSet;
|
||||
|
||||
/**
|
||||
* An Implementation is required to create your node for IGridHost
|
||||
*
|
||||
*
|
||||
* Implement for use with IGridHost
|
||||
*/
|
||||
public interface IGridBlock
|
||||
@@ -18,16 +18,16 @@ 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();
|
||||
@@ -36,7 +36,7 @@ public interface IGridBlock
|
||||
* 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();
|
||||
@@ -82,7 +82,7 @@ public interface IGridBlock
|
||||
|
||||
/**
|
||||
* 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,13 +1,13 @@
|
||||
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
|
||||
{
|
||||
@@ -15,17 +15,17 @@ 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
|
||||
*/
|
||||
@@ -33,11 +33,11 @@ public interface IGridCache
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ public interface IGridCache
|
||||
* 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);
|
||||
@@ -56,14 +56,14 @@ public interface IGridCache
|
||||
* 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);
|
||||
|
||||
@@ -10,16 +10,16 @@ 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);
|
||||
|
||||
@@ -4,10 +4,10 @@ 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
|
||||
@@ -15,7 +15,7 @@ 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.
|
||||
*/
|
||||
@@ -23,7 +23,7 @@ public interface IGridConnection
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ public interface IGridConnectionVisitor extends IGridVisitor
|
||||
|
||||
/**
|
||||
* Called for each connection on the network.
|
||||
*
|
||||
*
|
||||
* @param n
|
||||
* the connection.
|
||||
*/
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
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;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* 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
|
||||
{
|
||||
@@ -18,7 +18,7 @@ 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.
|
||||
@@ -30,7 +30,7 @@ public interface IGridHost
|
||||
/**
|
||||
* Determines how cables render when they connect to this block. Priority is
|
||||
* Smart > Covered > Glass
|
||||
*
|
||||
*
|
||||
* @param dir direction
|
||||
*/
|
||||
public AECableType getCableConnectionType(ForgeDirection dir);
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface IGridMultiblock extends IGridBlock
|
||||
|
||||
/**
|
||||
* Used to acquire a list of all nodes that are part of the multiblock.
|
||||
*
|
||||
*
|
||||
* @return an iterator that will iterate all the nodes for the multiblock. ( read-only iterator expected. )
|
||||
*/
|
||||
Iterator<IGridNode> getMultiblockNodes();
|
||||
|
||||
@@ -9,13 +9,13 @@ 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
|
||||
{
|
||||
@@ -23,33 +23,33 @@ 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();
|
||||
@@ -66,14 +66,14 @@ public interface IGridNode
|
||||
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();
|
||||
@@ -86,7 +86,7 @@ public interface IGridNode
|
||||
/**
|
||||
* 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();
|
||||
@@ -94,9 +94,9 @@ public interface IGridNode
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ public interface IGridNode
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -119,7 +119,7 @@ public interface IGridNode
|
||||
|
||||
/**
|
||||
* see if this node has a certain flag
|
||||
*
|
||||
*
|
||||
* @param flag flags
|
||||
* @return true if has flag
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ public interface IGridNode
|
||||
/**
|
||||
* 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);
|
||||
|
||||
@@ -8,12 +8,12 @@ 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);
|
||||
|
||||
@@ -5,7 +5,7 @@ public interface ICraftingCallback
|
||||
|
||||
/**
|
||||
* this call back is synchronized with the world you passed.
|
||||
*
|
||||
*
|
||||
* @param job
|
||||
* - final job
|
||||
*/
|
||||
|
||||
@@ -24,14 +24,14 @@ public interface ICraftingGrid extends IGridCache
|
||||
|
||||
/**
|
||||
* Begin calculating a crafting job.
|
||||
*
|
||||
*
|
||||
* @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
|
||||
* on this, your be waiting forever.
|
||||
*/
|
||||
@@ -39,22 +39,22 @@ public interface ICraftingGrid extends IGridCache
|
||||
|
||||
/**
|
||||
* Submit the job to the Crafting system for processing.
|
||||
*
|
||||
*
|
||||
* @param job
|
||||
* - the crafting job from beginCraftingJob
|
||||
* @param requestingMachine
|
||||
* - a machine if its being requested via automation, may be null.
|
||||
* @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 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.
|
||||
*
|
||||
*
|
||||
* @return null ( if failed ) or an {@link ICraftingLink} other wise, if you send requestingMachine you need to
|
||||
* properly keep track of this and handle the nbt saving and loading of the object as well as the
|
||||
* {@link ICraftingRequester} methods. if you send null, this object should be discarded after verifying the
|
||||
@@ -75,7 +75,7 @@ public interface ICraftingGrid extends IGridCache
|
||||
|
||||
/**
|
||||
* is this item being crafted?
|
||||
*
|
||||
*
|
||||
* @param aeStackInSlot item being crafted
|
||||
* @return true if it is being crafting
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,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 plan
|
||||
*/
|
||||
void populatePlan(IItemList<IAEItemStack> plan);
|
||||
|
||||
@@ -27,7 +27,7 @@ public interface ICraftingLink
|
||||
|
||||
/**
|
||||
* write the link to an NBT Tag
|
||||
*
|
||||
*
|
||||
* @param tag to be written data
|
||||
*/
|
||||
void writeToNBT(NBTTagCompound tag);
|
||||
|
||||
@@ -11,7 +11,7 @@ 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 patternDetails details
|
||||
* @param table crafting table
|
||||
* @return if the pattern was successfully pushed.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package appeng.api.networking.crafting;
|
||||
|
||||
import appeng.api.implementations.ICraftingPatternItem;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import appeng.api.implementations.ICraftingPatternItem;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
/**
|
||||
* do not implement provided by {@link ICraftingPatternItem}
|
||||
*
|
||||
*
|
||||
* caching this instance will increase performance of validation and checks.
|
||||
*/
|
||||
public interface ICraftingPatternDetails
|
||||
@@ -23,7 +23,7 @@ public interface ICraftingPatternDetails
|
||||
* @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.
|
||||
*/
|
||||
boolean isValidItemForSlot(int slotIndex, ItemStack itemStack, World world);
|
||||
@@ -60,7 +60,7 @@ public interface ICraftingPatternDetails
|
||||
|
||||
/**
|
||||
* Allow using this instance of the pattern details to preform the crafting action with performance enhancements.
|
||||
*
|
||||
*
|
||||
* @param craftingInv inventory
|
||||
* @param world crafting world
|
||||
* @return the crafted ( work bench ) item.
|
||||
@@ -69,7 +69,7 @@ public interface ICraftingPatternDetails
|
||||
|
||||
/**
|
||||
* Set the priority the of this pattern.
|
||||
*
|
||||
*
|
||||
* @param priority priority of pattern
|
||||
*/
|
||||
void setPriority(int priority);
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface ICraftingProvider extends ICraftingMedium
|
||||
|
||||
/**
|
||||
* called when the network is looking for possible crafting jobs.
|
||||
*
|
||||
*
|
||||
* @param craftingTracker crafting helper
|
||||
*/
|
||||
void provideCrafting(ICraftingProviderHelper craftingTracker);
|
||||
|
||||
@@ -3,7 +3,6 @@ package appeng.api.networking.crafting;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
public interface ICraftingRequester extends IActionHost
|
||||
@@ -12,7 +11,7 @@ public interface ICraftingRequester extends IActionHost
|
||||
/**
|
||||
* called when the host is added to the grid, and should return all crafting links it poses so they can be connected
|
||||
* with the cpu that hosts the job.
|
||||
*
|
||||
*
|
||||
* @return set of jobs, or an empty list.
|
||||
*/
|
||||
ImmutableSet<ICraftingLink> getRequestedJobs();
|
||||
@@ -20,7 +19,7 @@ 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 item
|
||||
* @param mode action mode
|
||||
* @return unwanted item
|
||||
@@ -29,7 +28,7 @@ public interface ICraftingRequester extends IActionHost
|
||||
|
||||
/**
|
||||
* called when the job changes from in progress, to either complete, or canceled.
|
||||
*
|
||||
*
|
||||
* after this call the crafting link is "dead" and should be discarded.
|
||||
*/
|
||||
void jobStateChange(ICraftingLink link);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package appeng.api.networking.crafting;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface ICraftingWatcher extends Collection<IAEStack>
|
||||
{
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ public interface ICraftingWatcherHost
|
||||
/**
|
||||
* 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 crafting watcher for this host
|
||||
*/
|
||||
void updateWatcher(ICraftingWatcher newWatcher);
|
||||
|
||||
/**
|
||||
* Called when a crafting status changes.
|
||||
*
|
||||
*
|
||||
* @param craftingGrid current crafting grid
|
||||
* @param what change
|
||||
*/
|
||||
|
||||
@@ -11,10 +11,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 amt to be injected amount
|
||||
* @param mode action mode
|
||||
*
|
||||
*
|
||||
* @return amount of power which was unable to be stored
|
||||
*/
|
||||
public double injectAEPower(double amt, Actionable mode);
|
||||
@@ -32,14 +32,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 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 access restriction what the network can do
|
||||
*/
|
||||
public AccessRestriction getPowerFlow();
|
||||
|
||||
@@ -30,25 +30,25 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
||||
* 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
|
||||
@@ -59,14 +59,14 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
||||
|
||||
/**
|
||||
* 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();
|
||||
@@ -74,7 +74,7 @@ public interface IEnergyGrid extends IGridCache, IEnergySource, IEnergyGridProvi
|
||||
/**
|
||||
* 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,9 +1,9 @@
|
||||
package appeng.api.networking.energy;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* internal use only.
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@ public interface IEnergySource
|
||||
|
||||
/**
|
||||
* Extract power from the network.
|
||||
*
|
||||
*
|
||||
* @param amt extracted power
|
||||
* @param mode should the action be simulated or performed?
|
||||
* @return returns extracted power.
|
||||
|
||||
@@ -6,14 +6,14 @@ 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 new watcher
|
||||
*/
|
||||
void updateWatcher(IEnergyWatcher newWatcher);
|
||||
|
||||
/**
|
||||
* Called when a threshold is crossed.
|
||||
*
|
||||
*
|
||||
* @param energyGrid grid
|
||||
*/
|
||||
void onThresholdPass(IEnergyGrid energyGrid);
|
||||
|
||||
@@ -5,7 +5,7 @@ import appeng.api.networking.IGridNode;
|
||||
/**
|
||||
* Posted by the network when the booting status of the network goes up
|
||||
* or down, the change is reflected via {@link IGridNode}.isActive()
|
||||
*
|
||||
*
|
||||
* Note: Most machines just need to check {@link IGridNode}.isActive()
|
||||
*/
|
||||
public class MENetworkBootingStatusChange extends MENetworkEvent
|
||||
|
||||
@@ -2,10 +2,10 @@ package appeng.api.networking.events;
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* you do not need to send this event when your node is added / removed from the
|
||||
* grid.
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@ import appeng.api.networking.IGridHost;
|
||||
|
||||
/**
|
||||
* Posted to the {@link IGridHost} when the channels on the node connections are altered.
|
||||
*
|
||||
*
|
||||
* Never posted IGridCaches.
|
||||
*/
|
||||
public class MENetworkChannelsChanged extends MENetworkEvent
|
||||
|
||||
@@ -4,7 +4,7 @@ import appeng.api.networking.IGrid;
|
||||
|
||||
/**
|
||||
* Part of AE's Event Bus.
|
||||
*
|
||||
*
|
||||
* Posted via {@link IGrid}.postEvent or {@link IGrid}.postEventTo
|
||||
*/
|
||||
public class MENetworkEvent
|
||||
@@ -23,7 +23,7 @@ public class MENetworkEvent
|
||||
|
||||
/**
|
||||
* called by AE after each object is called to cancel any future calls.
|
||||
*
|
||||
*
|
||||
* @return true to cancel future calls
|
||||
*/
|
||||
public boolean isCanceled()
|
||||
@@ -33,7 +33,7 @@ public class MENetworkEvent
|
||||
|
||||
/**
|
||||
* the number of objects that were visited by the event.
|
||||
*
|
||||
*
|
||||
* @return number of visitors
|
||||
*/
|
||||
public int getVisitedObjects()
|
||||
@@ -43,7 +43,7 @@ public class MENetworkEvent
|
||||
|
||||
/**
|
||||
* Called by AE after iterating the event subscribers.
|
||||
*
|
||||
*
|
||||
* @param v current number of visitors
|
||||
*/
|
||||
public void setVisitedObjects(int v)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package appeng.api.networking.events;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
import appeng.api.networking.IGridCache;
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* Usable on any {@link IGridHost}, or {@link IGridCache}
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@ import appeng.api.networking.IGridNode;
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* you do not need to send this event when your node is added / removed from the grid.
|
||||
*/
|
||||
public class MENetworkPowerIdleChange extends MENetworkEvent
|
||||
|
||||
@@ -7,7 +7,7 @@ import appeng.api.networking.energy.IEnergyGrid;
|
||||
* Posted by the network when the power status of the network goes up or down,
|
||||
* the change is reflected via the {@link IEnergyGrid}.isNetworkPowered() or via
|
||||
* {@link IGridNode}.isActive()
|
||||
*
|
||||
*
|
||||
* Note: Most machines just need to check {@link IGridNode}.isActive()
|
||||
*/
|
||||
public class MENetworkPowerStatusChange extends MENetworkEvent
|
||||
|
||||
@@ -5,10 +5,10 @@ import appeng.api.networking.energy.IAEPowerStorage;
|
||||
/**
|
||||
* informs the network, that a {@link IAEPowerStorage} block that had either run,
|
||||
* out of power, or was full, is no longer in that state.
|
||||
*
|
||||
*
|
||||
* failure to post this event when your {@link IAEPowerStorage} changes state will
|
||||
* result in your block not charging, or not-discharging.
|
||||
*
|
||||
*
|
||||
* you do not need to send this event when your node is added / removed from the grid.
|
||||
*/
|
||||
public class MENetworkPowerStorage extends MENetworkEvent
|
||||
@@ -19,12 +19,12 @@ public class MENetworkPowerStorage extends MENetworkEvent
|
||||
/**
|
||||
* informs the network this tile is ready to receive power again.
|
||||
*/
|
||||
REQUEST_POWER,
|
||||
|
||||
REQUEST_POWER,
|
||||
|
||||
/**
|
||||
* informs the network this tile is ready to provide power again.
|
||||
*/
|
||||
PROVIDE_POWER
|
||||
PROVIDE_POWER
|
||||
}
|
||||
|
||||
public final IAEPowerStorage storage;
|
||||
|
||||
@@ -6,9 +6,9 @@ import appeng.api.storage.StorageChannel;
|
||||
/**
|
||||
* posted by the network when the networks Storage Changes, you can use the currentItems list to check levels, and
|
||||
* update status.
|
||||
*
|
||||
*
|
||||
* this is the least useful method of getting info about changes in the network.
|
||||
*
|
||||
*
|
||||
* Do not modify the list or its contents in anyway.
|
||||
*/
|
||||
public class MENetworkStorageEvent extends MENetworkEvent
|
||||
|
||||
@@ -10,7 +10,7 @@ public interface IActionHost extends IGridHost
|
||||
* Used to for calculating security rules, you must supply a node from your
|
||||
* IGridHost for the security test, this should be the primary node for the
|
||||
* machine, unless the action is preformed by a non primary node.
|
||||
*
|
||||
*
|
||||
* @return the the gridnode that actions from this IGridHost are preformed
|
||||
* by.
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package appeng.api.networking.security;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.networking.IGridCache;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public interface ISecurityGrid extends IGridCache
|
||||
{
|
||||
@@ -14,20 +14,20 @@ public interface ISecurityGrid extends IGridCache
|
||||
|
||||
/**
|
||||
* Check if a player has permissions.
|
||||
*
|
||||
*
|
||||
* @param player to be checked player
|
||||
* @param perm checked permissions
|
||||
*
|
||||
*
|
||||
* @return true if the player has permissions.
|
||||
*/
|
||||
boolean hasPermission(EntityPlayer player, SecurityPermissions perm);
|
||||
|
||||
/**
|
||||
* Check if a player has permissions.
|
||||
*
|
||||
*
|
||||
* @param playerID id of player
|
||||
* @param perm checked permissions
|
||||
*
|
||||
*
|
||||
* @return true if the player has permissions.
|
||||
*/
|
||||
boolean hasPermission(int playerID, SecurityPermissions perm);
|
||||
|
||||
@@ -13,14 +13,14 @@ public interface ISecurityProvider
|
||||
|
||||
/**
|
||||
* used to represent the security key for the network, should be based on a unique timestamp.
|
||||
*
|
||||
*
|
||||
* @return unique key.
|
||||
*/
|
||||
long getSecurityKey();
|
||||
|
||||
/**
|
||||
* Push permission data into security cache.
|
||||
*
|
||||
*
|
||||
* @param playerPerms player permissions
|
||||
*/
|
||||
void readPermissions(HashMap<Integer, EnumSet<SecurityPermissions>> playerPerms);
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface ISecurityRegistry
|
||||
|
||||
/**
|
||||
* Submit Permissions into the register.
|
||||
*
|
||||
*
|
||||
* @param PlayerID player id
|
||||
* @param permissions permissions of player
|
||||
*/
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package appeng.api.networking.storage;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public interface IStackWatcher extends Collection<IAEStack>
|
||||
{
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@ 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 stack watcher
|
||||
*/
|
||||
void updateWatcher(IStackWatcher newWatcher);
|
||||
|
||||
/**
|
||||
* Called when a watched item changes amounts.
|
||||
*
|
||||
*
|
||||
* @param o changed item list
|
||||
* @param fullStack old stack
|
||||
* @param diffStack new stack
|
||||
|
||||
@@ -19,20 +19,20 @@ 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);
|
||||
|
||||
@@ -10,27 +10,27 @@ 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);
|
||||
|
||||
@@ -38,18 +38,18 @@ public interface IGridTickable
|
||||
* 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);
|
||||
|
||||
|
||||
@@ -4,39 +4,39 @@ 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);
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
package appeng.api.networking.ticking;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Describes how your tiles ticking is executed.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class TickingRequest
|
||||
{
|
||||
|
||||
/**
|
||||
* the minimum number of ticks that must pass between ticks.
|
||||
*
|
||||
*
|
||||
* Valid Values are : 1+
|
||||
*
|
||||
*
|
||||
* Suggested is 5-20
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final int minTickRate;
|
||||
|
||||
/**
|
||||
* the maximum number of ticks that can pass between ticks, if this value is
|
||||
* exceeded the tile must tick.
|
||||
*
|
||||
*
|
||||
* Valid Values are 1+
|
||||
*
|
||||
*
|
||||
* Suggested is 20-40
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final int maxTickRate;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Determines the current expected state of your node, if your node expects
|
||||
* to be sleeping, then return true.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final boolean isSleeping;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* True only if you call {@link ITickManager}.alertDevice( IGridNode );
|
||||
*
|
||||
*
|
||||
*/
|
||||
public final boolean canBeAlerted;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ public interface IAlphaPassItem
|
||||
|
||||
/**
|
||||
* Extend, and return true to enable a second pass for your parts in the bus rendering pipe line.
|
||||
*
|
||||
*
|
||||
* @param is item
|
||||
* @return true to enable a second pass for your parts in the bus rendering pipe line.
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ public interface IBoxProvider
|
||||
|
||||
/**
|
||||
* add your collision information to the the list.
|
||||
*
|
||||
*
|
||||
* @param boxes collision boxes
|
||||
*/
|
||||
void getBoxes(IPartCollisionHelper boxes);
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Used Internally.
|
||||
*
|
||||
*
|
||||
* not intended for implementation.
|
||||
*/
|
||||
public interface IFacadeContainer
|
||||
@@ -16,7 +16,7 @@ public interface IFacadeContainer
|
||||
|
||||
/**
|
||||
* Attempts to add the {@link IFacadePart} to the given side.
|
||||
*
|
||||
*
|
||||
* @return true if the facade as successfully added.
|
||||
*/
|
||||
boolean addFacade(IFacadePart a);
|
||||
@@ -38,14 +38,14 @@ public interface IFacadeContainer
|
||||
|
||||
/**
|
||||
* write nbt data
|
||||
*
|
||||
*
|
||||
* @param data to be written data
|
||||
*/
|
||||
void writeToNBT(NBTTagCompound data);
|
||||
|
||||
/**
|
||||
* read from stream
|
||||
*
|
||||
*
|
||||
* @param data to be read data
|
||||
* @return true if it was readable
|
||||
* @throws IOException
|
||||
@@ -54,14 +54,14 @@ public interface IFacadeContainer
|
||||
|
||||
/**
|
||||
* read from NBT
|
||||
*
|
||||
*
|
||||
* @param data to be read data
|
||||
*/
|
||||
void readFromNBT(NBTTagCompound data);
|
||||
|
||||
/**
|
||||
* write to stream
|
||||
*
|
||||
*
|
||||
* @param data to be written data
|
||||
* @throws IOException
|
||||
*/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package appeng.api.parts;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Used Internally.
|
||||
*
|
||||
*
|
||||
* not intended for implementation.
|
||||
*/
|
||||
public interface IFacadePart
|
||||
@@ -24,7 +24,7 @@ public interface IFacadePart
|
||||
|
||||
/**
|
||||
* used to collide, and pick the part
|
||||
*
|
||||
*
|
||||
* @param ch collision helper
|
||||
* @param e colliding entity
|
||||
*/
|
||||
@@ -32,7 +32,7 @@ public interface IFacadePart
|
||||
|
||||
/**
|
||||
* render the part.
|
||||
*
|
||||
*
|
||||
* @param x x pos of part
|
||||
* @param y y pos of part
|
||||
* @param z z pos of part
|
||||
@@ -47,7 +47,7 @@ public interface IFacadePart
|
||||
|
||||
/**
|
||||
* render the part in inventory.
|
||||
*
|
||||
*
|
||||
* @param instance render helper
|
||||
* @param renderer renderer
|
||||
*/
|
||||
|
||||
@@ -7,9 +7,9 @@ public interface IPartCollisionHelper
|
||||
|
||||
/**
|
||||
* add a collision box, expects 0.0 - 16.0 block coords.
|
||||
*
|
||||
*
|
||||
* No complaints about the size, I like using pixels :P
|
||||
*
|
||||
*
|
||||
* @param minX minimal x collision
|
||||
* @param minY minimal y collision
|
||||
* @param minZ minimal z collision
|
||||
|
||||
@@ -10,26 +10,26 @@ public interface IPartHelper
|
||||
/**
|
||||
* Register a new layer with the part layer system, this allows you to write
|
||||
* an in between between tile entities and parts.
|
||||
*
|
||||
*
|
||||
* AE By Default includes,
|
||||
*
|
||||
*
|
||||
* 1. ISidedInventory ( and by extension IInventory. )
|
||||
*
|
||||
*
|
||||
* 2. IFluidHandler Forge Fluids
|
||||
*
|
||||
*
|
||||
* 3. IPowerEmitter BC Power output.
|
||||
*
|
||||
*
|
||||
* 4. IPowerReceptor BC Power input.
|
||||
*
|
||||
*
|
||||
* 5. IEnergySink IC2 Power input.
|
||||
*
|
||||
*
|
||||
* 6. IEnergySource IC2 Power output.
|
||||
*
|
||||
*
|
||||
* 7. IPipeConnection BC Pipe Connections
|
||||
*
|
||||
*
|
||||
* As long as a valid layer is registered for a interface you can simply
|
||||
* implement that interface on a part get implement it.
|
||||
*
|
||||
*
|
||||
* @return true on success, false on failure, usually a error will be logged
|
||||
* as well.
|
||||
*/
|
||||
@@ -42,7 +42,7 @@ public interface IPartHelper
|
||||
|
||||
/**
|
||||
* use in use item, to try and place a IBusItem
|
||||
*
|
||||
*
|
||||
* @param is ItemStack of an item which implements {@link IPartItem}
|
||||
* @param x x pos of part
|
||||
* @param y y pos of part
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Set;
|
||||
|
||||
/**
|
||||
* Implemented on AE's TileEntity or AE's FMP Part.
|
||||
*
|
||||
*
|
||||
* Do Not Implement
|
||||
*/
|
||||
public interface IPartHost
|
||||
@@ -26,7 +26,7 @@ public interface IPartHost
|
||||
/**
|
||||
* Test if you can add a part to the specified side of the Part Host, {@link ForgeDirection}.UNKNOWN is used to
|
||||
* represent the cable in the middle.
|
||||
*
|
||||
*
|
||||
* @param part to be added part
|
||||
* @param side part placed onto side
|
||||
* @return returns false if the part cannot be added.
|
||||
@@ -35,7 +35,7 @@ public interface IPartHost
|
||||
|
||||
/**
|
||||
* try to add a new part to the specified side, returns false if it failed to be added.
|
||||
*
|
||||
*
|
||||
* @param is new part
|
||||
* @param side onto side
|
||||
* @param owner with owning player
|
||||
@@ -46,7 +46,7 @@ public interface IPartHost
|
||||
|
||||
/**
|
||||
* Get part by side ( center is {@link ForgeDirection}.UNKNOWN )
|
||||
*
|
||||
*
|
||||
* @param side side of part
|
||||
* @return the part located on the specified side, or null if there is no part.
|
||||
*/
|
||||
@@ -55,9 +55,9 @@ public interface IPartHost
|
||||
/**
|
||||
* removes the part on the side, this doesn't drop it or anything, if you don't do something with it, its just
|
||||
* "gone" and its never coming back; think about it.
|
||||
*
|
||||
*
|
||||
* if you want to drop the part you must request it prior to removing it.
|
||||
*
|
||||
*
|
||||
* @param side side of part
|
||||
* @param suppressUpdate
|
||||
* - used if you need to replace a part's instance, without really removing it first.
|
||||
@@ -92,14 +92,14 @@ public interface IPartHost
|
||||
|
||||
/**
|
||||
* Used to test for FMP microblock blocking internally.
|
||||
*
|
||||
*
|
||||
* @return returns if microblocks are blocking this cable path.
|
||||
*/
|
||||
boolean isBlocked(ForgeDirection side);
|
||||
|
||||
/**
|
||||
* finds the part located at the position ( pos must be relative, not global )
|
||||
*
|
||||
*
|
||||
* @param pos part position
|
||||
* @return a new SelectedPart, this is never null.
|
||||
*/
|
||||
@@ -117,7 +117,7 @@ public interface IPartHost
|
||||
|
||||
/**
|
||||
* get the redstone state of host on this side, this value is cached internally.
|
||||
*
|
||||
*
|
||||
* @param side side of part
|
||||
* @return true of the part host is receiving redstone from an external source.
|
||||
*/
|
||||
@@ -145,7 +145,7 @@ public interface IPartHost
|
||||
|
||||
/**
|
||||
* true if the tile is in the world, other wise false.
|
||||
*
|
||||
*
|
||||
* @return true if tile is in world
|
||||
*/
|
||||
boolean isInWorld();
|
||||
|
||||
@@ -5,9 +5,9 @@ import net.minecraft.item.ItemStack;
|
||||
//@formatter:off
|
||||
/**
|
||||
* This is a pretty basic requirement, once you implement the interface, and createPartFromItemStack
|
||||
*
|
||||
*
|
||||
* you must register your bus with the Bus renderer, using AEApi.instance().partHelper().setItemBusRenderer( this );
|
||||
*
|
||||
*
|
||||
* then simply add these two methods, which tell MC to use the Block Textures, and call AE's Bus Placement Code.
|
||||
*
|
||||
* <pre>
|
||||
@@ -33,7 +33,7 @@ public interface IPartItem
|
||||
|
||||
/**
|
||||
* create a new part instance, from the item stack.
|
||||
*
|
||||
*
|
||||
* @param is item
|
||||
* @return part from item
|
||||
*/
|
||||
|
||||
@@ -14,9 +14,9 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* sets the Render Helpers Block Bounds. 0.0 - 16.0 block coords.
|
||||
*
|
||||
*
|
||||
* No complaints about the size, I like using pixels :P
|
||||
*
|
||||
*
|
||||
* @param minX minimal x bound
|
||||
* @param minY minimal y bound
|
||||
* @param minZ minimal z bound
|
||||
@@ -28,9 +28,9 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* static renderer
|
||||
*
|
||||
*
|
||||
* render a single face.
|
||||
*
|
||||
*
|
||||
* @param x x coord of part
|
||||
* @param y y coord of part
|
||||
* @param z z coord of part
|
||||
@@ -43,9 +43,9 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* static renderer
|
||||
*
|
||||
*
|
||||
* render a box with a cut out box in the center.
|
||||
*
|
||||
*
|
||||
* @param x x pos of part
|
||||
* @param y y pos of part
|
||||
* @param z z pos of part
|
||||
@@ -59,9 +59,9 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* static renderer
|
||||
*
|
||||
*
|
||||
* render a block of specified bounds.
|
||||
*
|
||||
*
|
||||
* @param x x pos of block
|
||||
* @param y y pos of block
|
||||
* @param z z pos of block
|
||||
@@ -72,7 +72,7 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* render a single face in inventory renderer.
|
||||
*
|
||||
*
|
||||
* @param IIcon icon of part
|
||||
* @param direction face of part
|
||||
* @param renderer renderer
|
||||
@@ -82,7 +82,7 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* render a box in inventory renderer.
|
||||
*
|
||||
*
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -90,9 +90,9 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* inventory, and static renderer.
|
||||
*
|
||||
*
|
||||
* set unique icons for each side of the block.
|
||||
*
|
||||
*
|
||||
* @param down down face
|
||||
* @param up up face
|
||||
* @param north north face
|
||||
@@ -104,16 +104,16 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* inventory, and static renderer.
|
||||
*
|
||||
*
|
||||
* set all sides to a single IIcon.
|
||||
*
|
||||
*
|
||||
* @param ico to be set icon
|
||||
*/
|
||||
void setTexture(IIcon ico);
|
||||
|
||||
/**
|
||||
* configure the color multiplier for the inventory renderer.
|
||||
*
|
||||
*
|
||||
* @param whiteVariant color multiplier
|
||||
*/
|
||||
void setInvColor(int whiteVariant);
|
||||
@@ -141,7 +141,7 @@ public interface IPartRenderHelper
|
||||
/**
|
||||
* Pre-Calculates default lighting for the part, call this before using the render helper to render anything else to
|
||||
* get simplified, but faster lighting for more then one block.
|
||||
*
|
||||
*
|
||||
* Only worth it if you render more then 1 block.
|
||||
*/
|
||||
ISimplifiedBundle useSimplifiedRendering(int x, int y, int z, IBoxProvider p, ISimplifiedBundle sim);
|
||||
@@ -153,7 +153,7 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* render a block using the current renderer state.
|
||||
*
|
||||
*
|
||||
* @param x x pos of part
|
||||
* @param y y pos of part
|
||||
* @param z z pos of part
|
||||
@@ -163,14 +163,14 @@ public interface IPartRenderHelper
|
||||
|
||||
/**
|
||||
* allow you to enable your part to render during the alpha pass or the standard pass.
|
||||
*
|
||||
*
|
||||
* @param pass render pass
|
||||
*/
|
||||
void renderForPass(int pass);
|
||||
|
||||
/**
|
||||
* Set which faces to render, remember to set back to ALL when you are done.
|
||||
*
|
||||
*
|
||||
* @param complementOf sides to render
|
||||
*/
|
||||
void setFacesToRender(EnumSet<ForgeDirection> complementOf);
|
||||
|
||||
@@ -14,9 +14,9 @@ public abstract class LayerBase extends TileEntity // implements IPartHost
|
||||
|
||||
/**
|
||||
* Grants access for the layer to the parts of the host.
|
||||
*
|
||||
*
|
||||
* This Method looks silly, that is because its not used at runtime, a real implementation will be used instead.
|
||||
*
|
||||
*
|
||||
* @param side side of part
|
||||
* @return the part for the requested side.
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface ICraftHandler
|
||||
|
||||
/**
|
||||
* Called when your recipe handler receives a newly parsed list of inputs/outputs.
|
||||
*
|
||||
*
|
||||
* @param input parsed inputs
|
||||
* @param output parsed outputs
|
||||
* @throws RecipeError
|
||||
@@ -20,7 +20,7 @@ public interface ICraftHandler
|
||||
|
||||
/**
|
||||
* called when all recipes are parsed, and your required to register your recipe.
|
||||
*
|
||||
*
|
||||
* @throws RegistrationError
|
||||
* @throws MissingIngredientError
|
||||
*/
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package appeng.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.exceptions.MissingIngredientError;
|
||||
import appeng.api.exceptions.RegistrationError;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IIngredient {
|
||||
|
||||
/**
|
||||
* Acquire a single input stack for the current recipe, if more then one ItemStack is possible a
|
||||
* RegistrationError exception will be thrown, ignore these and let the system handle the error.
|
||||
*
|
||||
*
|
||||
* @return a single ItemStack for the recipe handler.
|
||||
*
|
||||
*
|
||||
* @throws RegistrationError
|
||||
* @throws MissingIngredientError
|
||||
*/
|
||||
@@ -20,7 +20,7 @@ public interface IIngredient {
|
||||
/**
|
||||
* Acquire a list of all the input stacks for the current recipe, this is for handlers that support
|
||||
* multiple inputs per slot.
|
||||
*
|
||||
*
|
||||
* @return an array of ItemStacks for the recipe handler.
|
||||
* @throws RegistrationError
|
||||
* @throws MissingIngredientError
|
||||
@@ -29,35 +29,35 @@ public interface IIngredient {
|
||||
|
||||
/**
|
||||
* If you wish to support air, you must test before getting the ItemStack, or ItemStackSet
|
||||
*
|
||||
*
|
||||
* @return true if this slot contains no ItemStack, this is passed as "_"
|
||||
*/
|
||||
public boolean isAir();
|
||||
|
||||
|
||||
/**
|
||||
* @return The Name Space of the item. Prefer getItemStack or getItemStackSet
|
||||
* @return The Name Space of the item. Prefer getItemStack or getItemStackSet
|
||||
*/
|
||||
public String getNameSpace();
|
||||
|
||||
/**
|
||||
* @return The Name of the item. Prefer getItemStack or getItemStackSet
|
||||
* @return The Name of the item. Prefer getItemStack or getItemStackSet
|
||||
*/
|
||||
public String getItemName();
|
||||
|
||||
/**
|
||||
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
|
||||
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
|
||||
*/
|
||||
public int getDamageValue();
|
||||
|
||||
/**
|
||||
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
|
||||
* @return The Damage Value of the item. Prefer getItemStack or getItemStackSet
|
||||
*/
|
||||
public int getQty();
|
||||
|
||||
/**
|
||||
* Bakes the lists in for faster runtime lookups.
|
||||
* @throws MissingIngredientError
|
||||
* @throws RegistrationError
|
||||
* @throws MissingIngredientError
|
||||
* @throws RegistrationError
|
||||
*/
|
||||
void bake() throws RegistrationError, MissingIngredientError;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public interface IRecipeHandler
|
||||
|
||||
/**
|
||||
* Call when you want to read recipes in from a file based on a loader
|
||||
*
|
||||
*
|
||||
* @param loader recipe loader
|
||||
* @param path path of file
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package appeng.api.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ResolverResultSet
|
||||
{
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ public interface ICellContainer extends IActionHost, ICellProvider, ISaveProvide
|
||||
|
||||
/**
|
||||
* tell the Cell container that this slot should blink, the slot number is relative to the
|
||||
*
|
||||
*
|
||||
* @param slot slot index
|
||||
*/
|
||||
void blinkCell(int slot);
|
||||
|
||||
Loaded 100 of 193 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user