This commit is contained in:
modmuss50 2016-11-27 18:31:50 +00:00
parent b1b8537159
commit 54eee49e5d
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
2 changed files with 13 additions and 32 deletions

View file

@ -86,7 +86,7 @@ public class GuiHandler implements IGuiHandler {
} else if (ID == blastFurnaceID) {
return new ContainerBlastFurnace((TileBlastFurnace) world.getTileEntity(new BlockPos(x, y, z)), player);
} else if (ID == alloySmelterID) {
container = new ContainerAlloySmelter();
container = new ContainerAlloySmelter(player, (TileAlloySmelter) world.getTileEntity(new BlockPos(x, y, z)));
} else if (ID == industrialGrinderID) {
return new ContainerIndustrialGrinder((TileIndustrialGrinder) world.getTileEntity(new BlockPos(x, y, z)),
player);

View file

@ -7,24 +7,33 @@ import reborncore.client.gui.BaseSlot;
import reborncore.client.gui.SlotCharge;
import reborncore.client.gui.SlotInput;
import reborncore.client.gui.SlotOutput;
import reborncore.common.recipes.RecipeCrafter;
import techreborn.api.gui.SlotUpgrade;
import techreborn.tiles.TileAlloySmelter;
import javax.annotation.Nullable;
import java.util.List;
public class ContainerAlloySmelter extends ContainerCrafting implements IContainerLayout<TileAlloySmelter> {
public class ContainerAlloySmelter extends ContainerCrafting {
public int tickTime;
EntityPlayer player;
TileAlloySmelter tile;
public ContainerAlloySmelter(EntityPlayer player, TileAlloySmelter tile) {
super(tile.crafter);
this.player = player;
this.tile = tile;
addPlayerSlots();
addInventorySlots();
}
@Override
public boolean canInteractWith(EntityPlayer player) {
return true;
}
@Override
public void addInventorySlots() {
// input
@ -41,7 +50,7 @@ public class ContainerAlloySmelter extends ContainerCrafting implements IContain
this.addSlotToContainer(new SlotUpgrade(tile.inventory, 7, 152, 62));
}
@Override
public void addPlayerSlots() {
int i;
@ -56,32 +65,4 @@ public class ContainerAlloySmelter extends ContainerCrafting implements IContain
}
}
@Override
public void setTile(TileAlloySmelter tile) {
this.tile = tile;
setCrafter(tile.crafter);
}
@Nullable
@Override
public TileAlloySmelter getTile() {
return tile;
}
@Override
public void setPlayer(EntityPlayer player) {
this.player = player;
}
@Nullable
@Override
public EntityPlayer getPlayer() {
return player;
}
@Nullable
@Override
public List<Integer> getSlotsForSide(EnumFacing facing) {
return null;
}
}