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
FieldsModifier and TypeFieldDescriptionprivate final BlockThe field for theblockrecord component.private final booleanThe field for themovedByPistonrecord component.private final BlockPosThe field for theneighborPosrecord component.private final BlockPosThe field for theposrecord component.private final BlockStateThe field for thestaterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFullNeighborUpdate(BlockState state, BlockPos pos, Block block, BlockPos neighborPos, boolean movedByPiston) Creates an instance of aFullNeighborUpdaterecord 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.booleanReturns the value of themovedByPistonrecord component.Returns the value of theneighborPosrecord component.pos()Returns the value of theposrecord component.booleanstate()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
state
The field for thestaterecord component. -
pos
The field for theposrecord component. -
block
The field for theblockrecord component. -
neighborPos
The field for theneighborPosrecord component. -
movedByPiston
private final boolean movedByPistonThe field for themovedByPistonrecord component.
-
-
Constructor Details
-
FullNeighborUpdate
FullNeighborUpdate(BlockState state, BlockPos pos, Block block, BlockPos neighborPos, boolean movedByPiston) Creates an instance of aFullNeighborUpdaterecord class.- Parameters:
state- the value for thestaterecord componentpos- the value for theposrecord componentblock- the value for theblockrecord componentneighborPos- the value for theneighborPosrecord componentmovedByPiston- the value for themovedByPistonrecord 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 '=='. -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
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
-
movedByPiston
public boolean movedByPiston()Returns the value of themovedByPistonrecord component.- Returns:
- the value of the
movedByPistonrecord component
-