net.minecraft.world.item.alchemy

public record PotionContents

implements ConsumableListener

czo
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>>
d
potion
comp_2378
potion
private final Optional<Integer>
e
customColor
comp_2379
customColor
private final List<MobEffectInstance>
f
customEffects
comp_2380
customEffects
private final Optional<String>
g
customName
comp_3209
customName
public static final PotionContents
a
EMPTY
field_49274
DEFAULT
private static final Component
h
NO_EFFECT
field_25817
NONE_TEXT
private static final int
i
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>
b
CODEC
field_49275
CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, PotionContents>
c
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(cxl arg0, jq<czm> 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(jq<czm> 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<bup> arg0)
forEachEffect(Consumer<MobEffectInstance> arg0)
method_57402(Consumer<class_1293> arg0)
forEachEffect(Consumer<StatusEffectInstance> effectConsumer)
public PotionContents
b(jq<czm> arg0)
withPotion(Holder<Potion> arg0)
method_57403(class_6880<class_1842> arg0)
with(RegistryEntry<Potion> potion)
public PotionContents
a(bup arg0)
withEffectAdded(MobEffectInstance arg0)
method_57398(class_1293 arg0)
with(StatusEffectInstance customEffect)
public int
b()
getColor()
method_8064()
getColor()
public static int
c(jq<czm> arg0)
getColor(Holder<Potion> arg0)
method_8062(class_6880<class_1842> arg0)
getColor(RegistryEntry<Potion> potion)
public static int
a(Iterable<bup> arg0)
getColor(Iterable<MobEffectInstance> arg0)
method_8055(Iterable<class_1293> arg0)
getColor(Iterable<StatusEffectInstance> effects)
public Component
a(String arg0)
getName(String arg0)
method_64195(String arg0)
getName(String prefix)
public static OptionalInt
b(Iterable<bup> 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<xv> 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(bwg arg0)
applyToLivingEntity(LivingEntity arg0)
method_62839(class_1309 arg0)
apply(LivingEntity user)
public static void
a(Iterable<bup> arg0, Consumer<xv> 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(dhi arg0, bwg arg1, cxp arg2, czv 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()