Package net.minecraft.component.type
Record Class UseEffectsComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.UseEffectsComponent
- Record Components:
canSprint-speedMultiplier-
- Mappings:
Namespace Name named net/minecraft/component/type/UseEffectsComponentintermediary net/minecraft/class_12127official dnsnamed canSprintintermediary comp_4977official dnamed speedMultiplierintermediary comp_4978official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thecanSprintrecord component.static final com.mojang.serialization.Codec<UseEffectsComponent> static final UseEffectsComponentstatic final PacketCodec<ByteBuf, UseEffectsComponent> private final floatThe field for thespeedMultiplierrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUseEffectsComponent(boolean canSprint, float speedMultiplier) Creates an instance of aUseEffectsComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecanSprintrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thespeedMultiplierrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
canSprint
private final boolean canSprintThe field for thecanSprintrecord component. -
speedMultiplier
private final float speedMultiplierThe field for thespeedMultiplierrecord component. -
DEFAULT
- Mappings:
Namespace Name Mixin selector named DEFAULTLnet/minecraft/component/type/UseEffectsComponent;DEFAULT:Lnet/minecraft/component/type/UseEffectsComponent;intermediary field_63416Lnet/minecraft/class_12127;field_63416:Lnet/minecraft/class_12127;official aLdns;a:Ldns;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/UseEffectsComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_63417Lnet/minecraft/class_12127;field_63417:Lcom/mojang/serialization/Codec;official bLdns;b:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/UseEffectsComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_63418Lnet/minecraft/class_12127;field_63418:Lnet/minecraft/class_9139;official cLdns;c:Laat;
-
-
Constructor Details
-
UseEffectsComponent
public UseEffectsComponent(boolean canSprint, float speedMultiplier) Creates an instance of aUseEffectsComponentrecord class.- Parameters:
canSprint- the value for thecanSprintrecord componentspeedMultiplier- the value for thespeedMultiplierrecord component
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
canSprint
public boolean canSprint()Returns the value of thecanSprintrecord component.- Returns:
- the value of the
canSprintrecord component
-
speedMultiplier
public float speedMultiplier()Returns the value of thespeedMultiplierrecord component.- Returns:
- the value of the
speedMultiplierrecord component
-