Record Class PotatoBaneComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.PotatoBaneComponent
Record Components:
damageBoost -
All Implemented Interfaces:
TooltipAppender

public record PotatoBaneComponent(float damageBoost) extends Record implements TooltipAppender
Mappings:
Namespace Name
official drk
intermediary net/minecraft/class_9577
named net/minecraft/component/type/PotatoBaneComponent
official c
intermediary comp_2589
named damageBoost
  • Field Details

    • damageBoost

      private final float damageBoost
      The field for the damageBoost record component.
    • CODEC

      public static final com.mojang.serialization.Codec<PotatoBaneComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Ldrk;a:Lcom/mojang/serialization/Codec;
      intermediary field_50959 Lnet/minecraft/class_9577;field_50959:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/component/type/PotatoBaneComponent;CODEC:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,PotatoBaneComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      official b Ldrk;b:Lzc;
      intermediary field_50960 Lnet/minecraft/class_9577;field_50960:Lnet/minecraft/class_9139;
      named PACKET_CODEC Lnet/minecraft/component/type/PotatoBaneComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
  • Constructor Details

    • PotatoBaneComponent

      public PotatoBaneComponent(float float2)
  • Method Details

    • appendTooltip

      public void appendTooltip(Consumer<Text> textConsumer, TooltipContext context)
      Specified by:
      appendTooltip in interface TooltipAppender
      Mappings:
      Namespace Name Mixin selector
      official a Lcxx;a(Ljava/util/function/Consumer;Lcwi;)V
      intermediary method_57409 Lnet/minecraft/class_9299;method_57409(Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)V
      named appendTooltip Lnet/minecraft/item/TooltipAppender;appendTooltip(Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipContext;)V
    • getDamageBoost

      public static float getDamageBoost(ItemStack stack, Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Ldrk;a(Lcuh;Lbrv;)F
      intermediary method_59194 Lnet/minecraft/class_9577;method_59194(Lnet/minecraft/class_1799;Lnet/minecraft/class_1297;)F
      named getDamageBoost Lnet/minecraft/component/type/PotatoBaneComponent;getDamageBoost(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/Entity;)F
    • toString

      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

      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

      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.
    • damageBoost

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