Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica

private final String _slotGunpowder = "gui.schematicannon.slot.gunpowder";
private final String _slotListPrinter = "gui.schematicannon.slot.listPrinter";
private final String _slotSchematic = "gui.schematicannon.slot.schematic";
private final String _slotSchematicEnabled = "gui.schematicannon.slot.schematic";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I migrate it to "gui.schematicannon.slot.schematicEnabled"? is enough just changing the id?

private final String _slotSchematicDisabled = "gui.schematicannon.slot.schematicDisabled";

private final Component optionEnabled = CreateLang.translateDirect("gui.schematicannon.optionEnabled");
private final Component optionDisabled = CreateLang.translateDirect("gui.schematicannon.optionDisabled");
Expand Down Expand Up @@ -292,6 +293,10 @@ protected void renderBg(GuiGraphics graphics, float partialTicks, int mouseX, in
.isEmpty())
renderBlueprintHighlight(graphics, x, y);

//if (!be.inventory.getStackInSlot(1)
// .isEmpty())
// renderBlueprintAlertHighlight(graphics, x, y);

GuiGameElement.of(renderedItem).<GuiGameElement
.GuiRenderBuilder>at(x + BG_TOP.getWidth(), y + BG_TOP.getHeight() + BG_BOTTOM.getHeight() - 48, -200)
.scale(5)
Expand Down Expand Up @@ -321,6 +326,10 @@ protected void renderBlueprintHighlight(GuiGraphics graphics, int x, int y) {
AllGuiTextures.SCHEMATICANNON_HIGHLIGHT.render(graphics, x + 10, y + 60);
}

//protected void renderBlueprintAlertHighlight(GuiGraphics graphics, int x, int y) {
// AllGuiTextures.SCHEMATICANNON_ALERT_HIGHLIGHT.render(graphics, x + 10, y + 60);
//}

protected void renderPrintingProgress(GuiGraphics graphics, int x, int y, float progress) {
progress = Math.min(progress, 1);
AllGuiTextures sprite = AllGuiTextures.SCHEMATICANNON_PROGRESS;
Expand Down Expand Up @@ -357,10 +366,12 @@ protected void renderForeground(GuiGraphics graphics, int mouseX, int mouseY, fl
}

if (hoveredSlot != null && !hoveredSlot.hasItem()) {
if (hoveredSlot.index == 0)
if (hoveredSlot.index == 0) {
boolean enabled = be.inventory.getStackInSlot(1).isEmpty();
graphics.renderComponentTooltip(font,
TooltipHelper.cutTextComponent(CreateLang.translateDirect(_slotSchematic), Palette.GRAY_AND_BLUE), mouseX,
mouseY);
TooltipHelper.cutTextComponent(CreateLang.translateDirect(enabled ? _slotSchematicEnabled :_slotSchematicDisabled),
Palette.GRAY_AND_BLUE), mouseX, mouseY);
}
if (hoveredSlot.index == 2)
graphics.renderComponentTooltip(font,
TooltipHelper.cutTextComponent(CreateLang.translateDirect(_slotListPrinter), Palette.GRAY_AND_BLUE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public enum AllGuiTextures implements ScreenElement, TextureSheetSegment {
SCHEMATICANNON_PROGRESS("schematics_2", 76, 239, 114, 16),
SCHEMATICANNON_CHECKLIST_PROGRESS("schematics_2", 191, 240, 16, 14),
SCHEMATICANNON_HIGHLIGHT("schematics_2", 1, 229, 26, 26),
SCHEMATICANNON_ALERT_HIGHLIGHT("schematics_2", 1, 229, 26, 26),
SCHEMATICANNON_FUEL("schematics_2", 28, 222, 47, 16),
SCHEMATICANNON_FUEL_CREATIVE("schematics_2", 28, 239, 47, 16),

Expand Down
Loading