This commit is contained in:
modmuss50 2016-11-26 19:01:10 +00:00
parent c8d8ce0241
commit 757e311804
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
2 changed files with 13 additions and 32 deletions

View file

@ -99,7 +99,7 @@ public class GuiHandler implements IGuiHandler {
} else if (ID == chunkloaderID) {
return new ContainerChunkloader((TileChunkLoader) world.getTileEntity(new BlockPos(x, y, z)), player);
} else if (ID == assemblingmachineID) {
container = new ContainerAssemblingMachine();
container = new ContainerAssemblingMachine(player, (TileAssemblingMachine) world.getTileEntity(new BlockPos(x, y, z)));
} else if (ID == dieselGeneratorID) {
return new ContainerDieselGenerator((TileDieselGenerator) world.getTileEntity(new BlockPos(x, y, z)),
player);

View file

@ -5,13 +5,14 @@ import net.minecraft.util.EnumFacing;
import reborncore.api.tile.IContainerLayout;
import reborncore.client.gui.BaseSlot;
import reborncore.client.gui.SlotOutput;
import reborncore.common.recipes.RecipeCrafter;
import techreborn.api.gui.SlotUpgrade;
import techreborn.tiles.TileAssemblingMachine;
import javax.annotation.Nullable;
import java.util.List;
public class ContainerAssemblingMachine extends ContainerCrafting implements IContainerLayout<TileAssemblingMachine> {
public class ContainerAssemblingMachine extends ContainerCrafting{
public int tickTime;
EntityPlayer player;
@ -22,7 +23,15 @@ public class ContainerAssemblingMachine extends ContainerCrafting implements ICo
return true;
}
@Override
public ContainerAssemblingMachine(EntityPlayer player, TileAssemblingMachine tile) {
super(tile.crafter);
this.player = player;
this.tile = tile;
addPlayerSlots();
addInventorySlots();
}
public void addInventorySlots() {
// input
this.addSlotToContainer(new BaseSlot(tile.inventory, 0, 47, 17));
@ -38,7 +47,7 @@ public class ContainerAssemblingMachine extends ContainerCrafting implements ICo
this.addSlotToContainer(new SlotUpgrade(tile.inventory, 7, 152, 62));
}
@Override
public void addPlayerSlots() {
int i;
@ -53,32 +62,4 @@ public class ContainerAssemblingMachine extends ContainerCrafting implements ICo
}
}
@Override
public void setTile(TileAssemblingMachine tile) {
this.tile = tile;
this.crafter = tile.crafter;
}
@Nullable
@Override
public TileAssemblingMachine 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;
}
}