Search in sources :

Example 1 with DebugEntry

use of me.desht.pneumaticcraft.common.entity.living.DebugEntry in project pnc-repressurized by TeamPneumatic.

the class PacketSendDroneDebugEntry method fromBytes.

@Override
public void fromBytes(ByteBuf buf) {
    entry = new DebugEntry(buf);
    entityId = buf.readInt();
}
Also used : DebugEntry(me.desht.pneumaticcraft.common.entity.living.DebugEntry)

Example 2 with DebugEntry

use of me.desht.pneumaticcraft.common.entity.living.DebugEntry in project pnc-repressurized by TeamPneumatic.

the class GuiDroneDebuggerOptions method drawScreen.

@Override
public void drawScreen(int x, int y, float partialTicks) {
    if (selectedDrone != null) {
        Minecraft.getMinecraft().fontRenderer.drawString("Drone name: " + selectedDrone.getName(), 20, screenHeight - 15, 0xFFFFFFFF, true);
        Minecraft.getMinecraft().fontRenderer.drawString("Routine: " + selectedDrone.getLabel(), screenWidth / 2, screenHeight - 15, 0xFFFFFFFF, true);
    }
    programmerUnit.render(x, y, true, true, true);
    programmerUnit.renderForeground(x, y, null);
    if (selectedDrone == null) {
        drawCenteredString(Minecraft.getMinecraft().fontRenderer, "Press '" + Keyboard.getKeyName(KeyHandler.getInstance().keybindDebuggingDrone.getKeyCode()) + "' on a Drone when tracked by an Entity Tracker to debug the Drone.", screenWidth / 2, screenHeight / 2, 0xFFFF0000);
    }
    IProgWidget widget = programmerUnit.getHoveredWidget(x, y);
    if (widget == null)
        widget = areaShowingWidget;
    upgradeHandler.getShowingPositions().clear();
    if (widget != null) {
        int widgetId = selectedDrone.getProgWidgets().indexOf(widget);
        for (DebugEntry entry : selectedDrone.getDebugEntries()) {
            if (entry.getProgWidgetId() == widgetId && !entry.getPos().equals(new BlockPos(0, 0, 0))) {
                upgradeHandler.getShowingPositions().add(entry.getPos());
            }
        }
    }
}
Also used : IProgWidget(me.desht.pneumaticcraft.common.progwidgets.IProgWidget) BlockPos(net.minecraft.util.math.BlockPos) DebugEntry(me.desht.pneumaticcraft.common.entity.living.DebugEntry)

Aggregations

DebugEntry (me.desht.pneumaticcraft.common.entity.living.DebugEntry)2 IProgWidget (me.desht.pneumaticcraft.common.progwidgets.IProgWidget)1 BlockPos (net.minecraft.util.math.BlockPos)1