Class CustomTooltipTest.CustomItemWithTooltip

java.lang.Object
net.minecraft.world.item.Item
net.neoforged.neoforge.oldtest.client.CustomTooltipTest.CustomItemWithTooltip
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, IItemExtension
Enclosing class:
CustomTooltipTest

static class CustomTooltipTest.CustomItemWithTooltip extends net.minecraft.world.item.Item
  • Constructor Details

    • CustomItemWithTooltip

      public CustomItemWithTooltip(net.minecraft.world.item.Item.Properties properties)
  • Method Details

    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext context, net.minecraft.world.item.component.TooltipDisplay tooltipDisplay, Consumer<net.minecraft.network.chat.Component> components, net.minecraft.world.item.TooltipFlag flag)
      Overrides:
      appendHoverText in class net.minecraft.world.item.Item
    • use

      public net.minecraft.world.InteractionResult use(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.InteractionHand hand)
      Overrides:
      use in class net.minecraft.world.item.Item
    • getTooltipImage

      public Optional<net.minecraft.world.inventory.tooltip.TooltipComponent> getTooltipImage(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getTooltipImage in class net.minecraft.world.item.Item