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 boolean isOffset, @NotNull Material material) Creates an instance of aReplacement
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Block
block()
Returns the value of theblock
record component.@NotNull BlockFace
Returns the value of theblockFace
record component.@NotNull Point
Returns the value of thecursorPosition
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull boolean
isOffset()
Returns the value of theisOffset
record component.@NotNull Material
material()
Returns the value of thematerial
record component.final String
toString()
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 boolean isOffset, @NotNull @NotNull Material material) Creates an instance of aReplacement
record class.- Parameters:
block
- the value for theblock
record componentblockFace
- the value for theblockFace
record componentcursorPosition
- the value for thecursorPosition
record componentisOffset
- the value for theisOffset
record componentmaterial
- the value for thematerial
record 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 thecompare
method from their corresponding wrapper classes. -
block
Returns the value of theblock
record component.- Returns:
- the value of the
block
record component
-
blockFace
Returns the value of theblockFace
record component.- Returns:
- the value of the
blockFace
record component
-
cursorPosition
Returns the value of thecursorPosition
record component.- Returns:
- the value of the
cursorPosition
record component
-
isOffset
@NotNull public @NotNull boolean isOffset()Returns the value of theisOffset
record component.- Returns:
- the value of the
isOffset
record component
-
material
Returns the value of thematerial
record component.- Returns:
- the value of the
material
record component
-