Record Class UserDefinedDelays
java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.effect.chardelays.types.UserDefinedDelays
- All Implemented Interfaces:
DelayProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theactivationrecord component.intReturns the symbol that is needed for this provider to be used.doubledefaultDelay(int codepoint) Returns the default character delay, in ticksdoubledelay(int input) Returns the delay in ticks for the given character.Returns the value of thedelaysDefaultrecord component.Returns the value of thedelaysSpecialrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thefallbackNormalrecord component.doubleReturns the value of thefallbackSpecialrecord component.final inthashCode()Returns a hash code value for this object.voidtoNetwork(net.minecraft.network.FriendlyByteBuf buf) Serializes this provider for network.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserDefinedDelays
public UserDefinedDelays(int activation, Map<Integer, Double> delaysSpecial, double fallbackSpecial, Map<Integer, Double> delaysDefault, double fallbackNormal) Creates an instance of aUserDefinedDelaysrecord class.- Parameters:
activation- the value for theactivationrecord componentdelaysSpecial- the value for thedelaysSpecialrecord componentfallbackSpecial- the value for thefallbackSpecialrecord componentdelaysDefault- the value for thedelaysDefaultrecord componentfallbackNormal- the value for thefallbackNormalrecord component
-
-
Method Details
-
activationCodepoint
public int activationCodepoint()Description copied from interface:DelayProviderReturns the symbol that is needed for this provider to be used.- Specified by:
activationCodepointin interfaceDelayProvider
-
delay
public double delay(int input) Description copied from interface:DelayProviderReturns the delay in ticks for the given character. It will be applied right afterward.- Specified by:
delayin interfaceDelayProvider
-
toNetwork
public void toNetwork(net.minecraft.network.FriendlyByteBuf buf) Description copied from interface:DelayProviderSerializes this provider for network.- Specified by:
toNetworkin interfaceDelayProvider
-
defaultDelay
public double defaultDelay(int codepoint) Description copied from interface:DelayProviderReturns the default character delay, in ticks- Specified by:
defaultDelayin interfaceDelayProvider
-
getSerializer
- Specified by:
getSerializerin interfaceDelayProvider
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
activation
public int activation()Returns the value of theactivationrecord component.- Returns:
- the value of the
activationrecord component
-
delaysSpecial
Returns the value of thedelaysSpecialrecord component.- Returns:
- the value of the
delaysSpecialrecord component
-
fallbackSpecial
public double fallbackSpecial()Returns the value of thefallbackSpecialrecord component.- Returns:
- the value of the
fallbackSpecialrecord component
-
delaysDefault
Returns the value of thedelaysDefaultrecord component.- Returns:
- the value of the
delaysDefaultrecord component
-
fallbackNormal
public double fallbackNormal()Returns the value of thefallbackNormalrecord component.- Returns:
- the value of the
fallbackNormalrecord component
-