Record Class OcculusTab

java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.magic.OcculusTab
Record Components:
width - The width of the tab.
height - The height of the tab.
startX - The default X position of the tab.
startY - The default Y position of the tab.
index - The index of the tab in relation to other tabs.
renderer - The id of the renderer type to use. Get an actual renderer only on the client using ArsMagicaClientApi.occulusTabRendererFactory(Holder).

public record OcculusTab(int width, int height, int startX, int startY, int index, net.minecraft.resources.Identifier renderer) extends Record
Represents an occulus tab.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<net.minecraft.core.Holder<OcculusTab>>
     
    static final com.mojang.serialization.Codec<OcculusTab>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    OcculusTab(int width, int height, int startX, int startY, int index, net.minecraft.resources.Identifier renderer)
    Creates an instance of a OcculusTab record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    static net.minecraft.resources.Identifier
    getBackground(net.minecraft.core.Holder<OcculusTab> holder)
     
    static net.minecraft.resources.Identifier
    getIcon(net.minecraft.core.Holder<OcculusTab> holder)
     
    static net.minecraft.network.chat.MutableComponent
    getName(net.minecraft.core.Holder<OcculusTab> holder)
     
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the height record component.
    int
    Returns the value of the index record component.
    net.minecraft.resources.Identifier
    Returns the value of the renderer record component.
    int
    Returns the value of the startX record component.
    int
    Returns the value of the startY record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the width record component.

    Methods inherited from class Object

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

    • DIRECT_CODEC

      public static final com.mojang.serialization.Codec<OcculusTab> DIRECT_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<net.minecraft.core.Holder<OcculusTab>> CODEC
  • Constructor Details

    • OcculusTab

      public OcculusTab(int width, int height, int startX, int startY, int index, net.minecraft.resources.Identifier renderer)
      Creates an instance of a OcculusTab record class.
      Parameters:
      width - the value for the width record component
      height - the value for the height record component
      startX - the value for the startX record component
      startY - the value for the startY record component
      index - the value for the index record component
      renderer - the value for the renderer record component
  • Method Details

    • getBackground

      public static net.minecraft.resources.Identifier getBackground(net.minecraft.core.Holder<OcculusTab> holder)
      Parameters:
      holder - The occulus tab Holder to query.
      Returns:
      The background Identifier for the given occulus tab.
    • getIcon

      public static net.minecraft.resources.Identifier getIcon(net.minecraft.core.Holder<OcculusTab> holder)
      Parameters:
      holder - The occulus tab Holder to query.
      Returns:
      The icon Identifier for the given occulus tab.
    • getName

      public static net.minecraft.network.chat.MutableComponent getName(net.minecraft.core.Holder<OcculusTab> holder)
      Parameters:
      holder - The occulus tab Holder to query.
      Returns:
      The display name of the given occulus tab.
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • startX

      public int startX()
      Returns the value of the startX record component.
      Returns:
      the value of the startX record component
    • startY

      public int startY()
      Returns the value of the startY record component.
      Returns:
      the value of the startY record component
    • index

      public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • renderer

      public net.minecraft.resources.Identifier renderer()
      Returns the value of the renderer record component.
      Returns:
      the value of the renderer record component