Added recipe handler for alloy smelter
This commit is contained in:
parent
e8fc6d5a07
commit
049afe676d
2 changed files with 59 additions and 0 deletions
45
src/main/java/techreborn/api/AlloySmelterRecipe.java
Normal file
45
src/main/java/techreborn/api/AlloySmelterRecipe.java
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
package techreborn.api;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class AlloySmelterRecipe {
|
||||||
|
ItemStack input1, input2;
|
||||||
|
ItemStack output1;
|
||||||
|
int tickTime;
|
||||||
|
int minHeat;
|
||||||
|
|
||||||
|
public AlloySmelterRecipe(ItemStack input1, ItemStack input2, ItemStack output1 ,int tickTime) {
|
||||||
|
this.input1 = input1;
|
||||||
|
this.input2 = input2;
|
||||||
|
this.output1 = output1;
|
||||||
|
this.tickTime = tickTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlloySmelterRecipe(Item input1, Item input2, int inputAmount, Item output1, int tickTime) {
|
||||||
|
if(input1 != null)
|
||||||
|
this.input1 = new ItemStack(input1, inputAmount);
|
||||||
|
if(input2 != null)
|
||||||
|
this.input2 = new ItemStack(input1, inputAmount);
|
||||||
|
if (output1 != null)
|
||||||
|
this.output1 = new ItemStack(output1);
|
||||||
|
this.tickTime = tickTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getInput1() {
|
||||||
|
return input1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getInput2() {
|
||||||
|
return input2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getOutput1() {
|
||||||
|
return output1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getTickTime() {
|
||||||
|
return tickTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import ic2.api.energy.prefab.BasicSink;
|
||||||
import ic2.api.tile.IWrenchable;
|
import ic2.api.tile.IWrenchable;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import techreborn.config.ConfigTechReborn;
|
||||||
import techreborn.init.ModBlocks;
|
import techreborn.init.ModBlocks;
|
||||||
import techreborn.util.Inventory;
|
import techreborn.util.Inventory;
|
||||||
|
|
||||||
|
@ -13,6 +14,19 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable {
|
||||||
public BasicSink energy;
|
public BasicSink energy;
|
||||||
public Inventory inventory = new Inventory(3, "TileAlloySmelter", 64);
|
public Inventory inventory = new Inventory(3, "TileAlloySmelter", 64);
|
||||||
|
|
||||||
|
public TileAlloySmelter()
|
||||||
|
{
|
||||||
|
//TODO configs
|
||||||
|
energy = new BasicSink(this, 1000, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEntity()
|
||||||
|
{
|
||||||
|
super.updateEntity();
|
||||||
|
energy.updateEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side)
|
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue