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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSimpleNeighborUpdate(BlockPos pos, Block block, BlockPos neighborPos) Creates an instance of aSimpleNeighborUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord 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.pos()Returns the value of theposrecord component.booleanfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
pos
The field for theposrecord component. -
block
The field for theblockrecord component. -
neighborPos
The field for theneighborPosrecord component.
-
-
Constructor Details
-
SimpleNeighborUpdate
Creates an instance of aSimpleNeighborUpdaterecord class.- Parameters:
pos- the value for theposrecord componentblock- the value for theblockrecord componentneighborPos- the value for theneighborPosrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
neighborPos
Returns the value of theneighborPosrecord component.- Returns:
- the value of the
neighborPosrecord component
-