Record Class CollectingNeighborUpdater.ShapeUpdate
java.lang.Object
java.lang.Record
net.minecraft.world.level.redstone.CollectingNeighborUpdater.ShapeUpdate
- All Implemented Interfaces:
CollectingNeighborUpdater.NeighborUpdates
- Enclosing class:
CollectingNeighborUpdater
static record CollectingNeighborUpdater.ShapeUpdate(Direction direction, BlockState state, BlockPos pos, BlockPos neighborPos, int updateFlags, int updateLimit)
extends Record
implements CollectingNeighborUpdater.NeighborUpdates
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Direction
The field for thedirection
record component.private final BlockPos
The field for theneighborPos
record component.private final BlockPos
The field for thepos
record component.private final BlockState
The field for thestate
record component.private final int
The field for theupdateFlags
record component.private final int
The field for theupdateLimit
record component. -
Constructor Summary
ConstructorDescriptionShapeUpdate
(Direction direction, BlockState state, BlockPos pos, BlockPos neighborPos, int updateFlags, int updateLimit) Creates an instance of aShapeUpdate
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirection
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.Returns the value of theneighborPos
record component.pos()
Returns the value of thepos
record component.boolean
state()
Returns the value of thestate
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of theupdateFlags
record component.int
Returns the value of theupdateLimit
record component.
-
Field Details
-
direction
The field for thedirection
record component. -
state
The field for thestate
record component. -
pos
The field for thepos
record component. -
neighborPos
The field for theneighborPos
record component. -
updateFlags
private final int updateFlagsThe field for theupdateFlags
record component. -
updateLimit
private final int updateLimitThe field for theupdateLimit
record component.
-
-
Constructor Details
-
ShapeUpdate
ShapeUpdate(Direction direction, BlockState state, BlockPos pos, BlockPos neighborPos, int updateFlags, int updateLimit) Creates an instance of aShapeUpdate
record class.- Parameters:
direction
- the value for thedirection
record componentstate
- the value for thestate
record componentpos
- the value for thepos
record componentneighborPos
- the value for theneighborPos
record componentupdateFlags
- the value for theupdateFlags
record componentupdateLimit
- the value for theupdateLimit
record component
-
-
Method Details
-
runNext
- Specified by:
runNext
in interfaceCollectingNeighborUpdater.NeighborUpdates
-
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 '=='. -
direction
Returns the value of thedirection
record component.- Returns:
- the value of the
direction
record component
-
state
Returns the value of thestate
record component.- Returns:
- the value of the
state
record component
-
pos
Returns the value of thepos
record component.- Returns:
- the value of the
pos
record component
-
neighborPos
Returns the value of theneighborPos
record component.- Returns:
- the value of the
neighborPos
record component
-
updateFlags
public int updateFlags()Returns the value of theupdateFlags
record component.- Returns:
- the value of the
updateFlags
record component
-
updateLimit
public int updateLimit()Returns the value of theupdateLimit
record component.- Returns:
- the value of the
updateLimit
record component
-