Interface RegistryPicker.Source<T>

Enclosing class:
RegistryPicker<T>

public static interface RegistryPicker.Source<T>
What the picker lists and how picking works: a multi-select list, a single choice, or anything else.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Whether t may be listed at all (a setting's filter).
    all()
    Every entry there is (a registry), in its own order.
    boolean
    Whether t is picked now.
    default net.minecraft.world.item.ItemStack
    icon(T t)
    The icon drawn beside t: blocks and items show their item, anything else ItemStack.EMPTY (none).
    id(T t)
    Matched by the search box besides the name.
    The collapsed row's text, e.g.
    name(T t)
    What t is called on screen.
    int
    How many are selected (any non-negative number for single choices).
    void
    toggle(T t)
    A click on t: pick or unpick it (or, for a single choice, pick it).
  • Method Details

    • all

      Iterable<T> all()
      Every entry there is (a registry), in its own order.
    • accepts

      boolean accepts(T t)
      Whether t may be listed at all (a setting's filter).
    • contains

      boolean contains(T t)
      Whether t is picked now.
    • toggle

      void toggle(T t)
      A click on t: pick or unpick it (or, for a single choice, pick it).
    • size

      int size()
      How many are selected (any non-negative number for single choices).
    • label

      String label()
      The collapsed row's text, e.g. "3 selected".
    • id

      String id(T t)
      Matched by the search box besides the name.
    • name

      String name(T t)
      What t is called on screen.
    • icon

      default net.minecraft.world.item.ItemStack icon(T t)
      The icon drawn beside t: blocks and items show their item, anything else ItemStack.EMPTY (none).