Package net.minecraft.item.consume
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/ApplyEffectsConsumeEffectintermediary net/minecraft/class_10132official ddwnamed effectsintermediary comp_3094official cnamed probabilityintermediary comp_3095official f
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.item.consume.ConsumeEffect
ConsumeEffect.Type<T extends ConsumeEffect> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ApplyEffectsConsumeEffect> private final List<StatusEffectInstance> The field for theeffectsrecord component.static final PacketCodec<RegistryByteBuf, ApplyEffectsConsumeEffect> private final floatThe field for theprobabilityrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionApplyEffectsConsumeEffect(List<StatusEffectInstance> list, float float2) ApplyEffectsConsumeEffect(StatusEffectInstance effect, float probability) -
Method Summary
Modifier and TypeMethodDescriptioneffects()Returns the value of theeffectsrecord component.final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.booleanonConsume(World world, ItemStack stack, LivingEntity user) floatReturns the value of theprobabilityrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
effects
The field for theeffectsrecord component. -
probability
private final float probabilityThe field for theprobabilityrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/item/consume/ApplyEffectsConsumeEffect;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_53803Lnet/minecraft/class_10132;field_53803:Lcom/mojang/serialization/MapCodec;official aLddw;a:Lcom/mojang/serialization/MapCodec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/item/consume/ApplyEffectsConsumeEffect;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_53804Lnet/minecraft/class_10132;field_53804:Lnet/minecraft/class_9139;official bLddw;b:Lze;
-
-
Constructor Details
-
ApplyEffectsConsumeEffect
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/consume/ApplyEffectsConsumeEffect;<init>(Lnet/minecraft/entity/effect/StatusEffectInstance;F)Vintermediary <init>Lnet/minecraft/class_10132;<init>(Lnet/minecraft/class_1293;F)Vofficial <init>Lddw;<init>(Lbwi;F)V
-
ApplyEffectsConsumeEffect
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/consume/ApplyEffectsConsumeEffect;<init>(Ljava/util/List;)Vintermediary <init>Lnet/minecraft/class_10132;<init>(Ljava/util/List;)Vofficial <init>Lddw;<init>(Ljava/util/List;)V
-
ApplyEffectsConsumeEffect
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/consume/ApplyEffectsConsumeEffect;<init>(Lnet/minecraft/entity/effect/StatusEffectInstance;)Vintermediary <init>Lnet/minecraft/class_10132;<init>(Lnet/minecraft/class_1293;)Vofficial <init>Lddw;<init>(Lbwi;)V
-
ApplyEffectsConsumeEffect
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceConsumeEffect- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/item/consume/ConsumeEffect;getType()Lnet/minecraft/item/consume/ConsumeEffect$Type;intermediary method_62864Lnet/minecraft/class_10134;method_62864()Lnet/minecraft/class_10134$class_10135;official aLddy;a()Lddy$a;
-
onConsume
- Specified by:
onConsumein interfaceConsumeEffect- Mappings:
Namespace Name Mixin selector named onConsumeLnet/minecraft/item/consume/ConsumeEffect;onConsume(Lnet/minecraft/world/World;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;)Zintermediary method_62866Lnet/minecraft/class_10134;method_62866(Lnet/minecraft/class_1937;Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;)Zofficial aLddy;a(Ldkj;Ldak;Lbyf;)Z
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
effects
Returns the value of theeffectsrecord component.- Returns:
- the value of the
effectsrecord component
-
probability
public float probability()Returns the value of theprobabilityrecord component.- Returns:
- the value of the
probabilityrecord component
-