Skip to content

Commit

Permalink
Display tier of nano forge in GUI (#1813)
Browse files Browse the repository at this point in the history
  • Loading branch information
minecraft7771 authored Mar 26, 2023
1 parent a7733cf commit 9e42d4e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
import com.gtnewhorizons.modularui.common.widget.DynamicPositionedColumn;
import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
import com.gtnewhorizons.modularui.common.widget.SlotWidget;
import com.gtnewhorizons.modularui.common.widget.TextWidget;

import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
Expand Down Expand Up @@ -362,6 +366,19 @@ public IAlignmentLimits getAlignmentLimits() {
.deny(Rotation.UPSIDE_DOWN).deny(Rotation.CLOCKWISE).deny(Rotation.COUNTER_CLOCKWISE).build();
}

@Override
protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inventorySlot) {
super.drawTexts(screenElements, inventorySlot);
screenElements.widget(
new TextWidget(StatCollector.translateToLocal("GT5U.gui.button.tier") + " " + mSpecialTier)
.setDefaultColor(COLOR_TEXT_WHITE.get())
.setEnabled(widget -> getBaseMetaTileEntity().getErrorDisplayID() == 0))
.widget(
new FakeSyncWidget.IntegerSyncer(
() -> (int) mSpecialTier,
val -> mSpecialTier = (byte) (val % Byte.MAX_VALUE)));
}

@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/gregtech/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ GT5U.gui.button.input_separation=Input Separation
GT5U.gui.button.batch_mode=Batch Mode
GT5U.gui.button.lock_recipe=Lock Recipe
GT5U.gui.button.down_tier=Down Tier
GT5U.gui.button.tier=Tier:

GT5U.item.programmed_circuit.select.header=Reprogram Circuit

Expand Down

0 comments on commit 9e42d4e

Please sign in to comment.