net.minecraft.world.item.alchemy

public record PotionContents

implements ConsumableListener

cyp
net.minecraft.world.item.alchemy.PotionContents
net.minecraft.class_1844
net.minecraft.component.type.PotionContentsComponent
net.minecraft.world.item.alchemy.PotionContents

Field summary

Modifier and TypeField
private final Optional<Holder<Potion>>
e
potion
comp_2378
potion
private final Optional<Integer>
f
customColor
comp_2379
customColor
private final List<MobEffectInstance>
g
customEffects
comp_2380
customEffects
private final Optional<String>
h
customName
comp_3209
customName
public static final PotionContents
a
EMPTY
field_49274
DEFAULT
private static final Component
i
NO_EFFECT
field_25817
NONE_TEXT
public static final int
b
BASE_POTION_COLOR
field_49277
EFFECTLESS_COLOR
private static final com.mojang.serialization.Codec<PotionContents>
j
FULL_CODEC
field_49749
BASE_CODEC
public static final com.mojang.serialization.Codec<PotionContents>
c
CODEC
field_49275
CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, PotionContents>
d
STREAM_CODEC
field_49276
PACKET_CODEC

Constructor summary

ModifierConstructor
public (Holder<Potion> potion)
public (Optional<Holder<Potion>> arg0, Optional<Integer> arg1, List<MobEffectInstance> arg2, Optional<String> arg3)

Method summary

Modifier and TypeMethod
public static ItemStack
a(cwm arg0, jr<cyn> arg1)
createItemStack(Item arg0, Holder<Potion> arg1)
method_57400(class_1792 arg0, class_6880<class_1842> arg1)
createStack(Item item, RegistryEntry<Potion> potion)
public boolean
a(jr<cyn> arg0)
is(Holder<Potion> arg0)
method_57401(class_6880<class_1842> arg0)
matches(RegistryEntry<Potion> potion)
public Iterable<MobEffectInstance>
a()
getAllEffects()
method_57397()
getEffects()
public void
a(Consumer<btr> arg0)
forEachEffect(Consumer<MobEffectInstance> arg0)
method_57402(Consumer<class_1293> arg0)
forEachEffect(Consumer<StatusEffectInstance> effectConsumer)
public PotionContents
b(jr<cyn> arg0)
withPotion(Holder<Potion> arg0)
method_57403(class_6880<class_1842> arg0)
with(RegistryEntry<Potion> potion)
public PotionContents
a(btr arg0)
withEffectAdded(MobEffectInstance arg0)
method_57398(class_1293 arg0)
with(StatusEffectInstance customEffect)
public int
b()
getColor()
method_8064()
getColor()
public int
a(int arg0)
getColorOr(int arg0)
method_65361(int arg0)
getColor(int defaultColor)
public Component
a(String arg0)
getName(String arg0)
method_64195(String arg0)
getName(String prefix)
public static OptionalInt
a(Iterable<btr> arg0)
getColorOptional(Iterable<MobEffectInstance> arg0)
method_58111(Iterable<class_1293> arg0)
mixColors(Iterable<StatusEffectInstance> effects)
public boolean
c()
hasEffects()
method_57405()
hasEffects()
public List<MobEffectInstance>
d()
customEffects()
comp_2380()
customEffects()
public void
a(Consumer<wp> arg0, float arg1, float arg2)
addPotionTooltip(Consumer<Component> arg0, float arg1, float arg2)
method_47372(Consumer<class_2561> arg0, float arg1, float arg2)
buildTooltip(Consumer<Text> textConsumer, float durationMultiplier, float tickRate)
public void
a(bvi arg0)
applyToLivingEntity(LivingEntity arg0)
method_62839(class_1309 arg0)
apply(LivingEntity user)
public static void
a(Iterable<btr> arg0, Consumer<wp> arg1, float arg2, float arg3)
addPotionTooltip(Iterable<MobEffectInstance> arg0, Consumer<Component> arg1, float arg2, float arg3)
method_8065(Iterable<class_1293> arg0, Consumer<class_2561> arg1, float arg2, float arg3)
buildTooltip(Iterable<StatusEffectInstance> effects, Consumer<Text> textConsumer, float durationMultiplier, float tickRate)
public void
a(dgj arg0, bvi arg1, cwq arg2, cyw arg3)
onConsume(Level arg0, LivingEntity arg1, ItemStack arg2, Consumable arg3)
method_62831(class_1937 arg0, class_1309 arg1, class_1799 arg2, class_10124 arg3)
onConsume(World arg0, LivingEntity arg1, ItemStack arg2, ConsumableComponent arg3)
public Optional<Holder<Potion>>
e()
potion()
comp_2378()
potion()
public Optional<Integer>
f()
customColor()
comp_2379()
customColor()
public Optional<String>
g()
customName()
comp_3209()
customName()