Record Class SpaceAtlasContent.AtlasReading
java.lang.Object
java.lang.Record
com.lightning.northstar.item.atlas.SpaceAtlasContent.AtlasReading
- Enclosing class:
SpaceAtlasContent
public static record SpaceAtlasContent.AtlasReading(net.minecraft.resources.ResourceLocation origin, float science, int day)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SpaceAtlasContent.AtlasReading> -
Constructor Summary
ConstructorsConstructorDescriptionAtlasReading(net.minecraft.resources.ResourceLocation origin, float science, int day) Creates an instance of aAtlasReadingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintday()Returns the value of thedayrecord 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.ResourceLocationorigin()Returns the value of theoriginrecord component.floatscience()Returns the value of thesciencerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
AtlasReading
public AtlasReading(net.minecraft.resources.ResourceLocation origin, float science, int day) Creates an instance of aAtlasReadingrecord class.- Parameters:
origin- the value for theoriginrecord componentscience- the value for thesciencerecord componentday- the value for thedayrecord 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 '=='. -
origin
public net.minecraft.resources.ResourceLocation origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
science
public float science()Returns the value of thesciencerecord component.- Returns:
- the value of the
sciencerecord component
-
day
public int day()Returns the value of thedayrecord component.- Returns:
- the value of the
dayrecord component
-