Record Class PartConfigSnapshot.PartSettings

java.lang.Object
java.lang.Record
org.cyclops.integrateddynamics.core.part.PartConfigSnapshot.PartSettings
Record Components:
updateInterval - The tick interval at which the part updates.
priority - The priority of the part in its network.
channel - The channel of the part in its network.
targetSide - The overridden side of the target block, if any.
targetOffset - The target position offset.
maxOffset - The maximum offset that offset enhancements raised the part to.
Enclosing class:
PartConfigSnapshot

public static record PartConfigSnapshot.PartSettings(Optional<Integer> updateInterval, Optional<Integer> priority, Optional<Integer> channel, Optional<net.minecraft.core.Direction> targetSide, Optional<net.minecraft.core.Vec3i> targetOffset, Optional<Integer> maxOffset) extends Record
The general settings of a part.
  • Constructor Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
      Returns:
      If no setting at all is stored.
    • 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.
    • updateInterval

      public Optional<Integer> updateInterval()
      Returns the value of the updateInterval record component.
      Returns:
      the value of the updateInterval record component
    • priority

      public Optional<Integer> priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • channel

      public Optional<Integer> channel()
      Returns the value of the channel record component.
      Returns:
      the value of the channel record component
    • targetSide

      public Optional<net.minecraft.core.Direction> targetSide()
      Returns the value of the targetSide record component.
      Returns:
      the value of the targetSide record component
    • targetOffset

      public Optional<net.minecraft.core.Vec3i> targetOffset()
      Returns the value of the targetOffset record component.
      Returns:
      the value of the targetOffset record component
    • maxOffset

      public Optional<Integer> maxOffset()
      Returns the value of the maxOffset record component.
      Returns:
      the value of the maxOffset record component