Record Class ApplyEffectsConsumeEffect

java.lang.Object
java.lang.Record
net.minecraft.item.consume.ApplyEffectsConsumeEffect
Record Components:
effects -
probability -
All Implemented Interfaces:
ConsumeEffect

public record ApplyEffectsConsumeEffect(List<StatusEffectInstance> effects, float probability) extends Record implements ConsumeEffect
Mappings:
Namespace Name
named net/minecraft/item/consume/ApplyEffectsConsumeEffect
intermediary net/minecraft/class_10132
official day
named effects
intermediary comp_3094
official c
named probability
intermediary comp_3095
official f
  • Field Details

    • effects

      private final List<StatusEffectInstance> effects
      The field for the effects record component.
    • probability

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

      public static final com.mojang.serialization.MapCodec<ApplyEffectsConsumeEffect> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/item/consume/ApplyEffectsConsumeEffect;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_53803 Lnet/minecraft/class_10132;field_53803:Lcom/mojang/serialization/MapCodec;
      official a Lday;a:Lcom/mojang/serialization/MapCodec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,ApplyEffectsConsumeEffect> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/item/consume/ApplyEffectsConsumeEffect;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_53804 Lnet/minecraft/class_10132;field_53804:Lnet/minecraft/class_9139;
      official b Lday;b:Lzt;
  • Constructor Details

    • ApplyEffectsConsumeEffect

      public ApplyEffectsConsumeEffect(StatusEffectInstance effect, float probability)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/consume/ApplyEffectsConsumeEffect;<init>(Lnet/minecraft/entity/effect/StatusEffectInstance;F)V
      intermediary <init> Lnet/minecraft/class_10132;<init>(Lnet/minecraft/class_1293;F)V
      official <init> Lday;<init>(Lbuo;F)V
    • ApplyEffectsConsumeEffect

      public ApplyEffectsConsumeEffect(List<StatusEffectInstance> effects)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/consume/ApplyEffectsConsumeEffect;<init>(Ljava/util/List;)V
      intermediary <init> Lnet/minecraft/class_10132;<init>(Ljava/util/List;)V
      official <init> Lday;<init>(Ljava/util/List;)V
    • ApplyEffectsConsumeEffect

      public ApplyEffectsConsumeEffect(StatusEffectInstance effect)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/item/consume/ApplyEffectsConsumeEffect;<init>(Lnet/minecraft/entity/effect/StatusEffectInstance;)V
      intermediary <init> Lnet/minecraft/class_10132;<init>(Lnet/minecraft/class_1293;)V
      official <init> Lday;<init>(Lbuo;)V
    • ApplyEffectsConsumeEffect

      public ApplyEffectsConsumeEffect(List<StatusEffectInstance> list, float float2)
  • Method Details

    • getType

      Specified by:
      getType in interface ConsumeEffect
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/item/consume/ConsumeEffect;getType()Lnet/minecraft/item/consume/ConsumeEffect$Type;
      intermediary method_62864 Lnet/minecraft/class_10134;method_62864()Lnet/minecraft/class_10134$class_10135;
      official a Ldba;a()Ldba$a;
    • onConsume

      public boolean onConsume(World world, ItemStack stack, LivingEntity user)
      Specified by:
      onConsume in interface ConsumeEffect
      Mappings:
      Namespace Name Mixin selector
      named onConsume Lnet/minecraft/item/consume/ConsumeEffect;onConsume(Lnet/minecraft/world/World;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_62866 Lnet/minecraft/class_10134;method_62866(Lnet/minecraft/class_1937;Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;)Z
      official a Ldba;a(Ldhh;Lcxo;Lbwf;)Z
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • effects

      public List<StatusEffectInstance> effects()
      Returns the value of the effects record component.
      Returns:
      the value of the effects record component
    • probability

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