Record Class QuestPageElement

java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.page.QuestPageElement
All Implemented Interfaces:
FoliosPageElement

public record QuestPageElement(List<FoliosObjective> objectives, Optional<String> title, String text, Optional<String> reward, boolean inOrder, Optional<net.minecraft.resources.ResourceLocation> quest, Optional<String> locked) extends Record implements FoliosPageElement
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<QuestPageElement> CODEC
  • Constructor Details

    • QuestPageElement

      public QuestPageElement(List<FoliosObjective> objectives, Optional<String> title, String text, Optional<String> reward, boolean inOrder, Optional<net.minecraft.resources.ResourceLocation> quest, Optional<String> locked)
      Creates an instance of a QuestPageElement record class.
      Parameters:
      objectives - the value for the objectives record component
      title - the value for the title record component
      text - the value for the text record component
      reward - the value for the reward record component
      inOrder - the value for the inOrder record component
      quest - the value for the quest record component
      locked - the value for the locked record component
  • Method Details

    • objectives

      public List<FoliosObjective> objectives()
      Returns the value of the objectives record component.
      Specified by:
      objectives in interface FoliosPageElement
      Returns:
      the value of the objectives record component
    • lay

      Description copied from interface: FoliosPageElement
      Sets the page out: one or more pages, each drawn on its own.
      Specified by:
      lay in interface FoliosPageElement
    • gilded

      public static void gilded(FoliosPainter painter, int x, int y, int width, float fill)
    • stepped

      public static void stepped(FoliosPainter painter, int x, int y, int width, float fill, int steps, int color)
    • bar

      public static void bar(FoliosPainter painter, int x, int y, int width, int height, float fill, int color)
    • searchText

      public String searchText()
      Description copied from interface: FoliosPageElement
      Words of the page a search should find it by.
      Specified by:
      searchText in interface FoliosPageElement
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • title

      public Optional<String> title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • reward

      public Optional<String> reward()
      Returns the value of the reward record component.
      Returns:
      the value of the reward record component
    • inOrder

      public boolean inOrder()
      Returns the value of the inOrder record component.
      Returns:
      the value of the inOrder record component
    • quest

      public Optional<net.minecraft.resources.ResourceLocation> quest()
      Returns the value of the quest record component.
      Returns:
      the value of the quest record component
    • locked

      public Optional<String> locked()
      Returns the value of the locked record component.
      Returns:
      the value of the locked record component