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$ItemDamage
intermediary net/minecraft/class_10707$class_10709
official dcl$b
named threshold
intermediary comp_3595
official d
named base
intermediary comp_3596
official e
named factor
intermediary comp_3597
official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final float
The field for thebase
record component.static final com.mojang.serialization.Codec
<BlocksAttacksComponent.ItemDamage> static final BlocksAttacksComponent.ItemDamage
private final float
The field for thefactor
record component.static final PacketCodec
<ByteBuf, BlocksAttacksComponent.ItemDamage> private final float
The field for thethreshold
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
base()
Returns the value of thebase
record component.int
calculate
(float itemDamage) final boolean
Indicates whether some other object is "equal to" this one.float
factor()
Returns the value of thefactor
record component.final int
hashCode()
Returns a hash code value for this object.float
Returns the value of thethreshold
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
threshold
private final float thresholdThe field for thethreshold
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$ItemDamage;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_56306
Lnet/minecraft/class_10707$class_10709;field_56306:Lcom/mojang/serialization/Codec;
official a
Ldcl$b;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/component/type/BlocksAttacksComponent$ItemDamage;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_56307
Lnet/minecraft/class_10707$class_10709;field_56307:Lnet/minecraft/class_9139;
official b
Ldcl$b;b:Lze;
-
DEFAULT
- Mappings:
Namespace Name Mixin selector named DEFAULT
Lnet/minecraft/component/type/BlocksAttacksComponent$ItemDamage;DEFAULT:Lnet/minecraft/component/type/BlocksAttacksComponent$ItemDamage;
intermediary field_56308
Lnet/minecraft/class_10707$class_10709;field_56308:Lnet/minecraft/class_10707$class_10709;
official c
Ldcl$b;c:Ldcl$b;
-
-
Constructor Details
-
Method Details
-
calculate
public int calculate(float itemDamage) - Mappings:
Namespace Name Mixin selector named calculate
Lnet/minecraft/component/type/BlocksAttacksComponent$ItemDamage;calculate(F)I
intermediary method_67208
Lnet/minecraft/class_10707$class_10709;method_67208(F)I
official a
Ldcl$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 thethreshold
record component.- Returns:
- the value of the
threshold
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
-