Record Class OcculusTab
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.skill.OcculusTab
- Record Components:
rendererClass- The path of the renderer class.background- The location of the background texture for this skill tree.icon- The location of the icon texture for this skill tree.width- The width of the background texture.height- The height of the background texture.startX- The initial X coordinate of the background texture.startY- The initial Y coordinate of the background texture.index- The index this tab should appear at in the occulus.rendererFactory- The lazy renderer factory. (Only call on the client side)
- All Implemented Interfaces:
ITranslatable
public record OcculusTab(String rendererClass, @Nullable net.minecraft.resources.ResourceLocation background, @Nullable net.minecraft.resources.ResourceLocation icon, int width, int height, int startX, int startY, int index, Supplier<OcculusTab.OcculusTabRendererFactory> rendererFactory)
extends Record
implements ITranslatable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFactory interface to create occulus tab renderers.Nested classes/interfaces inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable
ITranslatable.WithDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<OcculusTab>static final Stringstatic final Stringstatic final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<OcculusTab>>static final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionOcculusTab(String rendererClass, @Nullable net.minecraft.resources.ResourceLocation background, @Nullable net.minecraft.resources.ResourceLocation icon, int width, int height, int startX, int startY, int index, Supplier<OcculusTab.OcculusTabRendererFactory> rendererFactory) Creates an instance of aOcculusTabrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.resources.ResourceLocationReturns the value of thebackgroundrecord component.net.minecraft.resources.ResourceLocationbackground(net.minecraft.core.RegistryAccess access) final booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationgetId(net.minecraft.core.RegistryAccess registryAccess) getType()final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.@Nullable net.minecraft.resources.ResourceLocationicon()Returns the value of theiconrecord component.net.minecraft.resources.ResourceLocationicon(net.minecraft.core.RegistryAccess access) intindex()Returns the value of theindexrecord component.Returns the value of therendererClassrecord component.Returns the value of therendererFactoryrecord 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.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.minecraftschurlimods.arsmagicalegacy.api.util.ITranslatable
getDisplayName, getDisplayName, getId, getTranslationKey, getTranslationKey
-
Field Details
-
DEFAULT_RENDERER
- See Also:
-
OCCULUS_TAB
- See Also:
-
REGISTRY_KEY
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<OcculusTab>> REGISTRY_KEY -
TEXTURE_WIDTH
public static final int TEXTURE_WIDTH- See Also:
-
TEXTURE_HEIGHT
public static final int TEXTURE_HEIGHT- See Also:
-
CODEC
-
-
Constructor Details
-
OcculusTab
public OcculusTab(String rendererClass, @Nullable @Nullable net.minecraft.resources.ResourceLocation background, @Nullable @Nullable net.minecraft.resources.ResourceLocation icon, int width, int height, int startX, int startY, int index, Supplier<OcculusTab.OcculusTabRendererFactory> rendererFactory) Creates an instance of aOcculusTabrecord class.- Parameters:
rendererClass- the value for therendererClassrecord componentbackground- the value for thebackgroundrecord componenticon- the value for theiconrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentstartX- the value for thestartXrecord componentstartY- the value for thestartYrecord componentindex- the value for theindexrecord componentrendererFactory- the value for therendererFactoryrecord component
-
-
Method Details
-
background
public net.minecraft.resources.ResourceLocation background(net.minecraft.core.RegistryAccess access) - Returns:
- The location of the background texture for this skill tree.
-
icon
public net.minecraft.resources.ResourceLocation icon(net.minecraft.core.RegistryAccess access) - Returns:
- The location of the icon texture for this skill tree.
-
getId
public net.minecraft.resources.ResourceLocation getId(net.minecraft.core.RegistryAccess registryAccess) - Specified by:
getIdin interfaceITranslatable- Returns:
- The id of this object.
-
getType
- Specified by:
getTypein interfaceITranslatable- Returns:
- The type of this object, for example "block" or "item".
-
rendererClass
Returns the value of therendererClassrecord component.- Returns:
- the value of the
rendererClassrecord component
-
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. -
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. -
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 '=='. -
background
@Nullable public @Nullable net.minecraft.resources.ResourceLocation background()Returns the value of thebackgroundrecord component.- Returns:
- the value of the
backgroundrecord component
-
icon
@Nullable public @Nullable net.minecraft.resources.ResourceLocation icon()Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
startX
public int startX()Returns the value of thestartXrecord component.- Returns:
- the value of the
startXrecord component
-
startY
public int startY()Returns the value of thestartYrecord component.- Returns:
- the value of the
startYrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
rendererFactory
Returns the value of therendererFactoryrecord component.- Returns:
- the value of the
rendererFactoryrecord component
-