project(devtools): Fix inventory overlay

This commit is contained in:
Owain van Brakel
2022-04-20 20:16:46 +02:00
parent d7fe2f4948
commit 8d701eee48

View File

@@ -420,11 +420,18 @@ class DevToolsOverlay extends Overlay
return;
}
for (WidgetItem item : inventoryWidget.getWidgetItems())
for (Widget item : inventoryWidget.getDynamicChildren())
{
Rectangle slotBounds = item.getCanvasBounds();
Rectangle slotBounds = item.getBounds();
int itemId = item.getItemId();
if (itemId == 6512)
{
continue;
}
String idText = "" + itemId;
String idText = "" + item.getId();
FontMetrics fm = graphics.getFontMetrics();
Rectangle2D textBounds = fm.getStringBounds(idText, graphics);