Record Class TextEditAction<T extends VeilResource<?>>

java.lang.Object
java.lang.Record
foundry.veil.impl.resource.action.TextEditAction<T>
All Implemented Interfaces:
VeilResourceAction<T>

public record TextEditAction<T extends VeilResource<?>>() extends Record implements VeilResourceAction<T>
  • Constructor Details

    • TextEditAction

      public TextEditAction()
      Creates an instance of a TextEditAction record class.
  • Method Details

    • getName

      public net.minecraft.network.chat.Component getName()
      Specified by:
      getName in interface VeilResourceAction<T extends VeilResource<?>>
      Returns:
      The name of the action
    • getDescription

      public net.minecraft.network.chat.Component getDescription()
      Specified by:
      getDescription in interface VeilResourceAction<T extends VeilResource<?>>
      Returns:
      A brief description of the action
    • getIcon

      public OptionalInt getIcon()
      Specified by:
      getIcon in interface VeilResourceAction<T extends VeilResource<?>>
      Returns:
      The icon to display for the action
    • perform

      public void perform(VeilEditorEnvironment environment, T resource)
      Description copied from interface: VeilResourceAction
      Performs the action on the specified resource
      Specified by:
      perform in interface VeilResourceAction<T extends VeilResource<?>>
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.