Pure daisy now allows variable time recipes, closes #137.

This commit is contained in:
Vincent Lee committed 2016-02-26 19:48:43 -06:00
1 parent 47001131b0
commit 18ea3e6bfb
3 files changed
+31 -13

No files matched your search

@@ -14,6 +14,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
@@ -26,15 +27,18 @@ public class RecipePureDaisy {
private static final Map<String, List<ItemStack>> oreMap = new HashMap<>();
Object input;
IBlockState outputState;
private final Object input;
private final IBlockState outputState;
private final int time;
public RecipePureDaisy(Object input, IBlockState state) {
public RecipePureDaisy(Object input, IBlockState state, int time) {
Preconditions.checkArgument(time >= 0, "Time must be nonnegative");
this.input = input;
this.outputState = state;
this.time = time;
if(input != null && !(input instanceof String || input instanceof Block))
throw new IllegalArgumentException("input must be an oredict String or a Block.");
}
/**
@@ -92,4 +96,8 @@ public class RecipePureDaisy {
return outputState;
}
public int getTime() {
return time;
}
}