Record Class ResearchPage

java.lang.Object
java.lang.Record
com.portingdeadmods.researchd.api.research.ResearchPage
Record Components:
id - The unique identifier for this page
icon - The icon to display for this page
iconResearchKey - The researchPack key used to look up the ClientResearchIcon (usually the first root's key)
researches - All researches belonging to this page

public record ResearchPage(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, net.minecraft.resources.ResourceKey<Research> iconResearchKey, com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> researches) extends Record
Kinda like Quest Book tabs
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceLocation
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResearchPage(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, net.minecraft.resources.ResourceKey<Research> iconResearchKey, com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> researches)
    Creates an instance of a ResearchPage record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    builder(net.minecraft.resources.ResourceLocation id)
     
    boolean
    containsResearch(net.minecraft.resources.ResourceKey<Research> res)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the icon record component.
    net.minecraft.resources.ResourceKey<Research>
    Returns the value of the iconResearchKey record component.
    net.minecraft.resources.ResourceLocation
    id()
    Returns the value of the id record component.
    com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>>
    Returns the value of the researches 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

    • DEFAULT_PAGE_ID

      public static final net.minecraft.resources.ResourceLocation DEFAULT_PAGE_ID
  • Constructor Details

    • ResearchPage

      public ResearchPage(net.minecraft.resources.ResourceLocation id, ResearchIcon icon, net.minecraft.resources.ResourceKey<Research> iconResearchKey, com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> researches)
      Creates an instance of a ResearchPage record class.
      Parameters:
      id - the value for the id record component
      icon - the value for the icon record component
      iconResearchKey - the value for the iconResearchKey record component
      researches - the value for the researches record component
  • Method Details

    • containsResearch

      public boolean containsResearch(net.minecraft.resources.ResourceKey<Research> res)
    • builder

      public static ResearchPage.Builder builder(net.minecraft.resources.ResourceLocation id)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • id

      public net.minecraft.resources.ResourceLocation id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • icon

      public ResearchIcon icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component
    • iconResearchKey

      public net.minecraft.resources.ResourceKey<Research> iconResearchKey()
      Returns the value of the iconResearchKey record component.
      Returns:
      the value of the iconResearchKey record component
    • researches

      public com.portingdeadmods.portingdeadlibs.utils.UniqueArray<net.minecraft.resources.ResourceKey<Research>> researches()
      Returns the value of the researches record component.
      Returns:
      the value of the researches record component