Record Class SpaceAtlasContent.Planet
java.lang.Object
java.lang.Record
com.lightning.northstar.item.atlas.SpaceAtlasContent.Planet
- Enclosing class:
SpaceAtlasContent
public static record SpaceAtlasContent.Planet(net.minecraft.resources.ResourceLocation planetId, @Unmodifiable List<SpaceAtlasContent.AtlasReading> readings, float science)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SpaceAtlasContent.Planet> -
Constructor Summary
ConstructorsConstructorDescriptionPlanet(net.minecraft.resources.ResourceLocation planetId, @Unmodifiable List<SpaceAtlasContent.AtlasReading> readings, float science) Creates an instance of aPlanetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationplanetId()Returns the value of theplanetIdrecord component.@Unmodifiable List<SpaceAtlasContent.AtlasReading> readings()Returns the value of thereadingsrecord component.floatscience()Returns the value of thesciencerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Planet
public Planet(net.minecraft.resources.ResourceLocation planetId, @Unmodifiable List<SpaceAtlasContent.AtlasReading> readings, float science) Creates an instance of aPlanetrecord class.- Parameters:
planetId- the value for theplanetIdrecord componentreadings- the value for thereadingsrecord componentscience- the value for thesciencerecord component
-
-
Method Details
-
toBuilder
-
builder
-
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 '=='. -
planetId
public net.minecraft.resources.ResourceLocation planetId()Returns the value of theplanetIdrecord component.- Returns:
- the value of the
planetIdrecord component
-
readings
Returns the value of thereadingsrecord component.- Returns:
- the value of the
readingsrecord component
-
science
public float science()Returns the value of thesciencerecord component.- Returns:
- the value of the
sciencerecord component
-