Record Class BlockPlacementRule.UpdateState
java.lang.Object
java.lang.Record
net.minestom.server.instance.block.rule.BlockPlacementRule.UpdateState
- Enclosing class:
BlockPlacementRule
public static record BlockPlacementRule.UpdateState(Block.Getter instance, @NotNull Point blockPosition, @NotNull Block currentBlock, @NotNull BlockFace fromFace)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateState(Block.Getter instance, @NotNull Point blockPosition, @NotNull Block currentBlock, @NotNull BlockFace fromFace) Creates an instance of aUpdateStaterecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull PointReturns the value of theblockPositionrecord component.@NotNull BlockReturns the value of thecurrentBlockrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull BlockFacefromFace()Returns the value of thefromFacerecord component.final inthashCode()Returns a hash code value for this object.instance()Returns the value of theinstancerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UpdateState
public UpdateState(@NotNull Block.Getter instance, @NotNull @NotNull Point blockPosition, @NotNull @NotNull Block currentBlock, @NotNull @NotNull BlockFace fromFace) Creates an instance of aUpdateStaterecord class.- Parameters:
instance- the value for theinstancerecord componentblockPosition- the value for theblockPositionrecord componentcurrentBlock- the value for thecurrentBlockrecord componentfromFace- the value for thefromFacerecord 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). -
instance
Returns the value of theinstancerecord component.- Returns:
- the value of the
instancerecord component
-
blockPosition
Returns the value of theblockPositionrecord component.- Returns:
- the value of the
blockPositionrecord component
-
currentBlock
Returns the value of thecurrentBlockrecord component.- Returns:
- the value of the
currentBlockrecord component
-
fromFace
Returns the value of thefromFacerecord component.- Returns:
- the value of the
fromFacerecord component
-