Package net.minecraft.component.type
Record Class UseCooldownComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.UseCooldownComponent
- Record Components:
- seconds-
- cooldownGroup-
public record UseCooldownComponent(float seconds, Optional<Identifier> cooldownGroup)
extends Record
- Mappings:
- Namespace - Name - named - net/minecraft/component/type/UseCooldownComponent- intermediary - net/minecraft/class_10130- official - czv- named - seconds- intermediary - comp_3091- official - c- named - cooldownGroup- intermediary - comp_3092- official - d
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<UseCooldownComponent> private final Optional<Identifier> The field for thecooldownGrouprecord component.static final PacketCodec<RegistryByteBuf, UseCooldownComponent> private final floatThe field for thesecondsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionUseCooldownComponent(float seconds) UseCooldownComponent(float float2, Optional<Identifier> optional) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thecooldownGrouprecord component.final booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.floatseconds()Returns the value of thesecondsrecord component.voidset(ItemStack stack, LivingEntity user) final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
secondsprivate final float secondsThe field for thesecondsrecord component.
- 
cooldownGroupThe field for thecooldownGrouprecord component.
- 
CODEC- Mappings:
- Namespace - Name - Mixin selector - named - CODEC- Lnet/minecraft/component/type/UseCooldownComponent;CODEC:Lcom/mojang/serialization/Codec;- intermediary - field_53799- Lnet/minecraft/class_10130;field_53799:Lcom/mojang/serialization/Codec;- official - a- Lczv;a:Lcom/mojang/serialization/Codec;
 
- 
PACKET_CODEC- Mappings:
- Namespace - Name - Mixin selector - named - PACKET_CODEC- Lnet/minecraft/component/type/UseCooldownComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_53800- Lnet/minecraft/class_10130;field_53800:Lnet/minecraft/class_9139;- official - b- Lczv;b:Lyn;
 
 
- 
- 
Constructor Details- 
UseCooldownComponentpublic UseCooldownComponent(float seconds) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/component/type/UseCooldownComponent;<init>(F)V- intermediary - <init>- Lnet/minecraft/class_10130;<init>(F)V- official - <init>- Lczv;<init>(F)V
 
- 
UseCooldownComponent
 
- 
- 
Method Details- 
getCooldownTickspublic int getCooldownTicks()- Mappings:
- Namespace - Name - Mixin selector - named - getCooldownTicks- Lnet/minecraft/component/type/UseCooldownComponent;getCooldownTicks()I- intermediary - method_62860- Lnet/minecraft/class_10130;method_62860()I- official - a- Lczv;a()I
 
- 
set- Mappings:
- Namespace - Name - Mixin selector - named - set- Lnet/minecraft/component/type/UseCooldownComponent;set(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;)V- intermediary - method_62862- Lnet/minecraft/class_10130;method_62862(Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;)V- official - a- Lczv;a(Lcwq;Lbvi;)V
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
secondspublic float seconds()Returns the value of thesecondsrecord component.- Returns:
- the value of the secondsrecord component
 
- 
cooldownGroupReturns the value of thecooldownGrouprecord component.- Returns:
- the value of the cooldownGrouprecord component
 
 
-