Search in sources :

Example 1 with TileEngineElectric

use of forestry.energy.tiles.TileEngineElectric in project ForestryMC by ForestryMC.

the class CircuitElectricChange method onInsertion.

@Override
public void onInsertion(int slot, Object tile) {
    if (!isCircuitable(tile)) {
        return;
    }
    TileEngineElectric engine = (TileEngineElectric) tile;
    engine.changeEnergyConfig(euChange, rfChange, 2 * euChange);
}
Also used : TileEngineElectric(forestry.energy.tiles.TileEngineElectric)

Example 2 with TileEngineElectric

use of forestry.energy.tiles.TileEngineElectric in project ForestryMC by ForestryMC.

the class GuiEngineElectric method drawGuiContainerBackgroundLayer.

@Override
protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
    super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
    TileEngineElectric engine = tile;
    int storageHeight = engine.getStorageScaled(46);
    int storageMaxHeight = engine.getStorageScaled(100);
    EnumTankLevel rated = EnumTankLevel.rateTankLevel(storageMaxHeight);
    drawHealthMeter(guiLeft + 74, guiTop + 25, storageHeight, rated);
}
Also used : EnumTankLevel(forestry.core.render.EnumTankLevel) TileEngineElectric(forestry.energy.tiles.TileEngineElectric)

Example 3 with TileEngineElectric

use of forestry.energy.tiles.TileEngineElectric in project ForestryMC by ForestryMC.

the class CircuitElectricChange method onRemoval.

@Override
public void onRemoval(int slot, Object tile) {
    if (!isCircuitable(tile)) {
        return;
    }
    TileEngineElectric engine = (TileEngineElectric) tile;
    engine.changeEnergyConfig(-euChange, -rfChange, -(2 * euChange));
}
Also used : TileEngineElectric(forestry.energy.tiles.TileEngineElectric)

Aggregations

TileEngineElectric (forestry.energy.tiles.TileEngineElectric)3 EnumTankLevel (forestry.core.render.EnumTankLevel)1