Record Class ClientboundCustomSetTimePayload

java.lang.Object
java.lang.Record
net.neoforged.neoforge.network.payload.ClientboundCustomSetTimePayload
All Implemented Interfaces:
CustomPacketPayload

@Internal public record ClientboundCustomSetTimePayload(long gameTime, long dayTime, boolean gameRule, float dayTimeFraction, float dayTimePerTick) extends Record implements CustomPacketPayload
  • Field Details

    • gameTime

      private final long gameTime
      The field for the gameTime record component.
    • dayTime

      private final long dayTime
      The field for the dayTime record component.
    • gameRule

      private final boolean gameRule
      The field for the gameRule record component.
    • dayTimeFraction

      private final float dayTimeFraction
      The field for the dayTimeFraction record component.
    • dayTimePerTick

      private final float dayTimePerTick
      The field for the dayTimePerTick record component.
    • TYPE

    • STREAM_CODEC

  • Constructor Details

    • ClientboundCustomSetTimePayload

      public ClientboundCustomSetTimePayload(long gameTime, long dayTime, boolean gameRule, float dayTimeFraction, float dayTimePerTick)
      Creates an instance of a ClientboundCustomSetTimePayload record class.
      Parameters:
      gameTime - the value for the gameTime record component
      dayTime - the value for the dayTime record component
      gameRule - the value for the gameRule record component
      dayTimeFraction - the value for the dayTimeFraction record component
      dayTimePerTick - the value for the dayTimePerTick record component
  • Method Details

    • type

      Specified by:
      type in interface CustomPacketPayload
    • 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 '=='.
      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.
    • gameTime

      public long gameTime()
      Returns the value of the gameTime record component.
      Returns:
      the value of the gameTime record component
    • dayTime

      public long dayTime()
      Returns the value of the dayTime record component.
      Returns:
      the value of the dayTime record component
    • gameRule

      public boolean gameRule()
      Returns the value of the gameRule record component.
      Returns:
      the value of the gameRule record component
    • dayTimeFraction

      public float dayTimeFraction()
      Returns the value of the dayTimeFraction record component.
      Returns:
      the value of the dayTimeFraction record component
    • dayTimePerTick

      public float dayTimePerTick()
      Returns the value of the dayTimePerTick record component.
      Returns:
      the value of the dayTimePerTick record component