Package net.minecraft.component.type
Record Class KineticWeaponComponent.Condition
java.lang.Object
java.lang.Record
net.minecraft.component.type.KineticWeaponComponent.Condition
- Record Components:
maxDurationTicks-minSpeed-minRelativeSpeed-
- Enclosing class:
KineticWeaponComponent
public static record KineticWeaponComponent.Condition(int maxDurationTicks, float minSpeed, float minRelativeSpeed)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/KineticWeaponComponent$Conditionintermediary net/minecraft/class_12123$class_12124official dnb$anamed maxDurationTicksintermediary comp_4965official cnamed minSpeedintermediary comp_4966official dnamed minRelativeSpeedintermediary comp_4967official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<KineticWeaponComponent.Condition> private final intThe field for themaxDurationTicksrecord component.private final floatThe field for theminRelativeSpeedrecord component.private final floatThe field for theminSpeedrecord component.static final PacketCodec<ByteBuf, KineticWeaponComponent.Condition> -
Constructor Summary
ConstructorsConstructorDescriptionCondition(int maxDurationTicks, float minSpeed, float minRelativeSpeed) Creates an instance of aConditionrecord 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.booleanisSatisfied(int durationTicks, double speed, double relativeSpeed, double minSpeedMultiplier) intReturns the value of themaxDurationTicksrecord component.floatReturns the value of theminRelativeSpeedrecord component.floatminSpeed()Returns the value of theminSpeedrecord component.ofMinRelativeSpeed(int maxDurationTicks, float minRelativeSpeed) ofMinSpeed(int maxDurationTicks, float minSpeed) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
maxDurationTicks
private final int maxDurationTicksThe field for themaxDurationTicksrecord component. -
minSpeed
private final float minSpeedThe field for theminSpeedrecord component. -
minRelativeSpeed
private final float minRelativeSpeedThe field for theminRelativeSpeedrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/KineticWeaponComponent$Condition;CODEC:Lcom/mojang/serialization/Codec;intermediary field_63409Lnet/minecraft/class_12123$class_12124;field_63409:Lcom/mojang/serialization/Codec;official aLdnb$a;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/KineticWeaponComponent$Condition;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_63410Lnet/minecraft/class_12123$class_12124;field_63410:Lnet/minecraft/class_9139;official bLdnb$a;b:Laat;
-
-
Constructor Details
-
Condition
public Condition(int maxDurationTicks, float minSpeed, float minRelativeSpeed) Creates an instance of aConditionrecord class.- Parameters:
maxDurationTicks- the value for themaxDurationTicksrecord componentminSpeed- the value for theminSpeedrecord componentminRelativeSpeed- the value for theminRelativeSpeedrecord component
-
-
Method Details
-
isSatisfied
public boolean isSatisfied(int durationTicks, double speed, double relativeSpeed, double minSpeedMultiplier) - Mappings:
Namespace Name Mixin selector named isSatisfiedLnet/minecraft/component/type/KineticWeaponComponent$Condition;isSatisfied(IDDD)Zintermediary method_75237Lnet/minecraft/class_12123$class_12124;method_75237(IDDD)Zofficial aLdnb$a;a(IDDD)Z
-
ofMinSpeed
public static Optional<KineticWeaponComponent.Condition> ofMinSpeed(int maxDurationTicks, float minSpeed) - Mappings:
Namespace Name Mixin selector named ofMinSpeedLnet/minecraft/component/type/KineticWeaponComponent$Condition;ofMinSpeed(IF)Ljava/util/Optional;intermediary method_75238Lnet/minecraft/class_12123$class_12124;method_75238(IF)Ljava/util/Optional;official aLdnb$a;a(IF)Ljava/util/Optional;
-
ofMinRelativeSpeed
public static Optional<KineticWeaponComponent.Condition> ofMinRelativeSpeed(int maxDurationTicks, float minRelativeSpeed) - Mappings:
Namespace Name Mixin selector named ofMinRelativeSpeedLnet/minecraft/component/type/KineticWeaponComponent$Condition;ofMinRelativeSpeed(IF)Ljava/util/Optional;intermediary method_75240Lnet/minecraft/class_12123$class_12124;method_75240(IF)Ljava/util/Optional;official bLdnb$a;b(IF)Ljava/util/Optional;
-
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 '=='. -
maxDurationTicks
public int maxDurationTicks()Returns the value of themaxDurationTicksrecord component.- Returns:
- the value of the
maxDurationTicksrecord component
-
minSpeed
public float minSpeed()Returns the value of theminSpeedrecord component.- Returns:
- the value of the
minSpeedrecord component
-
minRelativeSpeed
public float minRelativeSpeed()Returns the value of theminRelativeSpeedrecord component.- Returns:
- the value of the
minRelativeSpeedrecord component
-