public class AE2RequesterIntegration
extends java.lang.Object
implements appeng.api.networking.IGridBlock, appeng.api.networking.IGridHost, appeng.api.networking.crafting.ICraftingProvider, appeng.api.networking.crafting.ICraftingWatcherHost, appeng.api.networking.storage.IStackWatcherHost, appeng.api.storage.cells.ICellContainer, appeng.api.networking.ticking.IGridTickable, appeng.api.storage.IMEInventoryHandler<appeng.api.storage.data.IAEItemStack>
| Constructor and Description |
|---|
AE2RequesterIntegration(EntityLogisticsRequester logisticsRequester) |
| Modifier and Type | Method and Description |
|---|---|
void |
blinkCell(int i)
tell the Cell container that this slot should blink, the slot number is relative to the
|
boolean |
canAccept(appeng.api.storage.data.IAEItemStack iaeItemStack)
determine if an item can be accepted and stored.
|
appeng.api.storage.data.IAEItemStack |
extractItems(appeng.api.storage.data.IAEItemStack iaeItemStack,
appeng.api.config.Actionable actionable,
appeng.api.networking.security.IActionSource iActionSource)
Extract the specified item from the ME Inventory
|
appeng.api.config.AccessRestriction |
getAccess()
determine if items can be injected/extracted.
|
appeng.api.networking.IGridNode |
getActionableNode()
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.
|
appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> |
getAvailableItems(appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> iItemList)
request a full report of all available items, storage.
|
appeng.api.util.AECableType |
getCableConnectionType(appeng.api.util.AEPartLocation arg0)
Determines how cables render when they connect to this block.
|
java.util.List<appeng.api.storage.IMEInventoryHandler> |
getCellArray(appeng.api.storage.IStorageChannel<?> channel)
Inventory of the tile for use with ME, should always return an valid list, never NULL.
|
appeng.api.storage.IStorageChannel<appeng.api.storage.data.IAEItemStack> |
getChannel() |
java.util.EnumSet<net.minecraft.util.Direction> |
getConnectableSides()
Determine which sides of the block can be connected too, only used when isWorldAccessible returns true, not used
for
IPart implementations. |
java.util.EnumSet<appeng.api.networking.GridFlags> |
getFlags()
Various flags that AE uses to modify basic behavior for various parts of the network.
|
appeng.api.util.AEColor |
getGridColor() |
appeng.api.networking.IGridNode |
getGridNode(appeng.api.util.AEPartLocation d)
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.
|
double |
getIdlePowerUsage()
how much power to drain per tick as part of idle network usage.
|
appeng.api.util.DimensionalCoord |
getLocation()
Must not return when
IGridBlock.isWorldAccessible() is true. |
appeng.api.networking.IGridHost |
getMachine() |
net.minecraft.item.ItemStack |
getMachineRepresentation()
Determines what item stack is used to render this node in the GUI.
|
int |
getPriority()
the storage's priority.
|
int |
getSlot()
pass back value for blinkCell.
|
appeng.api.networking.ticking.TickingRequest |
getTickingRequest(appeng.api.networking.IGridNode iGridNode)
Return a valid TickingRequest to tell AE a guide for which type of responsiveness your device wants.
|
void |
gridChanged()
called when the grid for the node has changed, the general grid state should not be trusted at this point.
|
appeng.api.storage.data.IAEItemStack |
injectItems(appeng.api.storage.data.IAEItemStack iaeItemStack,
appeng.api.config.Actionable actionable,
appeng.api.networking.security.IActionSource iActionSource)
Store new items, or simulate the addition of new items into the ME Inventory.
|
boolean |
isBusy() |
boolean |
isPlacedOnInterface() |
boolean |
isPrioritized(appeng.api.storage.data.IAEItemStack iaeItemStack)
determine if a particular item is prioritized for this inventory handler, if it is, then it will be added to this
inventory prior to any non-prioritized inventories.
|
boolean |
isWorldAccessible()
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.
|
void |
maybeAddTE(IProvidingInventoryListener.TileEntityAndFace teAndFace) |
void |
maybeCheckForInterface() |
void |
onGridNotification(appeng.api.networking.GridNotification gridNotification)
Called by the
IGridNode to notify its IGridBlock about events. |
void |
onRequestChange(appeng.api.networking.crafting.ICraftingGrid grid,
appeng.api.storage.data.IAEItemStack aeStack)
Called when a crafting status changes.
|
void |
onStackChange(appeng.api.storage.data.IItemList<?> iItemList,
appeng.api.storage.data.IAEStack<?> iaeStack,
appeng.api.storage.data.IAEStack<?> iaeStack1,
appeng.api.networking.security.IActionSource iActionSource,
appeng.api.storage.IStorageChannel<?> iStorageChannel)
Called when a watched item changes amounts.
|
void |
provideCrafting(appeng.api.networking.crafting.ICraftingProviderHelper iCraftingProviderHelper)
called when the network is looking for possible crafting jobs.
|
boolean |
pushPattern(appeng.api.networking.crafting.ICraftingPatternDetails iCraftingPatternDetails,
net.minecraft.inventory.CraftingInventory craftingInventory)
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.
|
void |
saveChanges(appeng.api.storage.cells.ICellInventory<?> iCellInventory)
Cell has changed and needs to be changed.
|
void |
securityBreak()
break this host, its violating security rules, just break your block, or part.
|
void |
setEnabled(boolean ae2enabled) |
void |
shutdown() |
appeng.api.networking.ticking.TickRateModulation |
tickingRequest(appeng.api.networking.IGridNode iGridNode,
int i)
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.
|
void |
updateWatcher(appeng.api.networking.crafting.ICraftingWatcher watcher)
provides the ICraftingWatcher for this host, for the current network, is called when the hot changes networks.
|
void |
updateWatcher(appeng.api.networking.storage.IStackWatcher watcher)
provides the IStackWatcher for this host, for the current network, is called when the hot changes networks.
|
boolean |
validForPass(int i)
AE Uses a two pass placement system, the first pass checks contents and tries to find a place where the item
belongs, however in some cases you can save processor time, or require that the second, or first pass is simply
ignored, this allows you to do that.
|
public AE2RequesterIntegration(EntityLogisticsRequester logisticsRequester)
public void maybeAddTE(IProvidingInventoryListener.TileEntityAndFace teAndFace)
public void maybeCheckForInterface()
public boolean isPlacedOnInterface()
public void shutdown()
public void setEnabled(boolean ae2enabled)
public appeng.api.util.AECableType getCableConnectionType(appeng.api.util.AEPartLocation arg0)
appeng.api.networking.IGridHostgetCableConnectionType in interface appeng.api.networking.IGridHostarg0 - directionpublic void securityBreak()
appeng.api.networking.IGridHostsecurityBreak in interface appeng.api.networking.IGridHostpublic appeng.api.networking.IGridNode getGridNode(appeng.api.util.AEPartLocation d)
appeng.api.networking.IGridHostgetGridNode in interface appeng.api.networking.IGridHostd - feel free to ignore this, most blocks will use the same node for every side.public double getIdlePowerUsage()
appeng.api.networking.IGridBlockgetIdlePowerUsage in interface appeng.api.networking.IGridBlock@Nonnull public java.util.EnumSet<appeng.api.networking.GridFlags> getFlags()
appeng.api.networking.IGridBlockgetFlags in interface appeng.api.networking.IGridBlockpublic boolean isWorldAccessible()
appeng.api.networking.IGridBlockisWorldAccessible in interface appeng.api.networking.IGridBlock@Nonnull public appeng.api.util.DimensionalCoord getLocation()
appeng.api.networking.IGridBlockIGridBlock.isWorldAccessible() is true. Otherwise the behavior is unspecified.getLocation in interface appeng.api.networking.IGridBlock@Nonnull public appeng.api.util.AEColor getGridColor()
getGridColor in interface appeng.api.networking.IGridBlockpublic void onGridNotification(@Nonnull
appeng.api.networking.GridNotification gridNotification)
appeng.api.networking.IGridBlockIGridNode to notify its IGridBlock about events.onGridNotification in interface appeng.api.networking.IGridBlock@Nonnull public java.util.EnumSet<net.minecraft.util.Direction> getConnectableSides()
appeng.api.networking.IGridBlockIPart implementations.getConnectableSides in interface appeng.api.networking.IGridBlock@Nonnull public appeng.api.networking.IGridHost getMachine()
getMachine in interface appeng.api.networking.IGridBlockpublic void gridChanged()
appeng.api.networking.IGridBlockgridChanged in interface appeng.api.networking.IGridBlock@Nonnull public net.minecraft.item.ItemStack getMachineRepresentation()
appeng.api.networking.IGridBlockgetMachineRepresentation in interface appeng.api.networking.IGridBlockpublic void provideCrafting(appeng.api.networking.crafting.ICraftingProviderHelper iCraftingProviderHelper)
appeng.api.networking.crafting.ICraftingProviderprovideCrafting in interface appeng.api.networking.crafting.ICraftingProvideriCraftingProviderHelper - crafting helperpublic boolean pushPattern(appeng.api.networking.crafting.ICraftingPatternDetails iCraftingPatternDetails,
net.minecraft.inventory.CraftingInventory craftingInventory)
appeng.api.networking.crafting.ICraftingMediumpushPattern in interface appeng.api.networking.crafting.ICraftingMediumiCraftingPatternDetails - detailscraftingInventory - crafting tablepublic boolean isBusy()
isBusy in interface appeng.api.networking.crafting.ICraftingMediumpublic void updateWatcher(appeng.api.networking.crafting.ICraftingWatcher watcher)
appeng.api.networking.crafting.ICraftingWatcherHostupdateWatcher in interface appeng.api.networking.crafting.ICraftingWatcherHostwatcher - crafting watcher for this hostpublic void onRequestChange(appeng.api.networking.crafting.ICraftingGrid grid,
appeng.api.storage.data.IAEItemStack aeStack)
appeng.api.networking.crafting.ICraftingWatcherHostonRequestChange in interface appeng.api.networking.crafting.ICraftingWatcherHostgrid - current crafting gridaeStack - change@Nullable public appeng.api.networking.IGridNode getActionableNode()
appeng.api.networking.security.IActionHostgetActionableNode in interface appeng.api.networking.security.IActionHostpublic void updateWatcher(appeng.api.networking.storage.IStackWatcher watcher)
appeng.api.networking.storage.IStackWatcherHostupdateWatcher in interface appeng.api.networking.storage.IStackWatcherHostwatcher - stack watcherpublic void onStackChange(appeng.api.storage.data.IItemList<?> iItemList,
appeng.api.storage.data.IAEStack<?> iaeStack,
appeng.api.storage.data.IAEStack<?> iaeStack1,
appeng.api.networking.security.IActionSource iActionSource,
appeng.api.storage.IStorageChannel<?> iStorageChannel)
appeng.api.networking.storage.IStackWatcherHostonStackChange in interface appeng.api.networking.storage.IStackWatcherHostiItemList - changed item listiaeStack - old stackiaeStack1 - new stackiActionSource - action sourceiStorageChannel - storage channel@Nonnull
public appeng.api.networking.ticking.TickingRequest getTickingRequest(@Nonnull
appeng.api.networking.IGridNode iGridNode)
appeng.api.networking.ticking.IGridTickablegetTickingRequest in interface appeng.api.networking.ticking.IGridTickable@Nonnull
public appeng.api.networking.ticking.TickRateModulation tickingRequest(@Nonnull
appeng.api.networking.IGridNode iGridNode,
int i)
appeng.api.networking.ticking.IGridTickabletickingRequest in interface appeng.api.networking.ticking.IGridTickablei - 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.public appeng.api.config.AccessRestriction getAccess()
appeng.api.storage.IMEInventoryHandlergetAccess in interface appeng.api.storage.IMEInventoryHandler<appeng.api.storage.data.IAEItemStack>public boolean isPrioritized(appeng.api.storage.data.IAEItemStack iaeItemStack)
appeng.api.storage.IMEInventoryHandlerisPrioritized in interface appeng.api.storage.IMEInventoryHandler<appeng.api.storage.data.IAEItemStack>iaeItemStack - - item that might be addedpublic boolean canAccept(appeng.api.storage.data.IAEItemStack iaeItemStack)
appeng.api.storage.IMEInventoryHandlercanAccept in interface appeng.api.storage.IMEInventoryHandler<appeng.api.storage.data.IAEItemStack>iaeItemStack - - item that might be addedpublic int getSlot()
appeng.api.storage.IMEInventoryHandlergetSlot in interface appeng.api.storage.IMEInventoryHandler<appeng.api.storage.data.IAEItemStack>ICellContainer will be called with this value, only trust the return value of this method if you
are the implementer of this.public boolean validForPass(int i)
appeng.api.storage.IMEInventoryHandlervalidForPass in interface appeng.api.storage.IMEInventoryHandler<appeng.api.storage.data.IAEItemStack>i - - pass number ( 1 or 2 )public appeng.api.storage.data.IAEItemStack injectItems(appeng.api.storage.data.IAEItemStack iaeItemStack,
appeng.api.config.Actionable actionable,
appeng.api.networking.security.IActionSource iActionSource)
appeng.api.storage.IMEInventoryinjectItems in interface appeng.api.storage.IMEInventory<appeng.api.storage.data.IAEItemStack>iaeItemStack - item to add.actionable - action typeiActionSource - action sourcepublic appeng.api.storage.data.IAEItemStack extractItems(appeng.api.storage.data.IAEItemStack iaeItemStack,
appeng.api.config.Actionable actionable,
appeng.api.networking.security.IActionSource iActionSource)
appeng.api.storage.IMEInventoryextractItems in interface appeng.api.storage.IMEInventory<appeng.api.storage.data.IAEItemStack>iaeItemStack - item to request ( with stack size. )actionable - simulate, or perform action?public appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> getAvailableItems(appeng.api.storage.data.IItemList<appeng.api.storage.data.IAEItemStack> iItemList)
appeng.api.storage.IMEInventorygetAvailableItems in interface appeng.api.storage.IMEInventory<appeng.api.storage.data.IAEItemStack>iItemList - the IItemList the results will be written toopublic appeng.api.storage.IStorageChannel<appeng.api.storage.data.IAEItemStack> getChannel()
getChannel in interface appeng.api.storage.IMEInventory<appeng.api.storage.data.IAEItemStack>public void blinkCell(int i)
appeng.api.storage.cells.ICellContainerblinkCell in interface appeng.api.storage.cells.ICellContaineri - slot indexpublic java.util.List<appeng.api.storage.IMEInventoryHandler> getCellArray(appeng.api.storage.IStorageChannel<?> channel)
appeng.api.storage.cells.ICellProvidergetCellArray in interface appeng.api.storage.cells.ICellProviderpublic int getPriority()
appeng.api.storage.cells.ICellProvidergetPriority in interface appeng.api.storage.cells.ICellProvidergetPriority in interface appeng.api.storage.IMEInventoryHandler<appeng.api.storage.data.IAEItemStack>public void saveChanges(@Nullable
appeng.api.storage.cells.ICellInventory<?> iCellInventory)
appeng.api.storage.cells.ISaveProvidersaveChanges in interface appeng.api.storage.cells.ISaveProvideriCellInventory - can be null for custom cells.