Interface Part Gui
This commit is contained in:
parent
1d068b7a93
commit
d6066fd9b9
2 changed files with 9 additions and 8 deletions
|
@ -4,12 +4,12 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import appeng.client.gui.AEBaseGui;
|
import appeng.client.gui.AEBaseGui;
|
||||||
import appeng.container.implementations.ContainerInterface;
|
import appeng.container.implementations.ContainerInterface;
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.tile.misc.TileInterface;
|
import appeng.helpers.IInterfaceHost;
|
||||||
|
|
||||||
public class GuiInterface extends AEBaseGui
|
public class GuiInterface extends AEBaseGui
|
||||||
{
|
{
|
||||||
|
|
||||||
public GuiInterface(InventoryPlayer inventoryPlayer, TileInterface te) {
|
public GuiInterface(InventoryPlayer inventoryPlayer, IInterfaceHost te) {
|
||||||
super( new ContainerInterface( inventoryPlayer, te ) );
|
super( new ContainerInterface( inventoryPlayer, te ) );
|
||||||
this.ySize = 211;
|
this.ySize = 211;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,22 +6,23 @@ import appeng.container.slot.SlotFake;
|
||||||
import appeng.container.slot.SlotNormal;
|
import appeng.container.slot.SlotNormal;
|
||||||
import appeng.container.slot.SlotRestrictedInput;
|
import appeng.container.slot.SlotRestrictedInput;
|
||||||
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
|
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
|
||||||
import appeng.tile.misc.TileInterface;
|
import appeng.helpers.DualityInterface;
|
||||||
|
import appeng.helpers.IInterfaceHost;
|
||||||
|
|
||||||
public class ContainerInterface extends AEBaseContainer
|
public class ContainerInterface extends AEBaseContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
TileInterface myte;
|
DualityInterface myte;
|
||||||
|
|
||||||
public ContainerInterface(InventoryPlayer ip, TileInterface te) {
|
public ContainerInterface(InventoryPlayer ip, IInterfaceHost te) {
|
||||||
super( ip, te, null );
|
super( ip, te.getInterfaceDuality().getTile(), te.getInterfaceDuality().getPart() );
|
||||||
myte = te;
|
myte = te.getInterfaceDuality();
|
||||||
|
|
||||||
for (int x = 0; x < 8; x++)
|
for (int x = 0; x < 8; x++)
|
||||||
addSlotToContainer( new SlotFake( myte.getConfig(), x, 17 + 18 * x, 35 ) );
|
addSlotToContainer( new SlotFake( myte.getConfig(), x, 17 + 18 * x, 35 ) );
|
||||||
|
|
||||||
for (int x = 0; x < 8; x++)
|
for (int x = 0; x < 8; x++)
|
||||||
addSlotToContainer( new SlotNormal( myte, x, 17 + 18 * x, 35 + 18 ) );
|
addSlotToContainer( new SlotNormal( myte.getStorage(), x, 17 + 18 * x, 35 + 18 ) );
|
||||||
|
|
||||||
for (int x = 0; x < 9; x++)
|
for (int x = 0; x < 9; x++)
|
||||||
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.ENCODED_PATTERN, myte.getPatterns(), x, 8 + 18 * x, 90 + 7 ) );
|
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.ENCODED_PATTERN, myte.getPatterns(), x, 8 + 18 * x, 90 + 7 ) );
|
||||||
|
|
Loading…
Reference in a new issue