misc
This commit is contained in:
@@ -29,7 +29,7 @@ public class CraftingTask extends QuantizedTaskNode implements ISingleParentQuan
|
||||
|
||||
final AquireCraftingItems inputs;
|
||||
final GetToCraftingTableTask step2;
|
||||
final ActuallyCraftTask step3;
|
||||
final DoCraft step3;
|
||||
|
||||
final AquireItemTask parent;
|
||||
|
||||
@@ -38,7 +38,7 @@ public class CraftingTask extends QuantizedTaskNode implements ISingleParentQuan
|
||||
this.inputs = new AquireCraftingItems(this); // this adds the relationship
|
||||
this.step2 = registry().getSingleton(GetToCraftingTableTask.class);
|
||||
step2.addParent(this);
|
||||
this.step3 = new ActuallyCraftTask(this);
|
||||
this.step3 = new DoCraft(this);
|
||||
|
||||
this.parent = parent;
|
||||
addParent(parent);
|
||||
|
||||
+2
-2
@@ -20,11 +20,11 @@ package tenor.game;
|
||||
import tenor.ISingleParentSingularPriorityAllocator;
|
||||
import tenor.SingularTaskLeaf;
|
||||
|
||||
public class ActuallyCraftTask extends SingularTaskLeaf implements ISingleParentSingularPriorityAllocator {
|
||||
public class DoCraft extends SingularTaskLeaf implements ISingleParentSingularPriorityAllocator {
|
||||
|
||||
public final CraftingTask parent;
|
||||
|
||||
public ActuallyCraftTask(CraftingTask parent) {
|
||||
public DoCraft(CraftingTask parent) {
|
||||
super(parent.bot);
|
||||
this.parent = parent;
|
||||
addParent(parent);
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* This file is part of Baritone.
|
||||
*
|
||||
* Baritone is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Baritone is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tenor.game;
|
||||
|
||||
import tenor.IQuantityRelationship;
|
||||
import tenor.ISingleParentQuantizedPriorityAllocator;
|
||||
import tenor.QuantizedTaskLeaf;
|
||||
|
||||
public class DoMine extends QuantizedTaskLeaf implements ISingleParentQuantizedPriorityAllocator {
|
||||
final MineTask parent;
|
||||
|
||||
public DoMine(MineTask parent) {
|
||||
super(parent.bot);
|
||||
this.parent = parent;
|
||||
addParent(parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IQuantityRelationship cost() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -17,24 +17,31 @@
|
||||
|
||||
package tenor.game;
|
||||
|
||||
import tenor.IQuantityRelationship;
|
||||
import tenor.ISingleParentQuantizedPriorityAllocator;
|
||||
import tenor.QuantizedTaskLeaf;
|
||||
import tenor.*;
|
||||
|
||||
public class MineTask extends QuantizedTaskLeaf implements ISingleParentQuantizedPriorityAllocator {
|
||||
public class MineTask extends QuantizedTaskNode implements ISingleParentQuantizedPriorityAllocator {
|
||||
|
||||
// TODO shared claims of block locations in the world across all mine tasks across all bots
|
||||
|
||||
final AquireItemTask parent;
|
||||
|
||||
final DoMine doMine;
|
||||
|
||||
|
||||
public MineTask(AquireItemTask parent) {
|
||||
super(parent.bot);
|
||||
super(parent.bot, DependencyType.ANY_ONE_OF);
|
||||
this.parent = parent;
|
||||
addParent(parent);
|
||||
this.doMine = new DoMine(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IQuantityRelationship cost() {
|
||||
return x -> x * 324232;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double priorityAllocatedTo(IQuantizedParentTaskRelationship child, int quantity) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* This file is part of Baritone.
|
||||
*
|
||||
* Baritone is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Baritone is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package tenor.game;
|
||||
|
||||
public class MineWithToolTask {
|
||||
}
|
||||
Reference in New Issue
Block a user