net.minecraft.component.type

public record BlocksAttacksComponent

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

Field summary

Modifier and TypeField
private final float
blockDelaySeconds
comp_3586
blockDelaySeconds
private final float
disableCooldownScale
comp_3587
disableCooldownScale
private final List<BlocksAttacksComponent$DamageReduction>
damageReductions
comp_3588
damageReductions
private final BlocksAttacksComponent$ItemDamage
itemDamage
comp_3589
itemDamage
private final Optional<RegistryEntryList<DamageType>>
bypassedBy
comp_3637
bypassedBy
private final Optional<RegistryEntry<SoundEvent>>
blockSound
comp_3590
blockSound
private final Optional<RegistryEntry<SoundEvent>>
disableSound
comp_3591
disableSound
public static final com.mojang.serialization.Codec<BlocksAttacksComponent>
CODEC
field_56301
CODEC
public static final PacketCodec<RegistryByteBuf, BlocksAttacksComponent>
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)
method_67199(class_3218 arg0, class_1309 arg1)
playBlockSound(ServerWorld world, LivingEntity from)
public void
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)
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)
method_67198(float arg0)
convertCooldownToTicks(float cooldownSeconds)
public int
blockDelayTicks()
method_67197()
getBlockDelayTicks()
public float
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()
comp_3586()
blockDelaySeconds()
public float
disableCooldownScale()
comp_3587()
disableCooldownScale()
public List<BlocksAttacksComponent$DamageReduction>
damageReductions()
comp_3588()
damageReductions()
public BlocksAttacksComponent$ItemDamage
itemDamage()
comp_3589()
itemDamage()
public Optional<RegistryEntryList<DamageType>>
bypassedBy()
comp_3637()
bypassedBy()
public Optional<RegistryEntry<SoundEvent>>
blockSound()
comp_3590()
blockSound()
public Optional<RegistryEntry<SoundEvent>>
disableSound()
comp_3591()
disableSound()
private static void
lambda$disable$0(ServerLevel arg0, LivingEntity arg1, Holder arg2)
method_67201(class_3218 arg0, class_1309 arg1, class_6880 arg2)
method_67201(ServerWorld arg0, LivingEntity arg1, RegistryEntry sound)
private static void
lambda$onBlocked$0(ServerLevel arg0, LivingEntity arg1, Holder arg2)
method_67205(class_3218 arg0, class_1309 arg1, class_6880 arg2)
method_67205(ServerWorld arg0, LivingEntity arg1, RegistryEntry sound)
private static com.mojang.datafixers.kinds.App
lambda$static$0(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_67203(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_67203(com.mojang.serialization.codecs.RecordCodecBuilder$Instance instance)