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 neighborState, BlockPos pos, BlockPos neighborPos, int updateFlags, int updateLimit)
extends Record
implements CollectingNeighborUpdater.NeighborUpdates
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DirectionThe field for thedirectionrecord component.private final BlockPosThe field for theneighborPosrecord component.private final BlockStateThe field for theneighborStaterecord component.private final BlockPosThe field for theposrecord component.private final intThe field for theupdateFlagsrecord component.private final intThe field for theupdateLimitrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionShapeUpdate(Direction direction, BlockState neighborState, BlockPos pos, BlockPos neighborPos, int updateFlags, int updateLimit) Creates an instance of aShapeUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theneighborPosrecord component.Returns the value of theneighborStaterecord component.pos()Returns the value of theposrecord component.booleanfinal StringtoString()Returns a string representation of this record class.intReturns the value of theupdateFlagsrecord component.intReturns the value of theupdateLimitrecord component.
-
Field Details
-
direction
The field for thedirectionrecord component. -
neighborState
The field for theneighborStaterecord component. -
pos
The field for theposrecord component. -
neighborPos
The field for theneighborPosrecord component. -
updateFlags
private final int updateFlagsThe field for theupdateFlagsrecord component. -
updateLimit
private final int updateLimitThe field for theupdateLimitrecord component.
-
-
Constructor Details
-
ShapeUpdate
ShapeUpdate(Direction direction, BlockState neighborState, BlockPos pos, BlockPos neighborPos, int updateFlags, int updateLimit) Creates an instance of aShapeUpdaterecord class.- Parameters:
direction- the value for thedirectionrecord componentneighborState- the value for theneighborStaterecord componentpos- the value for theposrecord componentneighborPos- the value for theneighborPosrecord componentupdateFlags- the value for theupdateFlagsrecord componentupdateLimit- the value for theupdateLimitrecord component
-
-
Method Details
-
runNext
- Specified by:
runNextin 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 thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
neighborState
Returns the value of theneighborStaterecord component.- Returns:
- the value of the
neighborStaterecord component
-
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
neighborPos
Returns the value of theneighborPosrecord component.- Returns:
- the value of the
neighborPosrecord component
-
updateFlags
public int updateFlags()Returns the value of theupdateFlagsrecord component.- Returns:
- the value of the
updateFlagsrecord component
-
updateLimit
public int updateLimit()Returns the value of theupdateLimitrecord component.- Returns:
- the value of the
updateLimitrecord component
-