Record Class SpaceAtlasContent
java.lang.Object
java.lang.Record
com.lightning.northstar.item.atlas.SpaceAtlasContent
@ParametersAreNonnullByDefault
public record SpaceAtlasContent(@Unmodifiable Map<net.minecraft.resources.ResourceLocation,SpaceAtlasContent.Planet> planets, @Unmodifiable Map<RocketDestination,net.minecraft.network.chat.Component> destinations)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic classstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SpaceAtlasContent> static final SpaceAtlasContent -
Constructor Summary
ConstructorsConstructorDescriptionSpaceAtlasContent(@Unmodifiable Map<net.minecraft.resources.ResourceLocation, SpaceAtlasContent.Planet> planets, @Unmodifiable Map<RocketDestination, net.minecraft.network.chat.Component> destinations) Creates an instance of aSpaceAtlasContentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SpaceAtlasContent.Builderbuilder()@Unmodifiable Map<RocketDestination, net.minecraft.network.chat.Component> Returns the value of thedestinationsrecord component.final booleanIndicates whether some other object is "equal to" this one.static net.minecraft.network.chat.MutableComponentgetDefaultLabel(net.minecraft.core.BlockPos pos, net.minecraft.core.Direction dir) final inthashCode()Returns a hash code value for this object.@Unmodifiable Map<net.minecraft.resources.ResourceLocation, SpaceAtlasContent.Planet> planets()Returns the value of theplanetsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
CODEC
-
-
Constructor Details
-
SpaceAtlasContent
public SpaceAtlasContent(@Unmodifiable Map<net.minecraft.resources.ResourceLocation, SpaceAtlasContent.Planet> planets, @Unmodifiable Map<RocketDestination, net.minecraft.network.chat.Component> destinations) Creates an instance of aSpaceAtlasContentrecord class.- Parameters:
planets- the value for theplanetsrecord componentdestinations- the value for thedestinationsrecord component
-
-
Method Details
-
asBuilder
-
builder
-
getDefaultLabel
@Contract("_, _ -> new") public static net.minecraft.network.chat.MutableComponent getDefaultLabel(net.minecraft.core.BlockPos pos, net.minecraft.core.Direction dir) -
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. All components in this record class are compared withObjects::equals(Object,Object). -
planets
public @Unmodifiable Map<net.minecraft.resources.ResourceLocation,SpaceAtlasContent.Planet> planets()Returns the value of theplanetsrecord component.- Returns:
- the value of the
planetsrecord component
-
destinations
Returns the value of thedestinationsrecord component.- Returns:
- the value of the
destinationsrecord component
-