Skip to content

Commit

Permalink
Tooltip fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ochotonida committed Apr 11, 2021
1 parent 4154150 commit ee8c832
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/artifacts/client/jei/JEIPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public void registerRecipes(IRecipeRegistration registration) {
if (item instanceof ArtifactItem && item != ModItems.NOVELTY_DRINKING_HAT.get()) {
List<ITextComponent> textComponents = new ArrayList<>();
item.appendHoverText(new ItemStack(item), null, textComponents, ITooltipFlag.TooltipFlags.NORMAL);
registration.addIngredientInfo(new ItemStack(item), VanillaTypes.ITEM, textComponents.stream().map(Object::toString).toArray(String[]::new));
registration.addIngredientInfo(new ItemStack(item), VanillaTypes.ITEM, textComponents.stream().map(ITextComponent::getString).toArray(String[]::new));
}
}
registration.addIngredientInfo(new ItemStack(ModItems.NOVELTY_DRINKING_HAT.get()), VanillaTypes.ITEM, "item.artifacts.novelty_drinking_hat.tooltip");
registration.addIngredientInfo(new ItemStack(ModItems.NOVELTY_DRINKING_HAT.get()), VanillaTypes.ITEM, "item.artifacts.plastic_drinking_hat.tooltip");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public ICurio.SoundInfo getEquipSound(SlotContext slotContext, ItemStack stack)
public void appendHoverText(ItemStack stack, World world, List<ITextComponent> tooltip, ITooltipFlag flags) {
if (Config.showTooltips) {
tooltip.add(new TranslationTextComponent(getDescriptionId() + ".tooltip.0").withStyle(TextFormatting.GRAY));
tooltip.add(new TranslationTextComponent(getDescriptionId() + ".tooltip.1", "TODO").withStyle(TextFormatting.GRAY)); // TODO
tooltip.add(new TranslationTextComponent(getDescriptionId() + ".tooltip.1", Minecraft.getInstance().options.keySprint.getTranslatedKeyMessage()).withStyle(TextFormatting.GRAY));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/artifacts/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@
"item.artifacts.whoopee_cushion.tooltip": "Increases the wearer's flatulence",
"item.artifacts.vampiric_glove.tooltip": "Causes the wearer's melee attacks to absorb health",
"item.artifacts.golden_hook.tooltip": "Increases experience dropped by creatures, especially those you have not recently killed",
"item.artifacts.helium_flamingo.tooltip.0": "Allows the wearer to swim in the air for a limited period of time",
"item.artifacts.helium_flamingo.tooltip.0": "Allows the wearer to swim in the air for a limited period of time.",
"item.artifacts.helium_flamingo.tooltip.1": "Press %s while in the air to start swimming"
}

0 comments on commit ee8c832

Please sign in to comment.