Record Class TTPipeConnection<VALVE extends IValve<VALVE>>

java.lang.Object
java.lang.Record
com.petrolpark.core.world.block.ttPipe.TTPipeConnection<VALVE>
Record Components:
relativePos - The relative position of the pipe to connect to
face - The face of the Block of the pipe to connect to

public record TTPipeConnection<VALVE extends IValve<VALVE>>(net.minecraft.core.Vec3i relativePos, net.minecraft.core.Direction face, @Nullable VALVE extends IValve<VALVE> valve) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    TTPipeConnection(net.minecraft.core.Vec3i relativePos, net.minecraft.core.Direction face, VALVE valve)
    Creates an instance of a TTPipeConnection record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.core.Direction
    Returns the value of the face record component.
    final int
    Returns a hash code value for this object.
    net.minecraft.core.Vec3i
    Returns the value of the relativePos record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the valve record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TTPipeConnection

      public TTPipeConnection(net.minecraft.core.Vec3i relativePos, net.minecraft.core.Direction face, @Nullable VALVE valve)
      Creates an instance of a TTPipeConnection record class.
      Parameters:
      relativePos - the value for the relativePos record component
      face - the value for the face record component
      valve - the value for the valve record component
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • relativePos

      public net.minecraft.core.Vec3i relativePos()
      Returns the value of the relativePos record component.
      Returns:
      the value of the relativePos record component
    • face

      public net.minecraft.core.Direction face()
      Returns the value of the face record component.
      Returns:
      the value of the face record component
    • valve

      @Nullable public VALVE valve()
      Returns the value of the valve record component.
      Returns:
      the value of the valve record component