Skip to content
This repository has been archived by the owner on Dec 29, 2024. It is now read-only.

Commit

Permalink
Add Partially Consumed tooltip & overlay for masks in the TC NEI page
Browse files Browse the repository at this point in the history
  • Loading branch information
Elisis committed May 10, 2024
1 parent a8ad2e7 commit 60e35ac
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
import gregtech.api.util.GT_OverclockCalculator;
import gregtech.api.util.GT_Utility;
import gregtech.common.gui.modularui.UIHelper;
import gregtech.nei.GT_NEI_DefaultHandler;
import gregtech.nei.RecipeDisplayInfo;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;

public class TargetChamberFrontend extends RecipeMapFrontend {

Expand All @@ -29,6 +32,22 @@ public void drawDescription(RecipeDisplayInfo recipeInfo) {
drawMetadataInfo(recipeInfo);
drawRecipeOwnerInfo(recipeInfo);
}

@Override
protected void drawNEIOverlayForInput(GT_NEI_DefaultHandler.FixedPositionedStack stack) {
if (stack.isNotConsumed()) { // The stack actually takes damage, but is technically still not considered to be consumed by the code
drawNEIOverlayText("PC", stack);
}
}

@Override
protected List<String> handleNEIItemInputTooltip(List<String> currentTip,
GT_NEI_DefaultHandler.FixedPositionedStack pStack) {
if (pStack.isNotConsumed()) { // See above
currentTip.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("gtnhlanth.tt.pc")); // Partially consumed: Takes damage in the process
}
return currentTip;
}

@Override
public void drawEnergyInfo(RecipeDisplayInfo recipeInfo) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/gtnhlanth/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ gtnhlanth.recipe.disstank=Dissolution Tank
gtnhlanth.recipe.tc=Target Chamber
gtnhlanth.recipe.sc=Source Chamber

gtnhlanth.tt.beaminfo=Use a §9portable scanner &rfor info about the input/output of this multiblock.
gtnhlanth.tt.beaminfo=Use a §bportable scanner §7for info about the input/output of this multiblock.
gtnhlanth.tt.blueprint=Follow the §9Structure§2Lib §7hologram projector to build the main structure.
gtnhlanth.tt.pc=§6Partially consumed: §7Takes damage in the process

# NEI
value.disstank=Ratio: %s:1
Expand Down

0 comments on commit 60e35ac

Please sign in to comment.