-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathJEIHooks.java
More file actions
28 lines (24 loc) · 843 Bytes
/
JEIHooks.java
File metadata and controls
28 lines (24 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package gregtech.integration.jei.utils;
import com.mojang.realmsclient.gui.ChatFormatting;
import gregtech.api.util.FluidTooltipUtil;
import net.minecraftforge.fluids.FluidStack;
import java.util.List;
/**
* Class used for code injection into JEI.
* Not intended for normal use within GTCE.
*/
@SuppressWarnings("unused")
public class JEIHooks {
/**
* This method is NOT intended to be called by GTCE.
* Do NOT use this method for any reason.
*/
public static void addFluidTooltip(List<String> tooltip, Object ingredient) {
if (ingredient instanceof FluidStack) {
List<String> formula = FluidTooltipUtil.getFluidTooltips(((FluidStack) ingredient).getFluid());
if (formula != null && !formula.isEmpty()) {
tooltip.addAll(1, formula);
}
}
}
}