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
ConstructorDescriptionUpdateState
(Block.Getter instance, @NotNull Point blockPosition, @NotNull Block currentBlock, @NotNull BlockFace fromFace) Creates an instance of aUpdateState
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Point
Returns the value of theblockPosition
record component.@NotNull Block
Returns the value of thecurrentBlock
record component.final boolean
Indicates whether some other object is "equal to" this one.@NotNull BlockFace
fromFace()
Returns the value of thefromFace
record component.final int
hashCode()
Returns a hash code value for this object.instance()
Returns the value of theinstance
record component.final String
toString()
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 aUpdateState
record class.- Parameters:
instance
- the value for theinstance
record componentblockPosition
- the value for theblockPosition
record componentcurrentBlock
- the value for thecurrentBlock
record componentfromFace
- the value for thefromFace
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)
. -
instance
Returns the value of theinstance
record component.- Returns:
- the value of the
instance
record component
-
blockPosition
Returns the value of theblockPosition
record component.- Returns:
- the value of the
blockPosition
record component
-
currentBlock
Returns the value of thecurrentBlock
record component.- Returns:
- the value of the
currentBlock
record component
-
fromFace
Returns the value of thefromFace
record component.- Returns:
- the value of the
fromFace
record component
-