Search in sources :

Example 1 with TileEntityAssemblyDrill

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

the class GuiAssemblyController method getStatusText.

private List<String> getStatusText() {
    List<String> text = new ArrayList<String>();
    List<IAssemblyMachine> machineList = te.getMachines();
    boolean platformFound = false;
    boolean drillFound = false;
    boolean laserFound = false;
    boolean IOUnitExportFound = false;
    boolean IOUnitImportFound = false;
    text.add("ยง7Machine Status:");
    for (IAssemblyMachine machine : machineList) {
        if (machine instanceof TileEntityAssemblyPlatform) {
            platformFound = true;
            text.add(EnumChatFormatting.GREEN + "-Assembly Platform online");
        } else if (machine instanceof TileEntityAssemblyDrill) {
            drillFound = true;
            text.add(EnumChatFormatting.GREEN + "-Assembly Drill online");
        } else if (machine instanceof TileEntityAssemblyIOUnit) {
            if (((TileEntityAssemblyIOUnit) machine).getBlockMetadata() == 0) {
                IOUnitImportFound = true;
                text.add(EnumChatFormatting.GREEN + "-Assembly IO Unit (import) online");
            } else {
                IOUnitExportFound = true;
                text.add(EnumChatFormatting.GREEN + "-Assembly IO Unit (export) online");
            }
        } else if (machine instanceof TileEntityAssemblyLaser) {
            laserFound = true;
            text.add(EnumChatFormatting.GREEN + "-Assembly Laser online");
        }
    }
    if (!platformFound)
        text.add(EnumChatFormatting.DARK_RED + "-Assembly Platform offline");
    if (!drillFound)
        text.add(EnumChatFormatting.DARK_RED + "-Assembly Drill offline");
    if (!laserFound)
        text.add(EnumChatFormatting.DARK_RED + "-Assembly Laser offline");
    if (!IOUnitExportFound)
        text.add(EnumChatFormatting.DARK_RED + "-Assembly IO Unit (export) offline");
    if (!IOUnitImportFound)
        text.add(EnumChatFormatting.DARK_RED + "-Assembly IO Unit (import) offline");
    return text;
}
Also used : TileEntityAssemblyDrill(pneumaticCraft.common.tileentity.TileEntityAssemblyDrill) TileEntityAssemblyLaser(pneumaticCraft.common.tileentity.TileEntityAssemblyLaser) TileEntityAssemblyIOUnit(pneumaticCraft.common.tileentity.TileEntityAssemblyIOUnit) ArrayList(java.util.ArrayList) TileEntityAssemblyPlatform(pneumaticCraft.common.tileentity.TileEntityAssemblyPlatform) IAssemblyMachine(pneumaticCraft.common.tileentity.IAssemblyMachine)

Example 2 with TileEntityAssemblyDrill

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

the class ModelAssemblyDrill method renderDynamic.

@Override
public void renderDynamic(float size, TileEntity te, float partialTicks) {
    if (te instanceof TileEntityAssemblyDrill) {
        TileEntityAssemblyDrill tile = (TileEntityAssemblyDrill) te;
        float[] renderAngles = new float[5];
        for (int i = 0; i < 4; i++) {
            renderAngles[i] = tile.oldAngles[i] + (tile.angles[i] - tile.oldAngles[i]) * partialTicks;
        }
        renderAngles[4] = tile.oldDrillRotation + (tile.drillRotation - tile.oldDrillRotation) * partialTicks;
        renderModel(size, renderAngles);
    } else {
        renderModel(size, new float[] { 0, 0, 35, 55, 0 });
    }
}
Also used : TileEntityAssemblyDrill(pneumaticCraft.common.tileentity.TileEntityAssemblyDrill)

Aggregations

TileEntityAssemblyDrill (pneumaticCraft.common.tileentity.TileEntityAssemblyDrill)2 ArrayList (java.util.ArrayList)1 IAssemblyMachine (pneumaticCraft.common.tileentity.IAssemblyMachine)1 TileEntityAssemblyIOUnit (pneumaticCraft.common.tileentity.TileEntityAssemblyIOUnit)1 TileEntityAssemblyLaser (pneumaticCraft.common.tileentity.TileEntityAssemblyLaser)1 TileEntityAssemblyPlatform (pneumaticCraft.common.tileentity.TileEntityAssemblyPlatform)1