Package net.minecraft.world.level.block
Record Class SideChainPartBlock.Neighbors
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.SideChainPartBlock.Neighbors
- Enclosing interface:
SideChainPartBlock
public static record SideChainPartBlock.Neighbors(SideChainPartBlock block, LevelAccessor level, Direction facing, BlockPos center, Map<BlockPos,SideChainPartBlock.Neighbor> cache)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SideChainPartBlockThe field for theblockrecord component.private final Map<BlockPos, SideChainPartBlock.Neighbor> The field for thecacherecord component.private final BlockPosThe field for thecenterrecord component.private final DirectionThe field for thefacingrecord component.private final LevelAccessorThe field for thelevelrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionNeighbors(SideChainPartBlock block, LevelAccessor level, Direction facing, BlockPos center, Map<BlockPos, SideChainPartBlock.Neighbor> cache) Creates an instance of aNeighborsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.cache()Returns the value of thecacherecord component.center()Returns the value of thecenterrecord component.private SideChainPartBlock.NeighborcreateNewNeighbor(BlockPos pPos) final booleanIndicates whether some other object is "equal to" this one.facing()Returns the value of thefacingrecord component.private SideChainPartBlock.NeighborgetOrCreateNeighbor(Direction pDirection, Integer pDistance) final inthashCode()Returns a hash code value for this object.private booleanisConnectableToThisBlock(BlockState pState) left()left(int pDistance) level()Returns the value of thelevelrecord component.right()right(int pDistance) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
block
The field for theblockrecord component. -
level
The field for thelevelrecord component. -
facing
The field for thefacingrecord component. -
center
The field for thecenterrecord component. -
cache
The field for thecacherecord component.
-
-
Constructor Details
-
Neighbors
public Neighbors(SideChainPartBlock block, LevelAccessor level, Direction facing, BlockPos center, Map<BlockPos, SideChainPartBlock.Neighbor> cache) Creates an instance of aNeighborsrecord class.- Parameters:
block- the value for theblockrecord componentlevel- the value for thelevelrecord componentfacing- the value for thefacingrecord componentcenter- the value for thecenterrecord componentcache- the value for thecacherecord component
-
-
Method Details
-
isConnectableToThisBlock
-
createNewNeighbor
-
getOrCreateNeighbor
-
left
-
right
-
left
-
right
-
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). -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
facing
Returns the value of thefacingrecord component.- Returns:
- the value of the
facingrecord component
-
center
Returns the value of thecenterrecord component.- Returns:
- the value of the
centerrecord component
-
cache
Returns the value of thecacherecord component.- Returns:
- the value of the
cacherecord component
-