mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-17 02:45:29 +00:00
1 parent
15a6344ba2
commit
ecfefdfd83
2 files changed
+12
-6
No files matched your search
@@ -85,7 +85,9 @@ public class NEEContainerDrawHandler {
|
||||
if (this.isCraftingTerm || this.isPatternTerm) {
|
||||
GuiRecipe gui = (GuiRecipe) event.gui;
|
||||
|
||||
if (gui.getHandler() != null && NEECraftingHandler.isCraftingTableRecipe(gui.getHandler())) {
|
||||
IRecipeHandler currentHandler = gui.currenthandlers.get(gui.recipetype);
|
||||
|
||||
if (NEECraftingHandler.isCraftingTableRecipe(currentHandler)) {
|
||||
|
||||
if (this.trackerMap.isEmpty()) {
|
||||
initIngredientTracker(gui);
|
||||
@@ -208,11 +210,11 @@ public class NEEContainerDrawHandler {
|
||||
if (this.drawRequestTooltip) {
|
||||
if (NEECraftingHelper.isIsPatternInterfaceExists()) {
|
||||
tooltips.add(String.format("%s" + EnumChatFormatting.GRAY + " + " +
|
||||
EnumChatFormatting.BLUE + I18n.format("neenergistics.gui.tooltip.helper.crafting.text1"),
|
||||
EnumChatFormatting.BLUE + I18n.format("neenergistics.gui.tooltip.helper.crafting.text2"),
|
||||
EnumChatFormatting.YELLOW + Keyboard.getKeyName(NEIClientConfig.getKeyBinding("nee.preview"))));
|
||||
} else {
|
||||
tooltips.add(String.format("%s" + EnumChatFormatting.GRAY + " + " +
|
||||
EnumChatFormatting.BLUE + I18n.format("neenergistics.gui.tooltip.helper.crafting.text2"),
|
||||
EnumChatFormatting.BLUE + I18n.format("neenergistics.gui.tooltip.helper.crafting.text1"),
|
||||
EnumChatFormatting.YELLOW + Keyboard.getKeyName(NEIClientConfig.getKeyBinding("nee.preview"))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,13 @@ public class NEECraftingHandler implements IOverlayHandler {
|
||||
public static final NEECraftingHandler INSTANCE = new NEECraftingHandler();
|
||||
|
||||
public static boolean isCraftingTableRecipe(IRecipeHandler recipe) {
|
||||
TemplateRecipeHandler templateRecipeHandler = (TemplateRecipeHandler) recipe;
|
||||
String overlayIdentifier = templateRecipeHandler.getOverlayIdentifier();
|
||||
return "crafting".equals(overlayIdentifier) || "crafting2x2".equals(overlayIdentifier);
|
||||
if (recipe instanceof TemplateRecipeHandler) {
|
||||
TemplateRecipeHandler templateRecipeHandler = (TemplateRecipeHandler) recipe;
|
||||
String overlayIdentifier = templateRecipeHandler.getOverlayIdentifier();
|
||||
return "crafting".equals(overlayIdentifier) || "crafting2x2".equals(overlayIdentifier);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user