From c3ccc98af711f3ac6d4b1fc0020e50a55ff74306 Mon Sep 17 00:00:00 2001 From: HellionGames Date: Sun, 8 Aug 2021 19:50:26 -0400 Subject: [PATCH] Added Tooltips -Added light purple tooltip to gem items with instructions --- .../infernalstudios/miningmaster/items/GemItem.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/org/infernalstudios/miningmaster/items/GemItem.java b/src/main/java/org/infernalstudios/miningmaster/items/GemItem.java index 124847d..549c218 100644 --- a/src/main/java/org/infernalstudios/miningmaster/items/GemItem.java +++ b/src/main/java/org/infernalstudios/miningmaster/items/GemItem.java @@ -1,11 +1,23 @@ package org.infernalstudios.miningmaster.items; +import net.minecraft.client.util.ITooltipFlag; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.world.World; + +import javax.annotation.Nullable; +import java.util.List; public class GemItem extends Item { public GemItem() { super(new Item.Properties().group(ItemGroup.MATERIALS)); } + + @Override + public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { + tooltip.add(new StringTextComponent("\u00A7dCombine with an item in a smithing table to enchant!")); + } }