Record Class UserDefinedDelays

java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.effect.chardelays.types.UserDefinedDelays
All Implemented Interfaces:
DelayProvider

public record UserDefinedDelays(int activation, Map<Integer,Double> delaysSpecial, double fallbackSpecial, Map<Integer,Double> delaysDefault, double fallbackNormal) extends Record implements DelayProvider
  • Constructor Details

    • UserDefinedDelays

      public UserDefinedDelays(int activation, Map<Integer,Double> delaysSpecial, double fallbackSpecial, Map<Integer,Double> delaysDefault, double fallbackNormal)
      Creates an instance of a UserDefinedDelays record class.
      Parameters:
      activation - the value for the activation record component
      delaysSpecial - the value for the delaysSpecial record component
      fallbackSpecial - the value for the fallbackSpecial record component
      delaysDefault - the value for the delaysDefault record component
      fallbackNormal - the value for the fallbackNormal record component
  • Method Details

    • activationCodepoint

      public int activationCodepoint()
      Description copied from interface: DelayProvider
      Returns the symbol that is needed for this provider to be used.
      Specified by:
      activationCodepoint in interface DelayProvider
    • delay

      public double delay(int input)
      Description copied from interface: DelayProvider
      Returns the delay in ticks for the given character. It will be applied right afterward.
      Specified by:
      delay in interface DelayProvider
    • toNetwork

      public void toNetwork(net.minecraft.network.FriendlyByteBuf buf)
      Description copied from interface: DelayProvider
      Serializes this provider for network.
      Specified by:
      toNetwork in interface DelayProvider
    • defaultDelay

      public double defaultDelay(int codepoint)
      Description copied from interface: DelayProvider
      Returns the default character delay, in ticks
      Specified by:
      defaultDelay in interface DelayProvider
    • getSerializer

      public DelayProviderSerializer<?> getSerializer()
      Specified by:
      getSerializer in interface DelayProvider
    • 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.
    • activation

      public int activation()
      Returns the value of the activation record component.
      Returns:
      the value of the activation record component
    • delaysSpecial

      public Map<Integer,Double> delaysSpecial()
      Returns the value of the delaysSpecial record component.
      Returns:
      the value of the delaysSpecial record component
    • fallbackSpecial

      public double fallbackSpecial()
      Returns the value of the fallbackSpecial record component.
      Returns:
      the value of the fallbackSpecial record component
    • delaysDefault

      public Map<Integer,Double> delaysDefault()
      Returns the value of the delaysDefault record component.
      Returns:
      the value of the delaysDefault record component
    • fallbackNormal

      public double fallbackNormal()
      Returns the value of the fallbackNormal record component.
      Returns:
      the value of the fallbackNormal record component