public class CraftingJobDependencyGraph
extends java.lang.Object
| Constructor and Description |
|---|
CraftingJobDependencyGraph() |
CraftingJobDependencyGraph(it.unimi.dsi.fastutil.ints.Int2ObjectMap<CraftingJob> craftingJobs,
it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.ints.IntCollection> dependencies,
it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.ints.IntCollection> dependents) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCraftingJobId(CraftingJob craftingJob) |
void |
addDependency(CraftingJob craftingJob,
CraftingJob dependency) |
void |
addDependency(CraftingJob craftingJob,
int dependency) |
static CraftingJobDependencyGraph |
deserialize(net.minecraft.nbt.CompoundNBT tag) |
CraftingJob |
getCraftingJob(int id) |
java.util.Collection<CraftingJob> |
getCraftingJobs() |
java.util.Collection<CraftingJob> |
getDependencies(CraftingJob craftingJob) |
java.util.Collection<CraftingJob> |
getDependents(CraftingJob craftingJob) |
boolean |
hasDependencies(CraftingJob craftingJob) |
boolean |
hasDependencies(int craftingJobId) |
void |
importDependencies(CraftingJobDependencyGraph craftingJobsGraph) |
void |
mergeCraftingJobs(CraftingJob target,
CraftingJob mergee,
boolean markMergeeAsFinished)
Merge the two crafting jobs by adding the second job's amount into the first job's amount.
|
void |
onCraftingJobFinished(CraftingJob craftingJob) |
void |
onCraftingJobFinished(CraftingJob craftingJob,
boolean validateDependencies) |
void |
removeCraftingJobId(CraftingJob craftingJob) |
void |
removeDependency(int craftingJob,
int dependency) |
static net.minecraft.nbt.CompoundNBT |
serialize(CraftingJobDependencyGraph graph) |
public CraftingJobDependencyGraph()
public CraftingJobDependencyGraph(it.unimi.dsi.fastutil.ints.Int2ObjectMap<CraftingJob> craftingJobs, it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.ints.IntCollection> dependencies, it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.ints.IntCollection> dependents)
public java.util.Collection<CraftingJob> getCraftingJobs()
@Nullable public CraftingJob getCraftingJob(int id)
public java.util.Collection<CraftingJob> getDependencies(CraftingJob craftingJob)
public boolean hasDependencies(CraftingJob craftingJob)
public boolean hasDependencies(int craftingJobId)
public java.util.Collection<CraftingJob> getDependents(CraftingJob craftingJob)
public void addCraftingJobId(CraftingJob craftingJob)
public void removeCraftingJobId(CraftingJob craftingJob)
public void onCraftingJobFinished(CraftingJob craftingJob)
public void onCraftingJobFinished(CraftingJob craftingJob, boolean validateDependencies)
public void addDependency(CraftingJob craftingJob, CraftingJob dependency)
public void addDependency(CraftingJob craftingJob, int dependency)
public void removeDependency(int craftingJob,
int dependency)
public void importDependencies(CraftingJobDependencyGraph craftingJobsGraph)
public void mergeCraftingJobs(CraftingJob target, CraftingJob mergee, boolean markMergeeAsFinished)
target - The job that should be merged into.mergee - The job that should be removed and merged into the target job.markMergeeAsFinished - If the mergee job should be marked as finished.public static net.minecraft.nbt.CompoundNBT serialize(CraftingJobDependencyGraph graph)
public static CraftingJobDependencyGraph deserialize(net.minecraft.nbt.CompoundNBT tag)