Record Class BlockPlacementRule.Replacement
java.lang.Object
java.lang.Record
net.minestom.server.instance.block.rule.BlockPlacementRule.Replacement
- Enclosing class:
BlockPlacementRule
-
Constructor Summary
ConstructorDescriptionReplacement
(@NotNull Block block, @NotNull BlockFace blockFace, @NotNull Point cursorPosition, @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 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 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 componentmaterial
- the value for thematerial
record 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 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
-
material
Returns the value of thematerial
record component.- Returns:
- the value of the
material
record component
-