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/UseCooldownComponentintermediary net/minecraft/class_10130official ddqnamed secondsintermediary comp_3091official cnamed cooldownGroupintermediary comp_3092official d
-
Field Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionUseCooldownComponent(float seconds) UseCooldownComponent(float float2, Optional<Identifier> optional) -
Method Summary
Modifier 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
-
seconds
private final float secondsThe field for thesecondsrecord component. -
cooldownGroup
The field for thecooldownGrouprecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/UseCooldownComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_53799Lnet/minecraft/class_10130;field_53799:Lcom/mojang/serialization/Codec;official aLddq;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/UseCooldownComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_53800Lnet/minecraft/class_10130;field_53800:Lnet/minecraft/class_9139;official bLddq;b:Lze;
-
-
Constructor Details
-
UseCooldownComponent
public UseCooldownComponent(float seconds) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/component/type/UseCooldownComponent;<init>(F)Vintermediary <init>Lnet/minecraft/class_10130;<init>(F)Vofficial <init>Lddq;<init>(F)V
-
UseCooldownComponent
-
-
Method Details
-
getCooldownTicks
public int getCooldownTicks()- Mappings:
Namespace Name Mixin selector named getCooldownTicksLnet/minecraft/component/type/UseCooldownComponent;getCooldownTicks()Iintermediary method_62860Lnet/minecraft/class_10130;method_62860()Iofficial aLddq;a()I
-
set
- Mappings:
Namespace Name Mixin selector named setLnet/minecraft/component/type/UseCooldownComponent;set(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;)Vintermediary method_62862Lnet/minecraft/class_10130;method_62862(Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;)Vofficial aLddq;a(Ldak;Lbyf;)V
-
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 '=='. -
seconds
public float seconds()Returns the value of thesecondsrecord component.- Returns:
- the value of the
secondsrecord component
-
cooldownGroup
Returns the value of thecooldownGrouprecord component.- Returns:
- the value of the
cooldownGrouprecord component
-