Package appeng.api.storage
Class StorageHelper
java.lang.Object
appeng.api.storage.StorageHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic ICraftingLink
loadCraftingLink
(net.minecraft.nbt.CompoundTag data, ICraftingRequester req) load a crafting link from nbt data.static long
poweredExtraction
(IEnergySource energy, MEStorage inv, AEKey request, long amount, IActionSource src) Extracts items from aMEStorage
respecting power requirements.static long
poweredExtraction
(IEnergySource energy, MEStorage inv, AEKey request, long amount, IActionSource src, Actionable mode) Extracts items from aMEStorage
respecting power requirements.static long
poweredInsert
(IEnergySource energy, MEStorage inv, AEKey input, long amount, IActionSource src) Inserts items into aMEStorage
respecting power requirements.static long
poweredInsert
(IEnergySource energy, MEStorage inv, AEKey input, long amount, IActionSource src, Actionable mode) Inserts items into aMEStorage
respecting power requirements.
-
Method Details
-
loadCraftingLink
public static ICraftingLink loadCraftingLink(net.minecraft.nbt.CompoundTag data, ICraftingRequester req) load a crafting link from nbt data.- Parameters:
data
- to be loaded data- Returns:
- crafting link
-
poweredExtraction
public static long poweredExtraction(IEnergySource energy, MEStorage inv, AEKey request, long amount, IActionSource src) Extracts items from aMEStorage
respecting power requirements.- Parameters:
energy
- Energy source.inv
- Inventory to extract from.request
- Requested item and count.src
- Action source.- Returns:
- extracted items or
null
of nothing was extracted.
-
poweredExtraction
public static long poweredExtraction(IEnergySource energy, MEStorage inv, AEKey request, long amount, IActionSource src, Actionable mode) Extracts items from aMEStorage
respecting power requirements.- Parameters:
energy
- Energy source.inv
- Inventory to extract from.request
- Requested item and count.src
- Action source.mode
- Simulate or modulate- Returns:
- extracted items or
null
of nothing was extracted.
-
poweredInsert
public static long poweredInsert(IEnergySource energy, MEStorage inv, AEKey input, long amount, IActionSource src) Inserts items into aMEStorage
respecting power requirements.- Parameters:
energy
- Energy source.inv
- Inventory to insert into.input
- Items to insert.src
- Action source.- Returns:
- the number of items inserted.
-
poweredInsert
public static long poweredInsert(IEnergySource energy, MEStorage inv, AEKey input, long amount, IActionSource src, Actionable mode) Inserts items into aMEStorage
respecting power requirements.- Parameters:
energy
- Energy source.inv
- Inventory to insert into.input
- Items to insert.src
- Action source.mode
- Simulate or modulate- Returns:
- the number of items inserted.
-