net.minecraft.component.type

public record PiercingWeaponComponent

net.minecraft.world.item.component.PiercingWeapon
net.minecraft.world.item.component.PiercingWeapon
net.minecraft.class_12125
net.minecraft.component.type.PiercingWeaponComponent

Field summary

Modifier and TypeField
private final boolean
dealsKnockback
dealsKnockback
comp_4971
dealsKnockback
private final boolean
dismounts
dismounts
comp_4972
dismounts
private final Optional<RegistryEntry<SoundEvent>>
sound
sound
comp_4973
sound
private final Optional<RegistryEntry<SoundEvent>>
hitSound
hitSound
comp_4974
hitSound
public static final com.mojang.serialization.Codec<PiercingWeaponComponent>
CODEC
CODEC
field_63411
CODEC
public static final PacketCodec<RegistryByteBuf, PiercingWeaponComponent>
STREAM_CODEC
STREAM_CODEC
field_63412
PACKET_CODEC

Constructor summary

ModifierConstructor
public (boolean dealsKnockback, boolean dismounts, Optional<RegistryEntry<SoundEvent>> sound, Optional<RegistryEntry<SoundEvent>> hitSound)

Method summary

Modifier and TypeMethod
public void
makeSound(Entity causer)
makeSound(Entity causer)
method_75243(class_1297 arg0)
playSound(Entity entity)
public void
makeHitSound(Entity causer)
makeHitSound(Entity causer)
method_75247(class_1297 arg0)
playHitSound(Entity entity)
public static boolean
canHitEntity(Entity jabber, Entity target)
canHitEntity(Entity jabber, Entity target)
method_75244(class_1297 arg0, class_1297 arg1)
canHit(Entity attacker, Entity target)
public void
attack(LivingEntity attacker, EquipmentSlot hand)
attack(LivingEntity attacker, EquipmentSlot hand)
method_75242(class_1309 arg0, class_1304 arg1)
stab(LivingEntity attacker, EquipmentSlot slot)
public boolean
dealsKnockback()
dealsKnockback()
comp_4971()
dealsKnockback()
public boolean
dismounts()
dismounts()
comp_4972()
dismounts()
public Optional<RegistryEntry<SoundEvent>>
sound()
sound()
comp_4973()
sound()
public Optional<RegistryEntry<SoundEvent>>
hitSound()
hitSound()
comp_4974()
hitSound()