Record Class GuideLock

java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.GuideLock

public record GuideLock(@Nullable net.minecraft.resources.ResourceLocation advancement, @Nullable String flag, boolean secret) extends Record
What keeps a category, entry or page closed until the player has earned it. In JSON these are fields of the thing locked:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final GuideLock
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    GuideLock(@Nullable net.minecraft.resources.ResourceLocation advancement, @Nullable String flag, boolean secret)
    Creates an instance of a GuideLock record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable net.minecraft.resources.ResourceLocation
    Returns the value of the advancement record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @Nullable String
    Returns the value of the flag record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    boolean
    Whether it is shown at all: open, or locked but not secret.
    static GuideLock
    read(com.google.gson.JsonObject json)
     
    boolean
    Returns the value of the secret record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • GuideLock

      public GuideLock(@Nullable @Nullable net.minecraft.resources.ResourceLocation advancement, @Nullable @Nullable String flag, boolean secret)
      Creates an instance of a GuideLock record class.
      Parameters:
      advancement - the value for the advancement record component
      flag - the value for the flag record component
      secret - the value for the secret record component
  • Method Details

    • read

      public static GuideLock read(com.google.gson.JsonObject json)
    • isOpen

      public boolean isOpen()
    • isVisible

      public boolean isVisible()
      Whether it is shown at all: open, or locked but not secret.
    • 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.
    • advancement

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation advancement()
      Returns the value of the advancement record component.
      Returns:
      the value of the advancement record component
    • flag

      @Nullable public @Nullable String flag()
      Returns the value of the flag record component.
      Returns:
      the value of the flag record component
    • secret

      public boolean secret()
      Returns the value of the secret record component.
      Returns:
      the value of the secret record component