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 SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionFullNeighborUpdate(BlockState state, BlockPos pos, Block block, BlockPos neighborPos, boolean movedByPiston) Creates an instance of aFullNeighborUpdaterecord class.
- 
Method SummaryModifier 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- 
stateThe field for thestaterecord component.
- 
posThe field for theposrecord component.
- 
blockThe field for theblockrecord component.
- 
neighborPosThe field for theneighborPosrecord component.
- 
movedByPistonprivate final boolean movedByPistonThe field for themovedByPistonrecord component.
 
- 
- 
Constructor Details- 
FullNeighborUpdateFullNeighborUpdate(BlockState state, BlockPos pos, Block block, BlockPos neighborPos, boolean movedByPiston) Creates an instance of aFullNeighborUpdaterecord class.- Parameters:
- state- the value for the- staterecord component
- pos- the value for the- posrecord component
- block- the value for the- blockrecord component
- neighborPos- the value for the- neighborPosrecord component
- movedByPiston- the value for the- movedByPistonrecord component
 
 
- 
- 
Method Details- 
runNext- Specified by:
- runNextin interface- CollectingNeighborUpdater.NeighborUpdates
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
stateReturns the value of thestaterecord component.- Returns:
- the value of the staterecord component
 
- 
posReturns the value of theposrecord component.- Returns:
- the value of the posrecord component
 
- 
blockReturns the value of theblockrecord component.- Returns:
- the value of the blockrecord component
 
- 
neighborPosReturns the value of theneighborPosrecord component.- Returns:
- the value of the neighborPosrecord component
 
- 
movedByPistonpublic boolean movedByPiston()Returns the value of themovedByPistonrecord component.- Returns:
- the value of the movedByPistonrecord component
 
 
-