Record Class ChainConveyorRoutingTable.RoutingTableEntry
java.lang.Object
java.lang.Record
com.simibubi.create.content.kinetics.chainConveyor.ChainConveyorRoutingTable.RoutingTableEntry
- Enclosing class:
ChainConveyorRoutingTable
-
Constructor Summary
ConstructorsConstructorDescriptionRoutingTableEntry(String port, int distance, net.minecraft.core.BlockPos nextConnection, org.apache.commons.lang3.mutable.MutableInt timeout, boolean endOfRoute) Creates an instance of aRoutingTableEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncopyForNeighbour(net.minecraft.core.BlockPos connection) intdistance()Returns the value of thedistancerecord component.booleanReturns the value of theendOfRouterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleaninvalid()net.minecraft.core.BlockPosReturns the value of thenextConnectionrecord component.port()Returns the value of theportrecord component.voidtick()org.apache.commons.lang3.mutable.MutableInttimeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RoutingTableEntry
public RoutingTableEntry(String port, int distance, net.minecraft.core.BlockPos nextConnection, org.apache.commons.lang3.mutable.MutableInt timeout, boolean endOfRoute) Creates an instance of aRoutingTableEntryrecord class.- Parameters:
port- the value for theportrecord componentdistance- the value for thedistancerecord componentnextConnection- the value for thenextConnectionrecord componenttimeout- the value for thetimeoutrecord componentendOfRoute- the value for theendOfRouterecord component
-
-
Method Details
-
tick
public void tick() -
invalid
public boolean invalid() -
copyForNeighbour
public ChainConveyorRoutingTable.RoutingTableEntry copyForNeighbour(net.minecraft.core.BlockPos connection) -
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 '=='. -
port
Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
distance
public int distance()Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-
nextConnection
public net.minecraft.core.BlockPos nextConnection()Returns the value of thenextConnectionrecord component.- Returns:
- the value of the
nextConnectionrecord component
-
timeout
public org.apache.commons.lang3.mutable.MutableInt timeout()Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
endOfRoute
public boolean endOfRoute()Returns the value of theendOfRouterecord component.- Returns:
- the value of the
endOfRouterecord component
-