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 SummaryFieldsModifier and TypeFieldDescriptionprivate final CoordinatesThe field for thecompiledPosrecord component.private final StringThe field for theposPatternrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionBlockDataSource(String p_237312_) BlockDataSource(String posPattern, Coordinates compiledPos) Creates an instance of aBlockDataSourcerecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thecompiledPosrecord component.private static CoordinatescompilePos(String p_237318_) booleanIndicates whether some other object is "equal to" this one.getData(CommandSourceStack p_237323_) inthashCode()Returns a hash code value for this object.Returns the value of theposPatternrecord component.toString()Returns a string representation of this record class.
- 
Field Details- 
posPatternThe field for theposPatternrecord component.
- 
compiledPosThe field for thecompiledPosrecord component.
 
- 
- 
Constructor Details- 
BlockDataSource
- 
BlockDataSourceCreates an instance of aBlockDataSourcerecord class.- Parameters:
- posPattern- the value for the- posPatternrecord component
- compiledPos- the value for the- compiledPosrecord component
 
 
- 
- 
Method Details- 
compilePos
- 
getData- Specified by:
- getDatain interface- DataSource
 
- 
toStringReturns 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.
- 
equalsIndicates 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).
- 
hashCodepublic int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
- 
posPatternReturns the value of theposPatternrecord component.- Returns:
- the value of the posPatternrecord component
 
- 
compiledPosReturns the value of thecompiledPosrecord component.- Returns:
- the value of the compiledPosrecord component
 
 
-