public interface ICraftingGrid extends IGridCache
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.Future<ICraftingJob> |
beginCraftingJob(net.minecraft.world.World world,
IGrid grid,
IActionSource actionSrc,
IAEItemStack craftWhat,
ICraftingCallback callback)
Begin calculating a crafting job.
|
boolean |
canEmitFor(IAEItemStack what) |
com.google.common.collect.ImmutableSet<ICraftingCPU> |
getCpus() |
com.google.common.collect.ImmutableCollection<ICraftingPatternDetails> |
getCraftingFor(IAEItemStack whatToCraft,
ICraftingPatternDetails details,
int slot,
net.minecraft.world.World world) |
boolean |
isRequesting(IAEItemStack what)
is this item being crafted?
|
long |
requesting(IAEItemStack what)
The total amount being requested across all crafting cpus of a grid.
|
ICraftingLink |
submitJob(ICraftingJob job,
ICraftingRequester requestingMachine,
ICraftingCPU target,
boolean prioritizePower,
IActionSource src)
Submit the job to the Crafting system for processing.
|
addNode, onJoin, onSplit, onUpdateTick, populateGridStorage, removeNodecom.google.common.collect.ImmutableCollection<ICraftingPatternDetails> getCraftingFor(IAEItemStack whatToCraft, ICraftingPatternDetails details, int slot, net.minecraft.world.World world)
whatToCraft - requested craftworld - crafting worldslot - slot indexdetails - pattern detailsjava.util.concurrent.Future<ICraftingJob> beginCraftingJob(net.minecraft.world.World world, IGrid grid, IActionSource actionSrc, IAEItemStack craftWhat, ICraftingCallback callback)
world - crafting worldgrid - networkactionSrc - sourcecraftWhat - resultcallback - callback
-- optionalICraftingJob do not wait
on this, your be waiting forever.ICraftingLink submitJob(ICraftingJob job, ICraftingRequester requestingMachine, ICraftingCPU target, boolean prioritizePower, IActionSource src)
job - - the crafting job from beginCraftingJobrequestingMachine - - a machine if its being requested via automation, may be null.target - - can be nullprioritizePower - - 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.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.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
ICraftingRequester methods. if you send null, this object should be discarded after verifying the
return state.com.google.common.collect.ImmutableSet<ICraftingCPU> getCpus()
boolean canEmitFor(IAEItemStack what)
what - to be requested itemboolean isRequesting(IAEItemStack what)
what - item being craftedlong requesting(IAEItemStack what)
what - item being requested, ignores stacksize