Record Class CollectingNeighborUpdater.FullNeighborUpdate
java.lang.Object
java.lang.Record
net.minecraft.world.level.redstone.CollectingNeighborUpdater.FullNeighborUpdate
- All Implemented Interfaces:
CollectingNeighborUpdater.NeighborUpdates
- Enclosing class:
- CollectingNeighborUpdater
static record CollectingNeighborUpdater.FullNeighborUpdate(BlockState state, BlockPos pos, Block block, BlockPos neighborPos, boolean movedByPiston)
extends Record
implements CollectingNeighborUpdater.NeighborUpdates
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Block
The field for theblock
record component.private final boolean
The field for themovedByPiston
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. -
Constructor Summary
ConstructorDescriptionFullNeighborUpdate
(BlockState state, BlockPos pos, Block block, BlockPos neighborPos, boolean movedByPiston) Creates an instance of aFullNeighborUpdate
record class. -
Method Summary
Modifier and TypeMethodDescriptionblock()
Returns the value of theblock
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.boolean
Returns the value of themovedByPiston
record component.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.
-
Field Details
-
state
The field for thestate
record component. -
pos
The field for thepos
record component. -
block
The field for theblock
record component. -
neighborPos
The field for theneighborPos
record component. -
movedByPiston
private final boolean movedByPistonThe field for themovedByPiston
record component.
-
-
Constructor Details
-
FullNeighborUpdate
FullNeighborUpdate(BlockState state, BlockPos pos, Block block, BlockPos neighborPos, boolean movedByPiston) Creates an instance of aFullNeighborUpdate
record class.- Parameters:
state
- the value for thestate
record componentpos
- the value for thepos
record componentblock
- the value for theblock
record componentneighborPos
- the value for theneighborPos
record componentmovedByPiston
- the value for themovedByPiston
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 '=='. -
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
-
block
Returns the value of theblock
record component.- Returns:
- the value of the
block
record component
-
neighborPos
Returns the value of theneighborPos
record component.- Returns:
- the value of the
neighborPos
record component
-
movedByPiston
public boolean movedByPiston()Returns the value of themovedByPiston
record component.- Returns:
- the value of the
movedByPiston
record component
-