Tenor Sourceset
This commit is contained in:
@@ -54,6 +54,10 @@ sourceSets {
|
|||||||
launch {
|
launch {
|
||||||
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
compileClasspath += main.compileClasspath + main.runtimeClasspath + main.output
|
||||||
}
|
}
|
||||||
|
tenor {}
|
||||||
|
main {
|
||||||
|
compileClasspath += tenor.compileClasspath
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
|
|||||||
+10
-5
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
package tenor.game;
|
package tenor.game;
|
||||||
|
|
||||||
import net.minecraft.util.Tuple;
|
|
||||||
import tenor.*;
|
import tenor.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -25,7 +24,7 @@ import java.util.List;
|
|||||||
public class CraftingTask extends QuantizedTaskNode implements ISingleParentQuantizedPriorityAllocator {
|
public class CraftingTask extends QuantizedTaskNode implements ISingleParentQuantizedPriorityAllocator {
|
||||||
|
|
||||||
int outputQuantity;
|
int outputQuantity;
|
||||||
List<Tuple<AquireItemTask, Integer>> recipe;
|
List<RecipeInput> recipe;
|
||||||
|
|
||||||
final AquireCraftingItems inputs;
|
final AquireCraftingItems inputs;
|
||||||
final GetToCraftingTableTask step2;
|
final GetToCraftingTableTask step2;
|
||||||
@@ -62,11 +61,17 @@ public class CraftingTask extends QuantizedTaskNode implements ISingleParentQuan
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int inputSizeFor(AquireItemTask task) {
|
public int inputSizeFor(AquireItemTask task) {
|
||||||
for (Tuple<AquireItemTask, Integer> tup : recipe) {
|
for (RecipeInput item : recipe) {
|
||||||
if (tup.getFirst().equals(task)) {
|
if (item.task.equals(task)) {
|
||||||
return tup.getSecond();
|
return item.quantity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class RecipeInput {
|
||||||
|
|
||||||
|
private AquireItemTask task;
|
||||||
|
private int quantity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user