forked from RepoMirrors/baritone
you are no longer being poisoned by a toxic cloud
This commit is contained in:
parent
3d03f15749
commit
473f872d2f
|
@ -22,13 +22,11 @@ import java.util.List;
|
|||
public class AquireCraftingItems extends QuantizedTaskNode implements IClaimProvider {
|
||||
|
||||
final CraftingTask parent;
|
||||
final QuantizedToQuantizedTaskRelationship parentRelationship;
|
||||
|
||||
public AquireCraftingItems(CraftingTask parent) {
|
||||
super(DependencyType.PARALLEL_ALL);
|
||||
this.parent = parent;
|
||||
this.parentRelationship = createRelationshipToParent(parent);
|
||||
addParent(parentRelationship);
|
||||
addParent(parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -45,7 +43,7 @@ public class AquireCraftingItems extends QuantizedTaskNode implements IClaimProv
|
|||
|
||||
@Override
|
||||
public IQuantityRelationship priority() {
|
||||
return parentRelationship::allocatedPriority; // gamer style
|
||||
return parentTasks().get(0)::allocatedPriority;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,7 +70,7 @@ public class AquireCraftingItems extends QuantizedTaskNode implements IClaimProv
|
|||
|
||||
@Override
|
||||
public int quantityCompletedForParent(IQuantizedChildTaskRelationship relationship) {
|
||||
if (relationship != parentRelationship) {
|
||||
if (relationship != parentTasks().get(0)) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
// our only parent is the crafting task
|
||||
|
|
|
@ -35,7 +35,7 @@ public class AquireItemTask extends QuantizedTaskNode implements IClaimProvider,
|
|||
}
|
||||
|
||||
public void reallocate() {
|
||||
List<IQuantizedChildTaskRelationship> parents = (List<IQuantizedChildTaskRelationship>) (Object) parentTasks();
|
||||
List<IQuantizedChildTaskRelationship> parents = parentTasks();
|
||||
|
||||
allocation.clear();
|
||||
int amountToAllocate = getCurrentQuantityInInventory();
|
||||
|
|
Loading…
Reference in New Issue