use of pneumaticCraft.common.entity.living.DebugEntry in project PneumaticCraft by MineMaarten.
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.getCommandSenderName(), 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 ChunkPosition(0, 0, 0))) {
upgradeHandler.getShowingPositions().add(entry.getPos());
}
}
}
}
use of pneumaticCraft.common.entity.living.DebugEntry in project PneumaticCraft by MineMaarten.
the class PacketSendDroneDebugEntry method fromBytes.
@Override
public void fromBytes(ByteBuf buf) {
entry = new DebugEntry(buf);
entityId = buf.readInt();
}
Aggregations