-
-
Save Kaupenjoe/630e1206eb7d7aa9b7dab0e9dce02edd to your computer and use it in GitHub Desktop.
YT345 - Fabric 119 - Tooltip
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
@Override | |
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) { | |
if(Screen.hasShiftDown()) { | |
tooltip.add(Text.literal("Right Click to get a random number!").formatted(Formatting.AQUA)); | |
} else { | |
tooltip.add(Text.literal("Press Shift for more info!").formatted(Formatting.YELLOW)); | |
} | |
super.appendTooltip(stack, world, tooltip, context); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment