Package net.minecraft.component.type
Record Class KineticWeaponComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.KineticWeaponComponent
- Record Components:
minReach-maxReach-hitboxMargin-contactCooldownTicks-delayTicks-dismountConditions-knockbackConditions-damageConditions-forwardMovement-damageMultiplier-sound-hitSound-
public record KineticWeaponComponent(float minReach, float maxReach, float hitboxMargin, int contactCooldownTicks, int delayTicks, Optional<KineticWeaponComponent.Condition> dismountConditions, Optional<KineticWeaponComponent.Condition> knockbackConditions, Optional<KineticWeaponComponent.Condition> damageConditions, float forwardMovement, float damageMultiplier, Optional<RegistryEntry<SoundEvent>> sound, Optional<RegistryEntry<SoundEvent>> hitSound)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/KineticWeaponComponentintermediary net/minecraft/class_12123official dnbnamed minReachintermediary comp_4954official cnamed maxReachintermediary comp_4955official dnamed hitboxMarginintermediary comp_4956official enamed contactCooldownTicksintermediary comp_5145official fnamed delayTicksintermediary comp_4957official gnamed dismountConditionsintermediary comp_4958official hnamed knockbackConditionsintermediary comp_4959official inamed damageConditionsintermediary comp_4960official jnamed forwardMovementintermediary comp_4961official knamed damageMultiplierintermediary comp_4962official lnamed soundintermediary comp_4963official mnamed hitSoundintermediary comp_4964official n
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<KineticWeaponComponent> private final intThe field for thecontactCooldownTicksrecord component.private final Optional<KineticWeaponComponent.Condition> The field for thedamageConditionsrecord component.private final floatThe field for thedamageMultiplierrecord component.private final intThe field for thedelayTicksrecord component.private final Optional<KineticWeaponComponent.Condition> The field for thedismountConditionsrecord component.private final floatThe field for theforwardMovementrecord component.private final floatThe field for thehitboxMarginrecord component.private final Optional<RegistryEntry<SoundEvent>> The field for thehitSoundrecord component.private final Optional<KineticWeaponComponent.Condition> The field for theknockbackConditionsrecord component.private final floatThe field for themaxReachrecord component.private final floatThe field for theminReachrecord component.static final PacketCodec<RegistryByteBuf, KineticWeaponComponent> private final Optional<RegistryEntry<SoundEvent>> The field for thesoundrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionKineticWeaponComponent(float minReach, float maxReach, float hitboxMargin, int contactCooldownTicks, int delayTicks, Optional<KineticWeaponComponent.Condition> dismountConditions, Optional<KineticWeaponComponent.Condition> knockbackConditions, Optional<KineticWeaponComponent.Condition> damageConditions, float forwardMovement, float damageMultiplier, Optional<RegistryEntry<SoundEvent>> sound, Optional<RegistryEntry<SoundEvent>> hitSound) Creates an instance of aKineticWeaponComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecontactCooldownTicksrecord component.Returns the value of thedamageConditionsrecord component.floatReturns the value of thedamageMultiplierrecord component.intReturns the value of thedelayTicksrecord component.Returns the value of thedismountConditionsrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of theforwardMovementrecord component.static Vec3dgetAmplifiedMovement(Entity entity) intfinal inthashCode()Returns a hash code value for this object.floatReturns the value of thehitboxMarginrecord component.hitSound()Returns the value of thehitSoundrecord component.Returns the value of theknockbackConditionsrecord component.floatmaxReach()Returns the value of themaxReachrecord component.floatminReach()Returns the value of theminReachrecord component.voidplayHitSound(Entity entity) voidsound()Returns the value of thesoundrecord component.final StringtoString()Returns a string representation of this record class.voidusageTick(ItemStack stack, int remainingUseTicks, LivingEntity user, EquipmentSlot slot)
-
Field Details
-
minReach
private final float minReachThe field for theminReachrecord component. -
maxReach
private final float maxReachThe field for themaxReachrecord component. -
hitboxMargin
private final float hitboxMarginThe field for thehitboxMarginrecord component. -
contactCooldownTicks
private final int contactCooldownTicksThe field for thecontactCooldownTicksrecord component. -
delayTicks
private final int delayTicksThe field for thedelayTicksrecord component. -
dismountConditions
The field for thedismountConditionsrecord component. -
knockbackConditions
The field for theknockbackConditionsrecord component. -
damageConditions
The field for thedamageConditionsrecord component. -
forwardMovement
private final float forwardMovementThe field for theforwardMovementrecord component. -
damageMultiplier
private final float damageMultiplierThe field for thedamageMultiplierrecord component. -
sound
The field for thesoundrecord component. -
hitSound
The field for thehitSoundrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/KineticWeaponComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_63407Lnet/minecraft/class_12123;field_63407:Lcom/mojang/serialization/Codec;official aLdnb;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/KineticWeaponComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_63408Lnet/minecraft/class_12123;field_63408:Lnet/minecraft/class_9139;official bLdnb;b:Laat;
-
-
Constructor Details
-
KineticWeaponComponent
public KineticWeaponComponent(float minReach, float maxReach, float hitboxMargin, int contactCooldownTicks, int delayTicks, Optional<KineticWeaponComponent.Condition> dismountConditions, Optional<KineticWeaponComponent.Condition> knockbackConditions, Optional<KineticWeaponComponent.Condition> damageConditions, float forwardMovement, float damageMultiplier, Optional<RegistryEntry<SoundEvent>> sound, Optional<RegistryEntry<SoundEvent>> hitSound) Creates an instance of aKineticWeaponComponentrecord class.- Parameters:
minReach- the value for theminReachrecord componentmaxReach- the value for themaxReachrecord componenthitboxMargin- the value for thehitboxMarginrecord componentcontactCooldownTicks- the value for thecontactCooldownTicksrecord componentdelayTicks- the value for thedelayTicksrecord componentdismountConditions- the value for thedismountConditionsrecord componentknockbackConditions- the value for theknockbackConditionsrecord componentdamageConditions- the value for thedamageConditionsrecord componentforwardMovement- the value for theforwardMovementrecord componentdamageMultiplier- the value for thedamageMultiplierrecord componentsound- the value for thesoundrecord componenthitSound- the value for thehitSoundrecord component
-
-
Method Details
-
getAmplifiedMovement
- Mappings:
Namespace Name Mixin selector named getAmplifiedMovementLnet/minecraft/component/type/KineticWeaponComponent;getAmplifiedMovement(Lnet/minecraft/entity/Entity;)Lnet/minecraft/util/math/Vec3d;intermediary method_75229Lnet/minecraft/class_12123;method_75229(Lnet/minecraft/class_1297;)Lnet/minecraft/class_243;official aLdnb;a(Lcgd;)Lfrd;
-
playSound
- Mappings:
Namespace Name Mixin selector named playSoundLnet/minecraft/component/type/KineticWeaponComponent;playSound(Lnet/minecraft/entity/Entity;)Vintermediary method_75234Lnet/minecraft/class_12123;method_75234(Lnet/minecraft/class_1297;)Vofficial bLdnb;b(Lcgd;)V
-
playHitSound
- Mappings:
Namespace Name Mixin selector named playHitSoundLnet/minecraft/component/type/KineticWeaponComponent;playHitSound(Lnet/minecraft/entity/Entity;)Vintermediary method_75236Lnet/minecraft/class_12123;method_75236(Lnet/minecraft/class_1297;)Vofficial cLdnb;c(Lcgd;)V
-
getUseTicks
public int getUseTicks()- Mappings:
Namespace Name Mixin selector named getUseTicksLnet/minecraft/component/type/KineticWeaponComponent;getUseTicks()Iintermediary method_75228Lnet/minecraft/class_12123;method_75228()Iofficial aLdnb;a()I
-
usageTick
public void usageTick(ItemStack stack, int remainingUseTicks, LivingEntity user, EquipmentSlot slot) - Mappings:
Namespace Name Mixin selector named usageTickLnet/minecraft/component/type/KineticWeaponComponent;usageTick(Lnet/minecraft/item/ItemStack;ILnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/EquipmentSlot;)Vintermediary method_75233Lnet/minecraft/class_12123;method_75233(Lnet/minecraft/class_1799;ILnet/minecraft/class_1309;Lnet/minecraft/class_1304;)Vofficial aLdnb;a(Ldkf;ILche;Lcgn;)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 '=='. -
minReach
public float minReach()Returns the value of theminReachrecord component.- Returns:
- the value of the
minReachrecord component
-
maxReach
public float maxReach()Returns the value of themaxReachrecord component.- Returns:
- the value of the
maxReachrecord component
-
hitboxMargin
public float hitboxMargin()Returns the value of thehitboxMarginrecord component.- Returns:
- the value of the
hitboxMarginrecord component
-
contactCooldownTicks
public int contactCooldownTicks()Returns the value of thecontactCooldownTicksrecord component.- Returns:
- the value of the
contactCooldownTicksrecord component
-
delayTicks
public int delayTicks()Returns the value of thedelayTicksrecord component.- Returns:
- the value of the
delayTicksrecord component
-
dismountConditions
Returns the value of thedismountConditionsrecord component.- Returns:
- the value of the
dismountConditionsrecord component
-
knockbackConditions
Returns the value of theknockbackConditionsrecord component.- Returns:
- the value of the
knockbackConditionsrecord component
-
damageConditions
Returns the value of thedamageConditionsrecord component.- Returns:
- the value of the
damageConditionsrecord component
-
forwardMovement
public float forwardMovement()Returns the value of theforwardMovementrecord component.- Returns:
- the value of the
forwardMovementrecord component
-
damageMultiplier
public float damageMultiplier()Returns the value of thedamageMultiplierrecord component.- Returns:
- the value of the
damageMultiplierrecord component
-
sound
Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord component
-
hitSound
Returns the value of thehitSoundrecord component.- Returns:
- the value of the
hitSoundrecord component
-