Package net.minecraft.world.level.block
Record Class SideChainPartBlock.SideChainNeighbor
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.SideChainPartBlock.SideChainNeighbor
- All Implemented Interfaces:
SideChainPartBlock.Neighbor
- Enclosing interface:
SideChainPartBlock
public static record SideChainPartBlock.SideChainNeighbor(LevelAccessor level, SideChainPartBlock block, BlockPos pos, SideChainPart part)
extends Record
implements SideChainPartBlock.Neighbor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SideChainPartBlockThe field for theblockrecord component.private final LevelAccessorThe field for thelevelrecord component.private final SideChainPartThe field for thepartrecord component.private final BlockPosThe field for theposrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSideChainNeighbor(LevelAccessor level, SideChainPartBlock block, BlockPos pos, SideChainPart part) Creates an instance of aSideChainNeighborrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.booleanconnectsTowards(SideChainPart p_434316_) voidvoidvoidvoidfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanlevel()Returns the value of thelevelrecord component.part()Returns the value of thepartrecord component.pos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
level
The field for thelevelrecord component. -
block
The field for theblockrecord component. -
pos
The field for theposrecord component. -
part
The field for thepartrecord component.
-
-
Constructor Details
-
SideChainNeighbor
public SideChainNeighbor(LevelAccessor level, SideChainPartBlock block, BlockPos pos, SideChainPart part) Creates an instance of aSideChainNeighborrecord class.- Parameters:
level- the value for thelevelrecord componentblock- the value for theblockrecord componentpos- the value for theposrecord componentpart- the value for thepartrecord component
-
-
Method Details
-
isConnectable
public boolean isConnectable()- Specified by:
isConnectablein interfaceSideChainPartBlock.Neighbor
-
isUnconnectableOrChainEnd
public boolean isUnconnectableOrChainEnd()- Specified by:
isUnconnectableOrChainEndin interfaceSideChainPartBlock.Neighbor
-
connectsTowards
- Specified by:
connectsTowardsin interfaceSideChainPartBlock.Neighbor
-
connectToTheRight
public void connectToTheRight()- Specified by:
connectToTheRightin interfaceSideChainPartBlock.Neighbor
-
connectToTheLeft
public void connectToTheLeft()- Specified by:
connectToTheLeftin interfaceSideChainPartBlock.Neighbor
-
disconnectFromRight
public void disconnectFromRight()- Specified by:
disconnectFromRightin interfaceSideChainPartBlock.Neighbor
-
disconnectFromLeft
public void disconnectFromLeft()- Specified by:
disconnectFromLeftin interfaceSideChainPartBlock.Neighbor
-
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). -
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
pos
Returns the value of theposrecord component.- Specified by:
posin interfaceSideChainPartBlock.Neighbor- Returns:
- the value of the
posrecord component
-
part
Returns the value of thepartrecord component.- Returns:
- the value of the
partrecord component
-