2013-12-27 23:59:59 +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;
|
2013-12-27 23:59:59 +01:00
|
|
|
import appeng.container.slot.SlotRestrictedInput;
|
|
|
|
import appeng.container.slot.SlotRestrictedInput.PlaceableItemType;
|
|
|
|
import appeng.tile.misc.TileVibrationChamber;
|
|
|
|
import appeng.util.Platform;
|
|
|
|
|
|
|
|
public class ContainerVibrationChamber extends AEBaseContainer
|
|
|
|
{
|
|
|
|
|
|
|
|
TileVibrationChamber myte;
|
|
|
|
|
|
|
|
public ContainerVibrationChamber(InventoryPlayer ip, TileVibrationChamber te) {
|
2014-01-02 06:51:41 +01:00
|
|
|
super( ip, te, null );
|
2013-12-27 23:59:59 +01:00
|
|
|
myte = te;
|
|
|
|
|
2014-07-13 03:03:17 +02:00
|
|
|
addSlotToContainer( new SlotRestrictedInput( PlaceableItemType.FUEL, te, 0, 80, 37, invPlayer ) );
|
2013-12-27 23:59:59 +01:00
|
|
|
|
|
|
|
bindPlayerInventory( ip, 0, 166 - /* height of playerinventory */82 );
|
|
|
|
}
|
|
|
|
|
|
|
|
public int aePerTick = 5;
|
2014-05-07 07:22:42 +02:00
|
|
|
|
|
|
|
@GuiSync(0)
|
2013-12-27 23:59:59 +01:00
|
|
|
public int burnProgress = 0;
|
|
|
|
|
2014-05-07 07:22:42 +02:00
|
|
|
@GuiSync(1)
|
|
|
|
public int burnSpeed = 100;
|
|
|
|
|
2013-12-27 23:59:59 +01:00
|
|
|
@Override
|
|
|
|
public void detectAndSendChanges()
|
|
|
|
{
|
|
|
|
if ( Platform.isServer() )
|
|
|
|
{
|
2014-05-07 07:22:42 +02:00
|
|
|
this.burnProgress = (int) (this.myte.maxBurnTime <= 0 ? 0 : 12 * this.myte.burnTime / this.myte.maxBurnTime);
|
2013-12-27 23:59:59 +01:00
|
|
|
this.burnSpeed = this.myte.burnSpeed;
|
|
|
|
}
|
|
|
|
|
2014-05-07 07:22:42 +02:00
|
|
|
super.detectAndSendChanges();
|
2013-12-27 23:59:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|