← 返回首页
This is an old revision of the document!
在您的物品类中,像这样重写“appendTooltip”(有关如何翻译工具提示,请参见lang):
@Override public void appendTooltip(ItemStack itemStack, World world, List<Text> tooltip, TooltipContext tooltipContext) { tooltip.add(new TranslatableText("item.tutorial.fabric_item.tooltip")); }
对于一个方块,执行相同的操作,但在您的方块类中覆盖“buildTooltip”。