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 Details Link icon

    • threshold Link icon

      private final float threshold
      The field for the threshold record component.
    • base Link icon

      private final float base
      The field for the base record component.
    • factor Link icon

      private final float factor
      The field for the factor record component.
    • CODEC Link icon

      public static final com.mojang.serialization.Codec<BlocksAttacksComponent.ItemDamage> 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 Link icon

      public static final PacketCodec<ByteBuf,BlocksAttacksComponent.ItemDamage> 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 Link icon

      public static final BlocksAttacksComponent.ItemDamage 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 Link icon

    • ItemDamage Link icon

      public ItemDamage(float float2, float float3, float float4)
  • Method Details Link icon

    • calculate Link icon

      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 Link icon

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode Link icon

      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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals Link icon

      public final boolean equals(Object object)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • threshold Link icon

      public float threshold()
      Returns the value of the threshold record component.
      Returns:
      the value of the threshold record component
    • base Link icon

      public float base()
      Returns the value of the base record component.
      Returns:
      the value of the base record component
    • factor Link icon

      public float factor()
      Returns the value of the factor record component.
      Returns:
      the value of the factor record component