User Tools

Site Tools


Sidebar

Setup

Basics

Items

Blocks and Block Entities

Fluids

Entities

World Generation

Miscellaneous

Events

Mixins

Advanced

Tutorials for Minecraft 1.15

Tutorials for Minecraft 1.14

Documentation

tutorial:tooltip

Adding a tooltip

In your item class, override appendTooltip like so (see lang for how to translate the tooltip) :

@Override
public void appendTooltip(ItemStack itemStack, World world, List<Text> tooltip, TooltipContext tooltipContext) {
    tooltip.add(new TranslatableText("item.tutorial.fabric_item.tooltip"));
}

For a block, do the same but override buildTooltip in your block class.

tutorial/tooltip.txt · Last modified: 2019/07/24 12:48 by fudge