net.minecraft.component.type

public record BlocksAttacksComponent

net.minecraft.world.item.component.BlocksAttacks
net.minecraft.world.item.component.BlocksAttacks
net.minecraft.class_10707
net.minecraft.component.type.BlocksAttacksComponent

Field summary

Modifier and TypeField
private final float
blockDelaySeconds
blockDelaySeconds
comp_3586
blockDelaySeconds
private final float
disableCooldownScale
disableCooldownScale
comp_3587
disableCooldownScale
private final List<BlocksAttacksComponent$DamageReduction>
damageReductions
damageReductions
comp_3588
damageReductions
private final BlocksAttacksComponent$ItemDamage
itemDamage
itemDamage
comp_3589
itemDamage
private final Optional<RegistryEntryList<DamageType>>
bypassedBy
bypassedBy
comp_3637
bypassedBy
private final Optional<RegistryEntry<SoundEvent>>
blockSound
blockSound
comp_3590
blockSound
private final Optional<RegistryEntry<SoundEvent>>
disableSound
disableSound
comp_3591
disableSound
public static final com.mojang.serialization.Codec<BlocksAttacksComponent>
CODEC
CODEC
field_56301
CODEC
public static final PacketCodec<RegistryByteBuf, BlocksAttacksComponent>
STREAM_CODEC
STREAM_CODEC
field_56302
PACKET_CODEC

Constructor summary

ModifierConstructor
public (float blockDelaySeconds, float disableCooldownScale, List<BlocksAttacksComponent$DamageReduction> damageReductions, BlocksAttacksComponent$ItemDamage itemDamage, Optional<RegistryEntryList<DamageType>> bypassedBy, Optional<RegistryEntry<SoundEvent>> blockSound, Optional<RegistryEntry<SoundEvent>> disableSound)

Method summary

Modifier and TypeMethod
public void
onBlocked(ServerLevel level, LivingEntity user)
onBlocked(ServerLevel level, LivingEntity user)
method_67199(class_3218 arg0, class_1309 arg1)
playBlockSound(ServerWorld world, LivingEntity from)
public void
disable(ServerLevel level, LivingEntity user, float baseSeconds, ItemStack blockingWith)
disable(ServerLevel level, LivingEntity user, float baseSeconds, ItemStack blockingWith)
method_67200(class_3218 arg0, class_1309 arg1, float arg2, class_1799 arg3)
applyShieldCooldown(ServerWorld world, LivingEntity affectedEntity, float cooldownSeconds, ItemStack stack)
public void
hurtBlockingItem(Level level, ItemStack item, LivingEntity user, InteractionHand hand, float damage)
hurtBlockingItem(Level level, ItemStack item, LivingEntity user, InteractionHand hand, float damage)
method_67204(class_1937 arg0, class_1799 arg1, class_1309 arg2, class_1268 arg3, float arg4)
onShieldHit(World world, ItemStack stack, LivingEntity entity, Hand hand, float itemDamage)
private int
disableBlockingForTicks(float baseSeconds)
disableBlockingForTicks(float baseSeconds)
method_67198(float arg0)
convertCooldownToTicks(float cooldownSeconds)
public int
blockDelayTicks()
blockDelayTicks()
method_67197()
getBlockDelayTicks()
public float
resolveBlockedDamage(DamageSource source, float dealtDamage, double angle)
resolveBlockedDamage(DamageSource source, float dealtDamage, double angle)
method_67202(class_1282 arg0, float arg1, double arg2)
getDamageReductionAmount(DamageSource source, float damage, double angle)
public float
blockDelaySeconds()
blockDelaySeconds()
comp_3586()
blockDelaySeconds()
public float
disableCooldownScale()
disableCooldownScale()
comp_3587()
disableCooldownScale()
public List<BlocksAttacksComponent$DamageReduction>
damageReductions()
damageReductions()
comp_3588()
damageReductions()
public BlocksAttacksComponent$ItemDamage
itemDamage()
itemDamage()
comp_3589()
itemDamage()
public Optional<RegistryEntryList<DamageType>>
bypassedBy()
bypassedBy()
comp_3637()
bypassedBy()
public Optional<RegistryEntry<SoundEvent>>
blockSound()
blockSound()
comp_3590()
blockSound()
public Optional<RegistryEntry<SoundEvent>>
disableSound()
disableSound()
comp_3591()
disableSound()