Package net.minecraft.component.type
Record Class BlocksAttacksComponent.DamageReduction
java.lang.Object
java.lang.Record
net.minecraft.component.type.BlocksAttacksComponent.DamageReduction
- Record Components:
type-base-factor-
- Enclosing class:
BlocksAttacksComponent
public static record BlocksAttacksComponent.DamageReduction(Optional<RegistryEntryList<DamageType>> type, float base, float factor)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/BlocksAttacksComponent$DamageReductionintermediary net/minecraft/class_10707$class_10708official dat$anamed typeintermediary comp_3592official dnamed baseintermediary comp_3593official enamed factorintermediary comp_3594official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thebaserecord component.static final com.mojang.serialization.Codec<BlocksAttacksComponent.DamageReduction> private final floatThe field for thefactorrecord component.static final BlocksAttacksComponent.DamageReductionstatic final PacketCodec<RegistryByteBuf, BlocksAttacksComponent.DamageReduction> private final Optional<RegistryEntryList<DamageType>> The field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDamageReduction(Optional<RegistryEntryList<DamageType>> optional, float float2, float float3) -
Method Summary
Modifier and TypeMethodDescriptionfloatbase()Returns the value of thebaserecord component.final booleanIndicates whether some other object is "equal to" this one.floatfactor()Returns the value of thefactorrecord component.final inthashCode()Returns a hash code value for this object.floatmethod_67206(DamageSource source, float float2) final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
base
private final float baseThe field for thebaserecord component. -
factor
private final float factorThe field for thefactorrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/BlocksAttacksComponent$DamageReduction;CODEC:Lcom/mojang/serialization/Codec;intermediary field_56303Lnet/minecraft/class_10707$class_10708;field_56303:Lcom/mojang/serialization/Codec;official aLdat$a;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
public static final PacketCodec<RegistryByteBuf,BlocksAttacksComponent.DamageReduction> PACKET_CODEC- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/BlocksAttacksComponent$DamageReduction;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_56304Lnet/minecraft/class_10707$class_10708;field_56304:Lnet/minecraft/class_9139;official bLdat$a;b:Lyu;
-
field_56305
- Mappings:
Namespace Name Mixin selector named field_56305Lnet/minecraft/component/type/BlocksAttacksComponent$DamageReduction;field_56305:Lnet/minecraft/component/type/BlocksAttacksComponent$DamageReduction;intermediary field_56305Lnet/minecraft/class_10707$class_10708;field_56305:Lnet/minecraft/class_10707$class_10708;official cLdat$a;c:Ldat$a;
-
-
Constructor Details
-
DamageReduction
public DamageReduction(Optional<RegistryEntryList<DamageType>> optional, float float2, float float3)
-
-
Method Details
-
method_67206
- Mappings:
Namespace Name Mixin selector named method_67206Lnet/minecraft/component/type/BlocksAttacksComponent$DamageReduction;method_67206(Lnet/minecraft/entity/damage/DamageSource;F)Fintermediary method_67206Lnet/minecraft/class_10707$class_10708;method_67206(Lnet/minecraft/class_1282;F)Fofficial aLdat$a;a(Lbup;F)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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
base
public float base()Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
factor
public float factor()Returns the value of thefactorrecord component.- Returns:
- the value of the
factorrecord component
-