Record Class BlockPlacementRule.Replacement
java.lang.Object
java.lang.Record
net.minestom.server.instance.block.rule.BlockPlacementRule.Replacement
- Enclosing class:
BlockPlacementRule
-
Constructor Summary
ConstructorsConstructorDescriptionReplacement(@NotNull Block block, @NotNull BlockFace blockFace, @NotNull Point cursorPosition, @NotNull Material material) Creates an instance of aReplacementrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Blockblock()Returns the value of theblockrecord component.@NotNull BlockFaceReturns the value of theblockFacerecord component.@NotNull PointReturns the value of thecursorPositionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Materialmaterial()Returns the value of thematerialrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Replacement
public Replacement(@NotNull @NotNull Block block, @NotNull @NotNull BlockFace blockFace, @NotNull @NotNull Point cursorPosition, @NotNull @NotNull Material material) Creates an instance of aReplacementrecord class.- Parameters:
block- the value for theblockrecord componentblockFace- the value for theblockFacerecord componentcursorPosition- the value for thecursorPositionrecord componentmaterial- the value for thematerialrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
blockFace
Returns the value of theblockFacerecord component.- Returns:
- the value of the
blockFacerecord component
-
cursorPosition
Returns the value of thecursorPositionrecord component.- Returns:
- the value of the
cursorPositionrecord component
-
material
Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-