Record Class ChainConveyorRoutingTable.RoutingTableEntry

java.lang.Object
java.lang.Record
com.simibubi.create.content.kinetics.chainConveyor.ChainConveyorRoutingTable.RoutingTableEntry
Enclosing class:
ChainConveyorRoutingTable

public static record ChainConveyorRoutingTable.RoutingTableEntry(String port, int distance, net.minecraft.core.BlockPos nextConnection, org.apache.commons.lang3.mutable.MutableInt timeout, boolean endOfRoute) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    RoutingTableEntry(String port, int distance, net.minecraft.core.BlockPos nextConnection, org.apache.commons.lang3.mutable.MutableInt timeout, boolean endOfRoute)
    Creates an instance of a RoutingTableEntry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    copyForNeighbour(net.minecraft.core.BlockPos connection)
     
    int
    Returns the value of the distance record component.
    boolean
    Returns the value of the endOfRoute record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
     
    net.minecraft.core.BlockPos
    Returns the value of the nextConnection record component.
    Returns the value of the port record component.
    void
     
    org.apache.commons.lang3.mutable.MutableInt
    Returns the value of the timeout record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a RoutingTableEntry record class.
      Parameters:
      port - the value for the port record component
      distance - the value for the distance record component
      nextConnection - the value for the nextConnection record component
      timeout - the value for the timeout record component
      endOfRoute - the value for the endOfRoute record component
  • Method Details

    • tick

      public void tick()
    • invalid

      public boolean invalid()
    • copyForNeighbour

      public ChainConveyorRoutingTable.RoutingTableEntry copyForNeighbour(net.minecraft.core.BlockPos connection)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • port

      public String port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • distance

      public int distance()
      Returns the value of the distance record component.
      Returns:
      the value of the distance record component
    • nextConnection

      public net.minecraft.core.BlockPos nextConnection()
      Returns the value of the nextConnection record component.
      Returns:
      the value of the nextConnection record component
    • timeout

      public org.apache.commons.lang3.mutable.MutableInt timeout()
      Returns the value of the timeout record component.
      Returns:
      the value of the timeout record component
    • endOfRoute

      public boolean endOfRoute()
      Returns the value of the endOfRoute record component.
      Returns:
      the value of the endOfRoute record component