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 dat
named seconds
intermediary comp_3091
official c
named cooldownGroup
intermediary comp_3092
official d
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<UseCooldownComponent> private final Optional
<Identifier> The field for thecooldownGroup
record component.static final PacketCodec
<RegistryByteBuf, UseCooldownComponent> private final float
The field for theseconds
record component. -
Constructor Summary
ConstructorDescriptionUseCooldownComponent
(float seconds) UseCooldownComponent
(float float2, Optional<Identifier> optional) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecooldownGroup
record component.final boolean
Indicates whether some other object is "equal to" this one.int
final int
hashCode()
Returns a hash code value for this object.float
seconds()
Returns the value of theseconds
record component.void
set
(ItemStack stack, LivingEntity user) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
seconds
private final float secondsThe field for theseconds
record component. -
cooldownGroup
The field for thecooldownGroup
record 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
Ldat;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
Ldat;b:Lzt;
-
-
Constructor Details
-
UseCooldownComponent
public 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>
Ldat;<init>(F)V
-
UseCooldownComponent
-
-
Method Details
-
getCooldownTicks
public 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
Ldat;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
Ldat;a(Lcxo;Lbwf;)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 theseconds
record component.- Returns:
- the value of the
seconds
record component
-
cooldownGroup
Returns the value of thecooldownGroup
record component.- Returns:
- the value of the
cooldownGroup
record component
-