Package net.minecraft.component.type
Record Class BlocksAttacksComponent.ItemDamage
java.lang.Object
java.lang.Record
net.minecraft.component.type.BlocksAttacksComponent.ItemDamage
- Record Components:
threshold-base-factor-
- Enclosing class:
BlocksAttacksComponent
public static record BlocksAttacksComponent.ItemDamage(float threshold, float base, float factor)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/BlocksAttacksComponent$ItemDamageintermediary net/minecraft/class_10707$class_10709official dcl$bnamed thresholdintermediary comp_3595official dnamed baseintermediary comp_3596official enamed factorintermediary comp_3597official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thebaserecord component.static final com.mojang.serialization.Codec<BlocksAttacksComponent.ItemDamage> static final BlocksAttacksComponent.ItemDamageprivate final floatThe field for thefactorrecord component.static final PacketCodec<ByteBuf, BlocksAttacksComponent.ItemDamage> private final floatThe field for thethresholdrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatbase()Returns the value of thebaserecord component.intcalculate(float itemDamage) 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.floatReturns the value of thethresholdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
threshold
private final float thresholdThe field for thethresholdrecord 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$ItemDamage;CODEC:Lcom/mojang/serialization/Codec;intermediary field_56306Lnet/minecraft/class_10707$class_10709;field_56306:Lcom/mojang/serialization/Codec;official aLdcl$b;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/BlocksAttacksComponent$ItemDamage;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_56307Lnet/minecraft/class_10707$class_10709;field_56307:Lnet/minecraft/class_9139;official bLdcl$b;b:Lze;
-
DEFAULT
- Mappings:
Namespace Name Mixin selector named DEFAULTLnet/minecraft/component/type/BlocksAttacksComponent$ItemDamage;DEFAULT:Lnet/minecraft/component/type/BlocksAttacksComponent$ItemDamage;intermediary field_56308Lnet/minecraft/class_10707$class_10709;field_56308:Lnet/minecraft/class_10707$class_10709;official cLdcl$b;c:Ldcl$b;
-
-
Constructor Details
-
ItemDamage
public ItemDamage(float float2, float float3, float float4)
-
-
Method Details
-
calculate
public int calculate(float itemDamage) - Mappings:
Namespace Name Mixin selector named calculateLnet/minecraft/component/type/BlocksAttacksComponent$ItemDamage;calculate(F)Iintermediary method_67208Lnet/minecraft/class_10707$class_10709;method_67208(F)Iofficial aLdcl$b;a(F)I
-
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. All components in this record class are compared with '=='. -
threshold
public float threshold()Returns the value of thethresholdrecord component.- Returns:
- the value of the
thresholdrecord 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
-