Record Class PersistentCooldowns.Record
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.tag.PersistentCooldowns.Record
- Enclosing class:
PersistentCooldowns
public static record PersistentCooldowns.Record(net.minecraft.resources.Identifier id, int remainingCooldown)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PersistentCooldowns.Record> -
Constructor Summary
ConstructorsConstructorDescriptionRecord(net.minecraft.resources.Identifier id, int remainingCooldown) Creates an instance of aRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifierid()Returns the value of theidrecord component.intReturns the value of theremainingCooldownrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
Record
public Record(net.minecraft.resources.Identifier id, int remainingCooldown) Creates an instance of aRecordrecord class.- Parameters:
id- the value for theidrecord componentremainingCooldown- the value for theremainingCooldownrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
public net.minecraft.resources.Identifier id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
remainingCooldown
public int remainingCooldown()Returns the value of theremainingCooldownrecord component.- Returns:
- the value of the
remainingCooldownrecord component
-