Record Class BlockPlacementRule.PlacementState
java.lang.Object
java.lang.Record
net.minestom.server.instance.block.rule.BlockPlacementRule.PlacementState
- Enclosing class:
BlockPlacementRule
-
Constructor Summary
ConstructorsConstructorDescriptionPlacementState(Block.Getter instance, @NotNull Block block, @Nullable BlockFace blockFace, @NotNull Point placePosition, @Nullable Point cursorPosition, @Nullable Pos playerPosition, @Nullable ItemMeta usedItemMeta, boolean isPlayerShifting) Creates an instance of aPlacementStaterecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Blockblock()Returns the value of theblockrecord component.@Nullable BlockFaceReturns the value of theblockFacerecord component.@Nullable 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.instance()Returns the value of theinstancerecord component.booleanReturns the value of theisPlayerShiftingrecord component.@NotNull PointReturns the value of theplacePositionrecord component.@Nullable PosReturns the value of theplayerPositionrecord component.final StringtoString()Returns a string representation of this record class.@Nullable ItemMetaReturns the value of theusedItemMetarecord component.
-
Constructor Details
-
PlacementState
public PlacementState(@NotNull Block.Getter instance, @NotNull @NotNull Block block, @Nullable @Nullable BlockFace blockFace, @NotNull @NotNull Point placePosition, @Nullable @Nullable Point cursorPosition, @Nullable @Nullable Pos playerPosition, @Nullable @Nullable ItemMeta usedItemMeta, boolean isPlayerShifting) Creates an instance of aPlacementStaterecord class.- Parameters:
instance- the value for theinstancerecord componentblock- the value for theblockrecord componentblockFace- the value for theblockFacerecord componentplacePosition- the value for theplacePositionrecord componentcursorPosition- the value for thecursorPositionrecord componentplayerPosition- the value for theplayerPositionrecord componentusedItemMeta- the value for theusedItemMetarecord componentisPlayerShifting- the value for theisPlayerShiftingrecord 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 '=='. -
instance
Returns the value of theinstancerecord component.- Returns:
- the value of the
instancerecord component
-
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
-
placePosition
Returns the value of theplacePositionrecord component.- Returns:
- the value of the
placePositionrecord component
-
cursorPosition
Returns the value of thecursorPositionrecord component.- Returns:
- the value of the
cursorPositionrecord component
-
playerPosition
Returns the value of theplayerPositionrecord component.- Returns:
- the value of the
playerPositionrecord component
-
usedItemMeta
Returns the value of theusedItemMetarecord component.- Returns:
- the value of the
usedItemMetarecord component
-
isPlayerShifting
public boolean isPlayerShifting()Returns the value of theisPlayerShiftingrecord component.- Returns:
- the value of the
isPlayerShiftingrecord component
-