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, Block block, @Nullable BlockFace blockFace, Point placePosition, @Nullable Point cursorPosition, @Nullable Pos playerPosition, @Nullable ItemStack usedItemStack, boolean isPlayerShifting) Creates an instance of aPlacementStaterecord 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.instance()Returns the value of theinstancerecord component.booleanReturns the value of theisPlayerShiftingrecord component.Returns the value of theplacePositionrecord component.Returns the value of theplayerPositionrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theusedItemStackrecord component.
-
Constructor Details
-
PlacementState
public PlacementState(Block.Getter instance, Block block, @Nullable @Nullable BlockFace blockFace, Point placePosition, @Nullable @Nullable Point cursorPosition, @Nullable @Nullable Pos playerPosition, @Nullable @Nullable ItemStack usedItemStack, 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 componentusedItemStack- the value for theusedItemStackrecord componentisPlayerShifting- the value for theisPlayerShiftingrecord 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. -
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
-
placePosition
Returns the value of theplacePositionrecord component.- Returns:
- the value of the
placePositionrecord component
-
cursorPosition
-
playerPosition
-
usedItemStack
-
isPlayerShifting
public boolean isPlayerShifting()Returns the value of theisPlayerShiftingrecord component.- Returns:
- the value of the
isPlayerShiftingrecord component
-