Changed the AlloySmelter recipe handler to new system
This commit is contained in:
parent
f075d6391c
commit
e01058fca6
4 changed files with 28 additions and 67 deletions
|
@ -4,6 +4,7 @@ import ic2.api.energy.prefab.BasicSink;
|
|||
import ic2.api.tile.IWrenchable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.util.Inventory;
|
||||
|
@ -13,11 +14,19 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable {
|
|||
public int tickTime;
|
||||
public BasicSink energy;
|
||||
public Inventory inventory = new Inventory(3, "TileAlloySmelter", 64);
|
||||
public RecipeCrafter crafter;
|
||||
|
||||
public TileAlloySmelter()
|
||||
{
|
||||
//TODO configs
|
||||
energy = new BasicSink(this, 1000, 2);
|
||||
//Input slots
|
||||
int[] inputs = new int[2];
|
||||
inputs[0] = 0;
|
||||
inputs[1] = 1;
|
||||
int[] outputs = new int[1];
|
||||
outputs[0] = 2;
|
||||
crafter = new RecipeCrafter("alloySmelterRecipe", this, energy, 2, 2, inventory, inputs, outputs);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -25,8 +34,8 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable {
|
|||
{
|
||||
super.updateEntity();
|
||||
energy.updateEntity();
|
||||
crafter.updateEntity();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue