Interface EditSlot<T>


public interface EditSlot<T>
What a ValueEditor edits: a config value, or an element of a list being edited. Values set here are pending until the player saves.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<net.minecraft.network.chat.Component>
    Why the current input can't be saved, if it can't.
    get()
    The pending value.
    net.minecraft.network.chat.Component
    The name to narrate.
    void
    set(T value)
    Sets a new pending value; it's checked, and the slot reports an error() when it isn't valid.
    void
    setInvalid(net.minecraft.network.chat.Component error)
    Marks input that isn't a value at all (text that doesn't parse), which blocks saving until it's fixed.
     
  • Method Details

    • type

      ConfigType<T> type()
    • get

      T get()
      The pending value.
    • set

      void set(T value)
      Sets a new pending value; it's checked, and the slot reports an error() when it isn't valid.
    • setInvalid

      void setInvalid(net.minecraft.network.chat.Component error)
      Marks input that isn't a value at all (text that doesn't parse), which blocks saving until it's fixed.
    • error

      Optional<net.minecraft.network.chat.Component> error()
      Why the current input can't be saved, if it can't.
    • name

      net.minecraft.network.chat.Component name()
      The name to narrate.