2014-03-07 07:15:54 +01:00
|
|
|
package appeng.container.implementations;
|
|
|
|
|
|
|
|
import net.minecraft.entity.player.InventoryPlayer;
|
|
|
|
import appeng.container.AEBaseContainer;
|
2014-05-07 07:22:42 +02:00
|
|
|
import appeng.container.guisync.GuiSync;
|
2014-03-11 07:52:48 +01:00
|
|
|
import appeng.container.slot.SlotOutput;
|
|
|
|
import appeng.container.slot.SlotRestrictedInput;
|
|
|
|
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
|
2014-03-07 07:15:54 +01:00
|
|
|
import appeng.tile.misc.TileInscriber;
|
2014-03-11 07:52:48 +01:00
|
|
|
import appeng.util.Platform;
|
2014-03-07 07:15:54 +01:00
|
|
|
|
|
|
|
public class ContainerInscriber extends AEBaseContainer
|
|
|
|
{
|
|
|
|
|
|
|
|
TileInscriber myte;
|
|
|
|
|
2014-05-07 07:22:42 +02:00
|
|
|
@GuiSync(0)
|
2014-03-11 07:52:48 +01:00
|
|
|
public int maxProessingTime = -1;
|
2014-05-07 07:22:42 +02:00
|
|
|
|
|
|
|
@GuiSync(1)
|
2014-03-11 07:52:48 +01:00
|
|
|
public int processingTime = -1;
|
|
|
|
|
2014-03-07 07:15:54 +01:00
|
|
|
public ContainerInscriber(InventoryPlayer ip, TileInscriber te) {
|
|
|
|
super( ip, te, null );
|
|
|
|
myte = te;
|
|
|
|
|
2014-03-11 07:52:48 +01:00
|
|
|
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.INSCRIBER_PLATE, myte, 0, 45, 16 ) );
|
|
|
|
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.INSCRIBER_INPUT, myte, 2, 63, 39 ) );
|
|
|
|
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.INSCRIBER_PLATE, myte, 1, 45, 62 ) );
|
|
|
|
|
|
|
|
addSlotToContainer( new SlotOutput( myte, 3, 113, 40, -1 ) );
|
|
|
|
|
2014-03-07 07:15:54 +01:00
|
|
|
bindPlayerInventory( ip, 0, 176 - /* height of playerinventory */82 );
|
|
|
|
}
|
|
|
|
|
2014-03-11 07:52:48 +01:00
|
|
|
@Override
|
|
|
|
public void detectAndSendChanges()
|
|
|
|
{
|
|
|
|
super.detectAndSendChanges();
|
|
|
|
|
|
|
|
if ( Platform.isServer() )
|
|
|
|
{
|
2014-05-07 07:22:42 +02:00
|
|
|
this.maxProessingTime = myte.maxProessingTime;
|
|
|
|
this.processingTime = myte.processingTime;
|
2014-03-11 07:52:48 +01:00
|
|
|
}
|
|
|
|
}
|
2014-03-07 07:15:54 +01:00
|
|
|
}
|