-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba0844d
commit b0846ce
Showing
3 changed files
with
21 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
import static com.nomiceu.nomilabs.util.LabsTranslate.* | ||
import static com.nomiceu.nomilabs.groovy.GroovyHelpers.TranslationHelpers.* | ||
import static com.nomiceu.nomilabs.groovy.GroovyHelpers.TooltipHelpers.* | ||
|
||
// (Item) Tooltip Helper, Goes in Post Init. | ||
|
||
// Note that tooltips apply to all stacks of that Item/ResourceLocation, regardless of meta or NBT Tag. | ||
// Note that tooltips apply to all stacks of that Item and Meta, regardless of NBT Tag. | ||
// If meta is not provided, tooltip only applies to item of meta 0. | ||
|
||
// Add a tooltip based on ResourceLocation (Uses Translatable, see `jeiTests.groovy`) | ||
addTooltip(resource('minecraft:dirt'), translatableLiteral('Hello World!')) | ||
|
||
// Add a tooltip based on Item/ItemStack (Uses Translatable, see `jeiTests.groovy`) | ||
// Add a tooltip (Uses Translatable, see `jeiTests.groovy`) | ||
addTooltip(item('minecraft:sand'), translatable('item.material.oreprefix.gemPerfect', 'World')) | ||
|
||
// Add multiple tooltips based on ResourceLocation/Item/ItemStack (Uses Translatable, see `jeiTests.groovy`) | ||
// Add multiple tooltips (Uses Translatable, see `jeiTests.groovy`) | ||
// Tooltips are joined with `\n`. | ||
addTooltip(item('minecraft:glass'), [translatableLiteral('Testing'), translatable('nomilabs.subtitle.tick.microverse')]) | ||
|
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