Search in sources :

Example 1 with TileMachineBase

use of com.bluepowermod.tile.TileMachineBase in project BluePower by Qmunity.

the class GuiContainerBaseBP method initGui.

@Override
public void initGui() {
    super.initGui();
    lastLeftStat = lastRightStat = null;
    if (inventory instanceof TileMachineBase) {
        WidgetTabItemLister backlogTab = new WidgetTabItemLister(this, "gui.bluepower:tab.stuffed", Refs.MODID + ":textures/gui/widgets/gui_stuffed.png", guiLeft + xSize, guiTop + 5, 0xFFc13d40, null, false);
        lastRightStat = backlogTab;
        backlogTab.setItems(((TileMachineBase) inventory).getBacklog());
        addWidget(backlogTab);
    }
    String unlocalizedInfo = inventory.getInventoryName() + ".info";
    String localizedInfo = I18n.format(unlocalizedInfo);
    if (!unlocalizedInfo.equals(localizedInfo)) {
        addAnimatedStat("gui.bluepower:tab.info", Refs.MODID + ":textures/gui/widgets/gui_info.png", 0xFF8888FF, isInfoStatLeftSided()).setText(unlocalizedInfo);
    }
}
Also used : TileMachineBase(com.bluepowermod.tile.TileMachineBase) WidgetTabItemLister(com.bluepowermod.client.gui.widget.WidgetTabItemLister)

Example 2 with TileMachineBase

use of com.bluepowermod.tile.TileMachineBase in project BluePower by Qmunity.

the class MessageSyncMachineBacklog method handleClientSide.

@Override
public void handleClientSide(EntityPlayer player) {
    TileEntity te = player.worldObj.getTileEntity(x, y, z);
    if (te instanceof TileMachineBase) {
        ((TileMachineBase) te).setBacklog(stacks);
        GuiContainerBase gui = (GuiContainerBase) ClientProxy.getOpenedGui();
        if (gui != null)
            gui.redraw();
    }
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) GuiContainerBase(uk.co.qmunity.lib.client.gui.GuiContainerBase) TileMachineBase(com.bluepowermod.tile.TileMachineBase)

Example 3 with TileMachineBase

use of com.bluepowermod.tile.TileMachineBase in project BluePower by Qmunity.

the class WailaProviderMachines method getWailaBody.

@Override
public List<String> getWailaBody(ItemStack item, List<String> tip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
    TileMachineBase machine = (TileMachineBase) accessor.getTileEntity();
    machine.addWailaInfo(info);
    tip.addAll(info);
    info.clear();
    return tip;
}
Also used : TileMachineBase(com.bluepowermod.tile.TileMachineBase)

Aggregations

TileMachineBase (com.bluepowermod.tile.TileMachineBase)3 WidgetTabItemLister (com.bluepowermod.client.gui.widget.WidgetTabItemLister)1 TileEntity (net.minecraft.tileentity.TileEntity)1 GuiContainerBase (uk.co.qmunity.lib.client.gui.GuiContainerBase)1