Fix #804
This commit is contained in:
parent
c8d8ce0241
commit
757e311804
2 changed files with 13 additions and 32 deletions
|
@ -99,7 +99,7 @@ public class GuiHandler implements IGuiHandler {
|
||||||
} else if (ID == chunkloaderID) {
|
} else if (ID == chunkloaderID) {
|
||||||
return new ContainerChunkloader((TileChunkLoader) world.getTileEntity(new BlockPos(x, y, z)), player);
|
return new ContainerChunkloader((TileChunkLoader) world.getTileEntity(new BlockPos(x, y, z)), player);
|
||||||
} else if (ID == assemblingmachineID) {
|
} else if (ID == assemblingmachineID) {
|
||||||
container = new ContainerAssemblingMachine();
|
container = new ContainerAssemblingMachine(player, (TileAssemblingMachine) world.getTileEntity(new BlockPos(x, y, z)));
|
||||||
} else if (ID == dieselGeneratorID) {
|
} else if (ID == dieselGeneratorID) {
|
||||||
return new ContainerDieselGenerator((TileDieselGenerator) world.getTileEntity(new BlockPos(x, y, z)),
|
return new ContainerDieselGenerator((TileDieselGenerator) world.getTileEntity(new BlockPos(x, y, z)),
|
||||||
player);
|
player);
|
||||||
|
|
|
@ -5,13 +5,14 @@ import net.minecraft.util.EnumFacing;
|
||||||
import reborncore.api.tile.IContainerLayout;
|
import reborncore.api.tile.IContainerLayout;
|
||||||
import reborncore.client.gui.BaseSlot;
|
import reborncore.client.gui.BaseSlot;
|
||||||
import reborncore.client.gui.SlotOutput;
|
import reborncore.client.gui.SlotOutput;
|
||||||
|
import reborncore.common.recipes.RecipeCrafter;
|
||||||
import techreborn.api.gui.SlotUpgrade;
|
import techreborn.api.gui.SlotUpgrade;
|
||||||
import techreborn.tiles.TileAssemblingMachine;
|
import techreborn.tiles.TileAssemblingMachine;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ContainerAssemblingMachine extends ContainerCrafting implements IContainerLayout<TileAssemblingMachine> {
|
public class ContainerAssemblingMachine extends ContainerCrafting{
|
||||||
|
|
||||||
public int tickTime;
|
public int tickTime;
|
||||||
EntityPlayer player;
|
EntityPlayer player;
|
||||||
|
@ -22,7 +23,15 @@ public class ContainerAssemblingMachine extends ContainerCrafting implements ICo
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public ContainerAssemblingMachine(EntityPlayer player, TileAssemblingMachine tile) {
|
||||||
|
super(tile.crafter);
|
||||||
|
this.player = player;
|
||||||
|
this.tile = tile;
|
||||||
|
addPlayerSlots();
|
||||||
|
addInventorySlots();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void addInventorySlots() {
|
public void addInventorySlots() {
|
||||||
// input
|
// input
|
||||||
this.addSlotToContainer(new BaseSlot(tile.inventory, 0, 47, 17));
|
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));
|
this.addSlotToContainer(new SlotUpgrade(tile.inventory, 7, 152, 62));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addPlayerSlots() {
|
public void addPlayerSlots() {
|
||||||
int i;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue