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 usingArsMagicaClientApi.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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.core.Holder<OcculusTab>> static final com.mojang.serialization.Codec<OcculusTab> -
Constructor Summary
ConstructorsConstructorDescriptionOcculusTab(int width, int height, int startX, int startY, int index, net.minecraft.resources.Identifier renderer) Creates an instance of aOcculusTabrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static net.minecraft.resources.IdentifiergetBackground(net.minecraft.core.Holder<OcculusTab> holder) static net.minecraft.resources.IdentifiergetIcon(net.minecraft.core.Holder<OcculusTab> holder) static net.minecraft.network.chat.MutableComponentgetName(net.minecraft.core.Holder<OcculusTab> holder) final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.intindex()Returns the value of theindexrecord component.net.minecraft.resources.Identifierrenderer()Returns the value of therendererrecord component.intstartX()Returns the value of thestartXrecord component.intstartY()Returns the value of thestartYrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Field Details
-
DIRECT_CODEC
-
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 aOcculusTabrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentstartX- the value for thestartXrecord componentstartY- the value for thestartYrecord componentindex- the value for theindexrecord componentrenderer- the value for therendererrecord component
-
-
Method Details
-
getBackground
public static net.minecraft.resources.Identifier getBackground(net.minecraft.core.Holder<OcculusTab> holder) - Parameters:
holder- The occulus tabHolderto query.- Returns:
- The background
Identifierfor the given occulus tab.
-
getIcon
public static net.minecraft.resources.Identifier getIcon(net.minecraft.core.Holder<OcculusTab> holder) - Parameters:
holder- The occulus tabHolderto query.- Returns:
- The icon
Identifierfor the given occulus tab.
-
getName
public static net.minecraft.network.chat.MutableComponent getName(net.minecraft.core.Holder<OcculusTab> holder) - Parameters:
holder- The occulus tabHolderto query.- Returns:
- The display name of the given occulus tab.
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
width
-
height
-
startX
-
startY
-
index
-
renderer
-