Record Class SpottingIconManager.SpottingIcon
java.lang.Object
java.lang.Record
net.frozenblock.lib.spotting_icons.api.SpottingIconManager.SpottingIcon
- Enclosing class:
SpottingIconManager
public static record SpottingIconManager.SpottingIcon(net.minecraft.resources.ResourceLocation texture, float startFadeDist, float endFadeDist, net.minecraft.resources.ResourceLocation restrictionID)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SpottingIconManager.SpottingIcon> -
Constructor Summary
ConstructorsConstructorDescriptionSpottingIcon(net.minecraft.resources.ResourceLocation texture, float startFadeDist, float endFadeDist, net.minecraft.resources.ResourceLocation restrictionID) Creates an instance of aSpottingIconrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theendFadeDistrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationReturns the value of therestrictionIDrecord component.floatReturns the value of thestartFadeDistrecord component.net.minecraft.resources.ResourceLocationtexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
SpottingIcon
public SpottingIcon(net.minecraft.resources.ResourceLocation texture, float startFadeDist, float endFadeDist, net.minecraft.resources.ResourceLocation restrictionID) Creates an instance of aSpottingIconrecord class.- Parameters:
texture- the value for thetexturerecord componentstartFadeDist- the value for thestartFadeDistrecord componentendFadeDist- the value for theendFadeDistrecord componentrestrictionID- the value for therestrictionIDrecord component
-
-
Method Details
-
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 '=='. -
texture
public net.minecraft.resources.ResourceLocation texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
startFadeDist
public float startFadeDist()Returns the value of thestartFadeDistrecord component.- Returns:
- the value of the
startFadeDistrecord component
-
endFadeDist
public float endFadeDist()Returns the value of theendFadeDistrecord component.- Returns:
- the value of the
endFadeDistrecord component
-
restrictionID
public net.minecraft.resources.ResourceLocation restrictionID()Returns the value of therestrictionIDrecord component.- Returns:
- the value of the
restrictionIDrecord component
-