Record Class CollectingNeighborUpdater.SimpleNeighborUpdate
java.lang.Object
java.lang.Record
net.minecraft.world.level.redstone.CollectingNeighborUpdater.SimpleNeighborUpdate
- All Implemented Interfaces:
CollectingNeighborUpdater.NeighborUpdates
- Enclosing class:
- CollectingNeighborUpdater
static record CollectingNeighborUpdater.SimpleNeighborUpdate(BlockPos pos, Block block, BlockPos neighborPos)
extends Record
implements CollectingNeighborUpdater.NeighborUpdates
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSimpleNeighborUpdate
(BlockPos pos, Block block, BlockPos neighborPos) Creates an instance of aSimpleNeighborUpdate
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.Returns the value of theneighborPos
record component.pos()
Returns the value of thepos
record component.boolean
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
pos
The field for thepos
record component. -
block
The field for theblock
record component. -
neighborPos
The field for theneighborPos
record component.
-
-
Constructor Details
-
SimpleNeighborUpdate
Creates an instance of aSimpleNeighborUpdate
record class.- Parameters:
pos
- the value for thepos
record componentblock
- the value for theblock
record componentneighborPos
- the value for theneighborPos
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
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
-