aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-09-13 17:40:13 +0900
committerGitHub <noreply@github.com>2023-09-13 10:40:13 +0200
commitc530b6cdcb45f23dbb1e9cde332033921b79b618 (patch)
treea0ff176e3aa7a9012a5b2bd1b7460651cecac8a8 /src/main
parentdf4c1e1cbee0c1dd201e86e0a0fd4f9c300ed731 (diff)
downloadGT5-Unofficial-c530b6cdcb45f23dbb1e9cde332033921b79b618.tar.gz
GT5-Unofficial-c530b6cdcb45f23dbb1e9cde332033921b79b618.tar.bz2
GT5-Unofficial-c530b6cdcb45f23dbb1e9cde332033921b79b618.zip
Add info on Bacterial Vat NEI fluid output (#358)
* Add info on Bacterial Vat NEI fluid output * Update en_US.lang --------- Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Former-commit-id: 3d8a85d5730786c86e5310df6fce786b5d6f9c4f
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java29
-rw-r--r--src/main/resources/assets/bartworks/lang/en_US.lang1
2 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
index 21bab359a5..643d1de694 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BWRecipes.java
@@ -21,6 +21,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Supplier;
@@ -30,6 +31,7 @@ import javax.annotation.Nonnegative;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
@@ -41,6 +43,7 @@ import com.github.bartimaeusnek.bartworks.MainMod;
import com.github.bartimaeusnek.bartworks.common.loaders.BioItemList;
import com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_BioVat;
import com.gtnewhorizons.modularui.api.drawable.IDrawable;
+import com.gtnewhorizons.modularui.api.math.Alignment;
import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
@@ -53,6 +56,7 @@ import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import gregtech.nei.GT_NEI_DefaultHandler;
import gregtech.nei.NEIRecipeInfo;
import ic2.core.Ic2Items;
import ic2.core.item.ItemFluidCell;
@@ -802,6 +806,31 @@ public class BWRecipes {
}
return this.addRecipe(aRecipe, false, false, false);
}
+
+ @Override
+ protected List<String> handleNEIItemOutputTooltip(List<String> currentTip,
+ GT_NEI_DefaultHandler.FixedPositionedStack pStack) {
+ if (pStack.isFluid()) {
+ currentTip.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("nei.biovat.tooltip"));
+ return currentTip;
+ }
+ return super.handleNEIItemOutputTooltip(currentTip, pStack);
+ }
+
+ @Override
+ protected void drawNEIOverlayForOutput(GT_NEI_DefaultHandler.FixedPositionedStack stack) {
+ if (stack.isFluid()) {
+ drawNEIOverlayText(
+ "+",
+ stack,
+ colorOverride.getTextColorOrDefault("nei_overlay_yellow", 0xFDD835),
+ 0.5f,
+ true,
+ Alignment.TopRight);
+ return;
+ }
+ super.drawNEIOverlayForOutput(stack);
+ }
}
public static class SpecialObjectSensitiveMap extends GT_Recipe.GT_Recipe_Map {
diff --git a/src/main/resources/assets/bartworks/lang/en_US.lang b/src/main/resources/assets/bartworks/lang/en_US.lang
index fabd5dafcd..73be48c15c 100644
--- a/src/main/resources/assets/bartworks/lang/en_US.lang
+++ b/src/main/resources/assets/bartworks/lang/en_US.lang
@@ -143,6 +143,7 @@ tooltip.tile.acidgen.1.name=Creates Power from Chemical Energy Potentials.
nei.biovat.0.name=Needs Glass Tier:
nei.biovat.1.name=Need exactly
nei.biovat.2.name=Need minimum
+nei.biovat.tooltip=Outputs up to 1,001x amount, depending on the amount of fluid stored in the Output Hatch
tile.diode.name=Cable Diode
tile.energydistributor.name=Energy Distributor