Package dev.deepcore.challenge.preview
Record Class PreviewSampleService.PreviewBlock
java.lang.Object
java.lang.Record
dev.deepcore.challenge.preview.PreviewSampleService.PreviewBlock
- Enclosing class:
PreviewSampleService
public static record PreviewSampleService.PreviewBlock(double relX, double relY, double relZ, org.bukkit.block.data.BlockData blockData)
extends Record
Represents a sampled preview block in coordinates relative to preview origin.
-
Constructor Summary
ConstructorsConstructorDescriptionPreviewBlock(double relX, double relY, double relZ, org.bukkit.block.data.BlockData blockData) Creates an instance of aPreviewBlockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.block.data.BlockDataReturns the value of theblockDatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublerelX()Returns the value of therelXrecord component.doublerelY()Returns the value of therelYrecord component.doublerelZ()Returns the value of therelZrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PreviewBlock
public PreviewBlock(double relX, double relY, double relZ, org.bukkit.block.data.BlockData blockData) Creates an instance of aPreviewBlockrecord class.- Parameters:
relX- the value for therelXrecord componentrelY- the value for therelYrecord componentrelZ- the value for therelZrecord componentblockData- the value for theblockDatarecord component
-
-
Method Details
-
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 '=='. -
relX
public double relX()Returns the value of therelXrecord component.- Returns:
- the value of the
relXrecord component
-
relY
public double relY()Returns the value of therelYrecord component.- Returns:
- the value of the
relYrecord component
-
relZ
public double relZ()Returns the value of therelZrecord component.- Returns:
- the value of the
relZrecord component
-
blockData
public org.bukkit.block.data.BlockData blockData()Returns the value of theblockDatarecord component.- Returns:
- the value of the
blockDatarecord component
-