Package net.jcm.vsch.api.resource
Record Class TextureLocation
java.lang.Object
java.lang.Record
net.jcm.vsch.api.resource.TextureLocation
public record TextureLocation(net.minecraft.resources.ResourceLocation location, int offsetX, int offsetY, float scale)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTextureLocation(net.minecraft.resources.ResourceLocation location, int offsetX, int offsetY) TextureLocation(net.minecraft.resources.ResourceLocation location, int offsetX, int offsetY, float scale) Creates an instance of aTextureLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static TextureLocationfromNonStandardSize(net.minecraft.resources.ResourceLocation location, int offsetX, int offsetY, int size) final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationlocation()Returns the value of thelocationrecord component.intoffsetX()Returns the value of theoffsetXrecord component.intoffsetY()Returns the value of theoffsetYrecord component.floatscale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextureLocation
public TextureLocation(net.minecraft.resources.ResourceLocation location, int offsetX, int offsetY) -
TextureLocation
public TextureLocation(net.minecraft.resources.ResourceLocation location, int offsetX, int offsetY, float scale) Creates an instance of aTextureLocationrecord class.- Parameters:
location- the value for thelocationrecord componentoffsetX- the value for theoffsetXrecord componentoffsetY- the value for theoffsetYrecord componentscale- the value for thescalerecord component
-
-
Method Details
-
fromNonStandardSize
public static TextureLocation fromNonStandardSize(net.minecraft.resources.ResourceLocation location, int offsetX, int offsetY, int size) -
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 '=='. -
location
public net.minecraft.resources.ResourceLocation location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
offsetX
public int offsetX()Returns the value of theoffsetXrecord component.- Returns:
- the value of the
offsetXrecord component
-
offsetY
public int offsetY()Returns the value of theoffsetYrecord component.- Returns:
- the value of the
offsetYrecord component
-
scale
public float scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-