-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve JEI Ingredient Tooltip Support
- Loading branch information
1 parent
b2004ae
commit 4b7050d
Showing
11 changed files
with
282 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/nomiceu/nomilabs/groovy/mixinhelper/RecipeTooltipAdder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.nomiceu.nomilabs.groovy.mixinhelper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
import com.nomiceu.nomilabs.integration.jei.JEIPlugin; | ||
import com.nomiceu.nomilabs.util.LabsTranslate; | ||
|
||
public class RecipeTooltipAdder { | ||
|
||
public static void addTooltips(ResourceLocation rl, ItemStack recipeOutput, | ||
LabsTranslate.Translatable[][] inputTooltip, | ||
LabsTranslate.Translatable[] outputTooltip) { | ||
if (inputTooltip != null) { | ||
for (int i = 0; i < inputTooltip.length; i++) { | ||
var tooltip = inputTooltip[i]; | ||
if (tooltip != null) | ||
JEIPlugin.addGroovyRecipeInputTooltip(rl, i, tooltip); | ||
} | ||
} | ||
if (outputTooltip != null) | ||
JEIPlugin.addGroovyRecipeOutputTooltip(recipeOutput, rl, outputTooltip); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.