Package net.minecraft.component.type
Record Class BlocksAttacksComponent.DamageReduction
java.lang.Object
java.lang.Record
net.minecraft.component.type.BlocksAttacksComponent.DamageReduction
- Record Components:
horizontalBlockingAngle
-type
-base
-factor
-
- Enclosing class:
BlocksAttacksComponent
public static record BlocksAttacksComponent.DamageReduction(float horizontalBlockingAngle, Optional<RegistryEntryList<DamageType>> type, float base, float factor)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/BlocksAttacksComponent$DamageReduction
intermediary net/minecraft/class_10707$class_10708
official dew$a
named horizontalBlockingAngle
intermediary comp_3638
official c
named type
intermediary comp_3592
official d
named base
intermediary comp_3593
official e
named factor
intermediary comp_3594
official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float
The field for thebase
record component.static final com.mojang.serialization.Codec
<BlocksAttacksComponent.DamageReduction> private final float
The field for thefactor
record component.private final float
The field for thehorizontalBlockingAngle
record component.static final PacketCodec
<RegistryByteBuf, BlocksAttacksComponent.DamageReduction> private final Optional
<RegistryEntryList<DamageType>> The field for thetype
record component. -
Constructor Summary
ConstructorsConstructorDescriptionDamageReduction
(float float2, Optional<RegistryEntryList<DamageType>> optional, float float3, float float4) -
Method Summary
Modifier and TypeMethodDescriptionfloat
base()
Returns the value of thebase
record component.final boolean
Indicates whether some other object is "equal to" this one.float
factor()
Returns the value of thefactor
record component.float
getReductionAmount
(DamageSource source, float damage, double angle) final int
hashCode()
Returns a hash code value for this object.float
Returns the value of thehorizontalBlockingAngle
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Field Details
-
horizontalBlockingAngle
private final float horizontalBlockingAngleThe field for thehorizontalBlockingAngle
record component. -
type
The field for thetype
record component. -
base
private final float baseThe field for thebase
record component. -
factor
private final float factorThe field for thefactor
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/component/type/BlocksAttacksComponent$DamageReduction;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_56303
Lnet/minecraft/class_10707$class_10708;field_56303:Lcom/mojang/serialization/Codec;
official a
Ldew$a;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
public static final PacketCodec<RegistryByteBuf,BlocksAttacksComponent.DamageReduction> PACKET_CODEC- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/component/type/BlocksAttacksComponent$DamageReduction;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_56304
Lnet/minecraft/class_10707$class_10708;field_56304:Lnet/minecraft/class_9139;
official b
Ldew$a;b:Lzm;
-
-
Constructor Details
-
DamageReduction
public DamageReduction(float float2, Optional<RegistryEntryList<DamageType>> optional, float float3, float float4)
-
-
Method Details
-
getReductionAmount
- Mappings:
Namespace Name Mixin selector named getReductionAmount
Lnet/minecraft/component/type/BlocksAttacksComponent$DamageReduction;getReductionAmount(Lnet/minecraft/entity/damage/DamageSource;FD)F
intermediary method_67206
Lnet/minecraft/class_10707$class_10708;method_67206(Lnet/minecraft/class_1282;FD)F
official a
Ldew$a;a(Lbyb;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 '=='. -
horizontalBlockingAngle
public float horizontalBlockingAngle()Returns the value of thehorizontalBlockingAngle
record component.- Returns:
- the value of the
horizontalBlockingAngle
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
base
public float base()Returns the value of thebase
record component.- Returns:
- the value of the
base
record component
-
factor
public float factor()Returns the value of thefactor
record component.- Returns:
- the value of the
factor
record component
-