Record Class BlockPlacementRule.Replacement
java.lang.Object
java.lang.Record
net.minestom.server.instance.block.rule.BlockPlacementRule.Replacement
- Enclosing class:
BlockPlacementRule
-
Constructor Summary
ConstructorsConstructorDescriptionReplacement(Block block, BlockFace blockFace, Point cursorPosition, boolean isOffset, Material material) Creates an instance of aReplacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.Returns the value of theblockFacerecord component.Returns 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.booleanisOffset()Returns the value of theisOffsetrecord component.material()Returns the value of thematerialrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Replacement
public Replacement(Block block, BlockFace blockFace, Point cursorPosition, boolean isOffset, Material material) Creates an instance of aReplacementrecord class.- Parameters:
block- the value for theblockrecord componentblockFace- the value for theblockFacerecord componentcursorPosition- the value for thecursorPositionrecord componentisOffset- the value for theisOffsetrecord componentmaterial- the value for thematerialrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
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
-
isOffset
public boolean isOffset()Returns the value of theisOffsetrecord component.- Returns:
- the value of the
isOffsetrecord component
-
material
Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-