Record Class BlockDataSource
java.lang.Object
java.lang.Record
net.minecraft.network.chat.contents.BlockDataSource
- All Implemented Interfaces:
DataSource
public record BlockDataSource(String posPattern, @Nullable Coordinates compiledPos)
extends Record
implements DataSource
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Coordinates
The field for thecompiledPos
record component.private final String
The field for theposPattern
record component. -
Constructor Summary
ConstructorDescriptionBlockDataSource
(String p_237312_) BlockDataSource
(String posPattern, Coordinates compiledPos) Creates an instance of aBlockDataSource
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompiledPos
record component.private static Coordinates
compilePos
(String p_237318_) boolean
Indicates whether some other object is "equal to" this one.getData
(CommandSourceStack p_237323_) int
hashCode()
Returns a hash code value for this object.Returns the value of theposPattern
record component.toString()
Returns a string representation of this record class.
-
Field Details
-
posPattern
The field for theposPattern
record component. -
compiledPos
The field for thecompiledPos
record component.
-
-
Constructor Details
-
BlockDataSource
-
BlockDataSource
Creates an instance of aBlockDataSource
record class.- Parameters:
posPattern
- the value for theposPattern
record componentcompiledPos
- the value for thecompiledPos
record component
-
-
Method Details
-
compilePos
-
getData
- Specified by:
getData
in interfaceDataSource
-
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. -
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)
. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
posPattern
Returns the value of theposPattern
record component.- Returns:
- the value of the
posPattern
record component
-
compiledPos
Returns the value of thecompiledPos
record component.- Returns:
- the value of the
compiledPos
record component
-