Package net.minecraft.component.type
Record Class BlocksAttacksComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.BlocksAttacksComponent
- Record Components:
blockDelaySeconds
-disableCooldownScale
-damageReductions
-itemDamage
-bypassedBy
-blockSound
-disableSound
-
public record BlocksAttacksComponent(float blockDelaySeconds, float disableCooldownScale, List<BlocksAttacksComponent.DamageReduction> damageReductions, BlocksAttacksComponent.ItemDamage itemDamage, Optional<TagKey<DamageType>> bypassedBy, Optional<RegistryEntry<SoundEvent>> blockSound, Optional<RegistryEntry<SoundEvent>> disableSound)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/BlocksAttacksComponent
intermediary net/minecraft/class_10707
official dcl
named blockDelaySeconds
intermediary comp_3586
official c
named disableCooldownScale
intermediary comp_3587
official d
named damageReductions
intermediary comp_3588
official e
named itemDamage
intermediary comp_3589
official f
named bypassedBy
intermediary comp_3637
official g
named blockSound
intermediary comp_3590
official h
named disableSound
intermediary comp_3591
official i
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float
The field for theblockDelaySeconds
record component.private final Optional
<RegistryEntry<SoundEvent>> The field for theblockSound
record component.private final Optional
<TagKey<DamageType>> The field for thebypassedBy
record component.static final com.mojang.serialization.Codec
<BlocksAttacksComponent> private final List
<BlocksAttacksComponent.DamageReduction> The field for thedamageReductions
record component.private final float
The field for thedisableCooldownScale
record component.private final Optional
<RegistryEntry<SoundEvent>> The field for thedisableSound
record component.private final BlocksAttacksComponent.ItemDamage
The field for theitemDamage
record component.static final PacketCodec
<RegistryByteBuf, BlocksAttacksComponent> -
Constructor Summary
ConstructorsConstructorDescriptionBlocksAttacksComponent
(float float2, float float3, List<BlocksAttacksComponent.DamageReduction> list, BlocksAttacksComponent.ItemDamage itemDamage, Optional<TagKey<DamageType>> optional, Optional<RegistryEntry<SoundEvent>> optional2, Optional<RegistryEntry<SoundEvent>> optional3) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyShieldCooldown
(ServerWorld world, LivingEntity affectedEntity, float cooldownSeconds, ItemStack stack) float
Returns the value of theblockDelaySeconds
record component.Returns the value of theblockSound
record component.Returns the value of thebypassedBy
record component.private int
convertCooldownToTicks
(float cooldownSeconds) Returns the value of thedamageReductions
record component.float
Returns the value of thedisableCooldownScale
record component.Returns the value of thedisableSound
record component.final boolean
Indicates whether some other object is "equal to" this one.int
float
getDamageReductionAmount
(DamageSource source, float damage, double angle) final int
hashCode()
Returns a hash code value for this object.Returns the value of theitemDamage
record component.void
onShieldHit
(World world, ItemStack stack, LivingEntity entity, Hand hand, float itemDamage) void
playBlockSound
(ServerWorld world, LivingEntity from) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
blockDelaySeconds
private final float blockDelaySecondsThe field for theblockDelaySeconds
record component. -
disableCooldownScale
private final float disableCooldownScaleThe field for thedisableCooldownScale
record component. -
damageReductions
The field for thedamageReductions
record component. -
itemDamage
The field for theitemDamage
record component. -
bypassedBy
The field for thebypassedBy
record component. -
blockSound
The field for theblockSound
record component. -
disableSound
The field for thedisableSound
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/component/type/BlocksAttacksComponent;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_56301
Lnet/minecraft/class_10707;field_56301:Lcom/mojang/serialization/Codec;
official a
Ldcl;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/component/type/BlocksAttacksComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_56302
Lnet/minecraft/class_10707;field_56302:Lnet/minecraft/class_9139;
official b
Ldcl;b:Lze;
-
-
Constructor Details
-
BlocksAttacksComponent
public BlocksAttacksComponent(float float2, float float3, List<BlocksAttacksComponent.DamageReduction> list, BlocksAttacksComponent.ItemDamage itemDamage, Optional<TagKey<DamageType>> optional, Optional<RegistryEntry<SoundEvent>> optional2, Optional<RegistryEntry<SoundEvent>> optional3)
-
-
Method Details
-
playBlockSound
- Mappings:
Namespace Name Mixin selector named playBlockSound
Lnet/minecraft/component/type/BlocksAttacksComponent;playBlockSound(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)V
intermediary method_67199
Lnet/minecraft/class_10707;method_67199(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
official a
Ldcl;a(Lasb;Lbyf;)V
-
applyShieldCooldown
public void applyShieldCooldown(ServerWorld world, LivingEntity affectedEntity, float cooldownSeconds, ItemStack stack) - Mappings:
Namespace Name Mixin selector named applyShieldCooldown
Lnet/minecraft/component/type/BlocksAttacksComponent;applyShieldCooldown(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;FLnet/minecraft/item/ItemStack;)V
intermediary method_67200
Lnet/minecraft/class_10707;method_67200(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;FLnet/minecraft/class_1799;)V
official a
Ldcl;a(Lasb;Lbyf;FLdak;)V
-
onShieldHit
public void onShieldHit(World world, ItemStack stack, LivingEntity entity, Hand hand, float itemDamage) - Mappings:
Namespace Name Mixin selector named onShieldHit
Lnet/minecraft/component/type/BlocksAttacksComponent;onShieldHit(Lnet/minecraft/world/World;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;F)V
intermediary method_67204
Lnet/minecraft/class_10707;method_67204(Lnet/minecraft/class_1937;Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;Lnet/minecraft/class_1268;F)V
official a
Ldcl;a(Ldkj;Ldak;Lbyf;Lbvb;F)V
-
convertCooldownToTicks
private int convertCooldownToTicks(float cooldownSeconds) - Mappings:
Namespace Name Mixin selector named convertCooldownToTicks
Lnet/minecraft/component/type/BlocksAttacksComponent;convertCooldownToTicks(F)I
intermediary method_67198
Lnet/minecraft/class_10707;method_67198(F)I
official a
Ldcl;a(F)I
-
getBlockDelayTicks
public int getBlockDelayTicks()- Mappings:
Namespace Name Mixin selector named getBlockDelayTicks
Lnet/minecraft/component/type/BlocksAttacksComponent;getBlockDelayTicks()I
intermediary method_67197
Lnet/minecraft/class_10707;method_67197()I
official a
Ldcl;a()I
-
getDamageReductionAmount
- Mappings:
Namespace Name Mixin selector named getDamageReductionAmount
Lnet/minecraft/component/type/BlocksAttacksComponent;getDamageReductionAmount(Lnet/minecraft/entity/damage/DamageSource;FD)F
intermediary method_67202
Lnet/minecraft/class_10707;method_67202(Lnet/minecraft/class_1282;FD)F
official a
Ldcl;a(Lbvt;FD)F
-
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 '=='. -
blockDelaySeconds
public float blockDelaySeconds()Returns the value of theblockDelaySeconds
record component.- Returns:
- the value of the
blockDelaySeconds
record component
-
disableCooldownScale
public float disableCooldownScale()Returns the value of thedisableCooldownScale
record component.- Returns:
- the value of the
disableCooldownScale
record component
-
damageReductions
Returns the value of thedamageReductions
record component.- Returns:
- the value of the
damageReductions
record component
-
itemDamage
Returns the value of theitemDamage
record component.- Returns:
- the value of the
itemDamage
record component
-
bypassedBy
Returns the value of thebypassedBy
record component.- Returns:
- the value of the
bypassedBy
record component
-
blockSound
Returns the value of theblockSound
record component.- Returns:
- the value of the
blockSound
record component
-
disableSound
Returns the value of thedisableSound
record component.- Returns:
- the value of the
disableSound
record component
-