Show recipe banner with overlay

This commit is contained in:
Kam committed 2025-07-09 21:35:27 -04:00
1 parent 1585aa8e55
commit 62e11d8caa
5 files changed
+52 -2

No files matched your search

@@ -46,10 +46,21 @@ public class GuiNpcCarpentryBench extends GuiContainerNPCInterface {
title = StatCollector.translateToLocal("tile.anvil.name");
drawTexturedModalRect(l, i1, 0, 0, xSize, ySize);
super.drawGuiContainerBackgroundLayer(f, i, j);
if (!container.canPickupResult()) {
drawRedSlotOutline(guiLeft + 133, guiTop + 41);
}
fontRendererObj.drawString(title, guiLeft + 4, guiTop + 4, CustomNpcResourceListener.DefaultTextColor);
fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), guiLeft + 4, guiTop + 87, CustomNpcResourceListener.DefaultTextColor);
}
private void drawRedSlotOutline(int x, int y) {
int c = 0xFFFF0000;
drawRect(x - 1, y - 1, x + 17, y, c);
drawRect(x - 1, y + 16, x + 17, y + 17, c);
drawRect(x - 1, y, x, y + 16, c);
drawRect(x + 16, y, x + 17, y + 16, c);
}
@Override
public void save() {
return;