Added heat to the BlastFurnace
This commit is contained in:
parent
ddb4b5cb20
commit
154e65082a
2 changed files with 23 additions and 2 deletions
|
@ -1,11 +1,16 @@
|
|||
package techreborn.api.recipe.machines;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import techreborn.api.recipe.BaseRecipe;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
|
||||
public class BlastFurnaceRecipe extends BaseRecipe {
|
||||
|
||||
public BlastFurnaceRecipe(ItemStack input1, ItemStack input2, ItemStack output1 , ItemStack output2, int tickTime, int euPerTick) {
|
||||
|
||||
public int neededHeat;
|
||||
|
||||
public BlastFurnaceRecipe(ItemStack input1, ItemStack input2, ItemStack output1 , ItemStack output2, int tickTime, int euPerTick, int neededHeat) {
|
||||
super("blastFurnaceRecipe", tickTime, euPerTick);
|
||||
if (input1 != null)
|
||||
inputs.add(input1);
|
||||
|
@ -15,5 +20,21 @@ public class BlastFurnaceRecipe extends BaseRecipe {
|
|||
inputs.add(output1);
|
||||
if (output2 != null)
|
||||
addOutput(output2);
|
||||
|
||||
this.neededHeat = neededHeat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCraft(TileEntity tile) {
|
||||
if(tile instanceof TileBlastFurnace){
|
||||
TileBlastFurnace blastFurnace = (TileBlastFurnace) tile;
|
||||
return blastFurnace.getHeat() >- neededHeat;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCraft(TileEntity tile) {
|
||||
return super.onCraft(tile);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -481,7 +481,7 @@ public class ModRecipes {
|
|||
|
||||
public static void addBlastFurnaceRecipes()
|
||||
{
|
||||
RecipeHandler.addRecipe(new BlastFurnaceRecipe(new ItemStack(Items.apple), new ItemStack(Items.diamond), new ItemStack(Blocks.acacia_stairs), new ItemStack(Blocks.anvil), 200, 30));
|
||||
RecipeHandler.addRecipe(new BlastFurnaceRecipe(new ItemStack(Items.apple), new ItemStack(Items.diamond), new ItemStack(Blocks.acacia_stairs), new ItemStack(Blocks.anvil), 200, 30, 500));
|
||||
}
|
||||
|
||||
public static void addUUrecipes() {
|
||||
|
|
Loading…
Add table
Reference in a new issue