Record Class BlockDataSource
java.lang.Object
java.lang.Record
net.minecraft.network.chat.contents.data.BlockDataSource
- All Implemented Interfaces:
DataSource
public record BlockDataSource(CompilableString<Coordinates> coordinates)
extends Record
implements DataSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<CompilableString<Coordinates>> private final CompilableString<Coordinates> The field for thecoordinatesrecord component.static final MapCodec<BlockDataSource> -
Constructor Summary
ConstructorsConstructorDescriptionBlockDataSource(CompilableString<Coordinates> coordinates) Creates an instance of aBlockDataSourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncodec()Returns the value of thecoordinatesrecord component.final booleanIndicates whether some other object is "equal to" this one.getData(CommandSourceStack sender) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
coordinates
The field for thecoordinatesrecord component. -
BLOCK_POS_CODEC
-
MAP_CODEC
-
-
Constructor Details
-
BlockDataSource
Creates an instance of aBlockDataSourcerecord class.- Parameters:
coordinates- the value for thecoordinatesrecord component
-
-
Method Details
-
getData
- Specified by:
getDatain interfaceDataSource
-
codec
- Specified by:
codecin interfaceDataSource
-
toString
-
hashCode
-
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). -
coordinates
Returns the value of thecoordinatesrecord component.- Returns:
- the value of the
coordinatesrecord component
-