Record Class PlanetProperties.TextureLayer
java.lang.Object
java.lang.Record
com.lightning.northstar.planet.data.PlanetProperties.TextureLayer
- Enclosing class:
PlanetProperties
public static record PlanetProperties.TextureLayer(net.minecraft.resources.ResourceLocation texture, float speed, boolean snap)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PlanetProperties.TextureLayer> -
Constructor Summary
ConstructorsConstructorDescriptionTextureLayer(net.minecraft.resources.ResourceLocation texture) TextureLayer(net.minecraft.resources.ResourceLocation texture, float speed, boolean snap) Creates an instance of aTextureLayerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleansnap()Returns the value of thesnaprecord component.floatspeed()Returns the value of thespeedrecord 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
-
TextureLayer
public TextureLayer(net.minecraft.resources.ResourceLocation texture) -
TextureLayer
public TextureLayer(net.minecraft.resources.ResourceLocation texture, float speed, boolean snap) Creates an instance of aTextureLayerrecord class.- Parameters:
texture- the value for thetexturerecord componentspeed- the value for thespeedrecord componentsnap- the value for thesnaprecord 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
-
speed
public float speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
snap
public boolean snap()Returns the value of thesnaprecord component.- Returns:
- the value of the
snaprecord component
-