Interface IconProvider<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Experimental @OverrideOnly @FunctionalInterface public interface IconProvider<T>
Provides the icon shown in the in-game tooltip.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable net.minecraft.world.item.ItemStack
    getIcon(T object, TooltipContext context)
     
  • Method Details

    • getIcon

      @Nullable @Nullable net.minecraft.world.item.ItemStack getIcon(T object, TooltipContext context)
      Returns:
      Null if this provider can't provide an icon for the object.