Search in sources :

Example 1 with IRedstoneControlled

use of pneumaticCraft.common.tileentity.IRedstoneControlled in project PneumaticCraft by MineMaarten.

the class GuiPneumaticContainerBase method addProblems.

protected void addProblems(List<String> curInfo) {
    if (te instanceof IRedstoneControlled && !te.redstoneAllows()) {
        IRedstoneControlled redstoneControlled = (IRedstoneControlled) te;
        curInfo.add("gui.tab.problems.redstoneDisallows");
        if (redstoneControlled.getRedstoneMode() == 1) {
            curInfo.add("gui.tab.problems.provideRedstone");
        } else {
            curInfo.add("gui.tab.problems.removeRedstone");
        }
    }
    if (te instanceof IMinWorkingPressure) {
        IMinWorkingPressure minWork = (IMinWorkingPressure) te;
        if (((TileEntityPneumaticBase) te).getPressure(ForgeDirection.UNKNOWN) < minWork.getMinWorkingPressure()) {
            curInfo.add("gui.tab.problems.notEnoughPressure");
            curInfo.add(I18n.format("gui.tab.problems.applyPressure", minWork.getMinWorkingPressure()));
        }
    }
}
Also used : IRedstoneControlled(pneumaticCraft.common.tileentity.IRedstoneControlled) IMinWorkingPressure(pneumaticCraft.common.tileentity.IMinWorkingPressure)

Aggregations

IMinWorkingPressure (pneumaticCraft.common.tileentity.IMinWorkingPressure)1 IRedstoneControlled (pneumaticCraft.common.tileentity.IRedstoneControlled)1