Potions .java

net.minecraft.world.item.alchemy.Potions (class): members: LONG_FIRE_RESISTANCE, LONG_WATER_BREATHING, STRONG_TURTLE_MASTER, STRONG_REGENERATION, THICK.

net.minecraft.world.item.alchemyclass115 linescommon8.0 KB

API Surface (1)

Holder<Potion> bootstrap(final Registry<Potion> registry)

Fields & Constants (46)

WATER
MUNDANE
THICK
AWKWARD
NIGHT_VISION
LONG_NIGHT_VISION
INVISIBILITY
LONG_INVISIBILITY
LEAPING
LONG_LEAPING
STRONG_LEAPING
FIRE_RESISTANCE
LONG_FIRE_RESISTANCE
SWIFTNESS
LONG_SWIFTNESS
STRONG_SWIFTNESS
SLOWNESS
LONG_SLOWNESS
STRONG_SLOWNESS
TURTLE_MASTER
LONG_TURTLE_MASTER
STRONG_TURTLE_MASTER
WATER_BREATHING
LONG_WATER_BREATHING
HEALING
STRONG_HEALING
HARMING
STRONG_HARMING
POISON
LONG_POISON
STRONG_POISON
REGENERATION
LONG_REGENERATION
STRONG_REGENERATION
STRENGTH
LONG_STRENGTH
STRONG_STRENGTH
WEAKNESS
LONG_WEAKNESS
LUCK
SLOW_FALLING
LONG_SLOW_FALLING
WIND_CHARGED
WEAVING
OOZING
INFESTED

String literals (24)

"water"
"mundane"
"thick"
"awkward"
"night_vision"
"invisibility"
"leaping"
"fire_resistance"
"swiftness"
"slowness"
"turtle_master"
"water_breathing"
"healing"
"harming"
"poison"
"regeneration"
"strength"
"weakness"
"luck"
"slow_falling"
"wind_charged"
"weaving"
"oozing"
"infested"

Code Graph: Dependencies (7)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

Potions.java115 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.item.alchemy;
2
3
import net.minecraft.core.Holder;
4
import net.minecraft.core.Registry;
5
import net.minecraft.core.registries.BuiltInRegistries;
6
import net.minecraft.resources.ResourceKey;
7
import net.minecraft.world.effect.MobEffectInstance;
8
import net.minecraft.world.effect.MobEffects;
9
10
public class Potions {
11
	public static final Holder<Potion> WATER = register(PotionIds.WATER, new Potion("water"));
12
	public static final Holder<Potion> MUNDANE = register(PotionIds.MUNDANE, new Potion("mundane"));
13
	public static final Holder<Potion> THICK = register(PotionIds.THICK, new Potion("thick"));
14
	public static final Holder<Potion> AWKWARD = register(PotionIds.AWKWARD, new Potion("awkward"));
15
	public static final Holder<Potion> NIGHT_VISION = register(
16
		PotionIds.NIGHT_VISION, new Potion("night_vision", new MobEffectInstance(MobEffects.NIGHT_VISION, 3600))
17
	);
18
	public static final Holder<Potion> LONG_NIGHT_VISION = register(
19
		PotionIds.LONG_NIGHT_VISION, new Potion("night_vision", new MobEffectInstance(MobEffects.NIGHT_VISION, 9600))
20
	);
21
	public static final Holder<Potion> INVISIBILITY = register(
22
		PotionIds.INVISIBILITY, new Potion("invisibility", new MobEffectInstance(MobEffects.INVISIBILITY, 3600))
23
	);
24
	public static final Holder<Potion> LONG_INVISIBILITY = register(
25
		PotionIds.LONG_INVISIBILITY, new Potion("invisibility", new MobEffectInstance(MobEffects.INVISIBILITY, 9600))
26
	);
27
	public static final Holder<Potion> LEAPING = register(PotionIds.LEAPING, new Potion("leaping", new MobEffectInstance(MobEffects.JUMP_BOOST, 3600)));
28
	public static final Holder<Potion> LONG_LEAPING = register(PotionIds.LONG_LEAPING, new Potion("leaping", new MobEffectInstance(MobEffects.JUMP_BOOST, 9600)));
29
	public static final Holder<Potion> STRONG_LEAPING = register(
30
		PotionIds.STRONG_LEAPING, new Potion("leaping", new MobEffectInstance(MobEffects.JUMP_BOOST, 1800, 1))
31
	);
32
	public static final Holder<Potion> FIRE_RESISTANCE = register(
33
		PotionIds.FIRE_RESISTANCE, new Potion("fire_resistance", new MobEffectInstance(MobEffects.FIRE_RESISTANCE, 3600))
34
	);
35
	public static final Holder<Potion> LONG_FIRE_RESISTANCE = register(
36
		PotionIds.LONG_FIRE_RESISTANCE, new Potion("fire_resistance", new MobEffectInstance(MobEffects.FIRE_RESISTANCE, 9600))
37
	);
38
	public static final Holder<Potion> SWIFTNESS = register(PotionIds.SWIFTNESS, new Potion("swiftness", new MobEffectInstance(MobEffects.SPEED, 3600)));
39
	public static final Holder<Potion> LONG_SWIFTNESS = register(PotionIds.LONG_SWIFTNESS, new Potion("swiftness", new MobEffectInstance(MobEffects.SPEED, 9600)));
40
	public static final Holder<Potion> STRONG_SWIFTNESS = register(
41
		PotionIds.STRONG_SWIFTNESS, new Potion("swiftness", new MobEffectInstance(MobEffects.SPEED, 1800, 1))
42
	);
43
	public static final Holder<Potion> SLOWNESS = register(PotionIds.SLOWNESS, new Potion("slowness", new MobEffectInstance(MobEffects.SLOWNESS, 1800)));
44
	public static final Holder<Potion> LONG_SLOWNESS = register(PotionIds.LONG_SLOWNESS, new Potion("slowness", new MobEffectInstance(MobEffects.SLOWNESS, 4800)));
45
	public static final Holder<Potion> STRONG_SLOWNESS = register(
46
		PotionIds.STRONG_SLOWNESS, new Potion("slowness", new MobEffectInstance(MobEffects.SLOWNESS, 400, 3))
47
	);
48
	public static final Holder<Potion> TURTLE_MASTER = register(
49
		PotionIds.TURTLE_MASTER,
50
		new Potion("turtle_master", new MobEffectInstance(MobEffects.SLOWNESS, 400, 3), new MobEffectInstance(MobEffects.RESISTANCE, 400, 2))
51
	);
52
	public static final Holder<Potion> LONG_TURTLE_MASTER = register(
53
		PotionIds.LONG_TURTLE_MASTER,
54
		new Potion("turtle_master", new MobEffectInstance(MobEffects.SLOWNESS, 800, 3), new MobEffectInstance(MobEffects.RESISTANCE, 800, 2))
55
	);
56
	public static final Holder<Potion> STRONG_TURTLE_MASTER = register(
57
		PotionIds.STRONG_TURTLE_MASTER,
58
		new Potion("turtle_master", new MobEffectInstance(MobEffects.SLOWNESS, 400, 5), new MobEffectInstance(MobEffects.RESISTANCE, 400, 3))
59
	);
60
	public static final Holder<Potion> WATER_BREATHING = register(
61
		PotionIds.WATER_BREATHING, new Potion("water_breathing", new MobEffectInstance(MobEffects.WATER_BREATHING, 3600))
62
	);
63
	public static final Holder<Potion> LONG_WATER_BREATHING = register(
64
		PotionIds.LONG_WATER_BREATHING, new Potion("water_breathing", new MobEffectInstance(MobEffects.WATER_BREATHING, 9600))
65
	);
66
	public static final Holder<Potion> HEALING = register(PotionIds.HEALING, new Potion("healing", new MobEffectInstance(MobEffects.INSTANT_HEALTH, 1)));
67
	public static final Holder<Potion> STRONG_HEALING = register(
68
		PotionIds.STRONG_HEALING, new Potion("healing", new MobEffectInstance(MobEffects.INSTANT_HEALTH, 1, 1))
69
	);
70
	public static final Holder<Potion> HARMING = register(PotionIds.HARMING, new Potion("harming", new MobEffectInstance(MobEffects.INSTANT_DAMAGE, 1)));
71
	public static final Holder<Potion> STRONG_HARMING = register(
72
		PotionIds.STRONG_HARMING, new Potion("harming", new MobEffectInstance(MobEffects.INSTANT_DAMAGE, 1, 1))
73
	);
74
	public static final Holder<Potion> POISON = register(PotionIds.POISON, new Potion("poison", new MobEffectInstance(MobEffects.POISON, 900)));
75
	public static final Holder<Potion> LONG_POISON = register(PotionIds.LONG_POISON, new Potion("poison", new MobEffectInstance(MobEffects.POISON, 1800)));
76
	public static final Holder<Potion> STRONG_POISON = register(PotionIds.STRONG_POISON, new Potion("poison", new MobEffectInstance(MobEffects.POISON, 432, 1)));
77
	public static final Holder<Potion> REGENERATION = register(
78
		PotionIds.REGENERATION, new Potion("regeneration", new MobEffectInstance(MobEffects.REGENERATION, 900))
79
	);
80
	public static final Holder<Potion> LONG_REGENERATION = register(
81
		PotionIds.LONG_REGENERATION, new Potion("regeneration", new MobEffectInstance(MobEffects.REGENERATION, 1800))
82
	);
83
	public static final Holder<Potion> STRONG_REGENERATION = register(
84
		PotionIds.STRONG_REGENERATION, new Potion("regeneration", new MobEffectInstance(MobEffects.REGENERATION, 450, 1))
85
	);
86
	public static final Holder<Potion> STRENGTH = register(PotionIds.STRENGTH, new Potion("strength", new MobEffectInstance(MobEffects.STRENGTH, 3600)));
87
	public static final Holder<Potion> LONG_STRENGTH = register(PotionIds.LONG_STRENGTH, new Potion("strength", new MobEffectInstance(MobEffects.STRENGTH, 9600)));
88
	public static final Holder<Potion> STRONG_STRENGTH = register(
89
		PotionIds.STRONG_STRENGTH, new Potion("strength", new MobEffectInstance(MobEffects.STRENGTH, 1800, 1))
90
	);
91
	public static final Holder<Potion> WEAKNESS = register(PotionIds.WEAKNESS, new Potion("weakness", new MobEffectInstance(MobEffects.WEAKNESS, 1800)));
92
	public static final Holder<Potion> LONG_WEAKNESS = register(PotionIds.LONG_WEAKNESS, new Potion("weakness", new MobEffectInstance(MobEffects.WEAKNESS, 4800)));
93
	public static final Holder<Potion> LUCK = register(PotionIds.LUCK, new Potion("luck", new MobEffectInstance(MobEffects.LUCK, 6000)));
94
	public static final Holder<Potion> SLOW_FALLING = register(
95
		PotionIds.SLOW_FALLING, new Potion("slow_falling", new MobEffectInstance(MobEffects.SLOW_FALLING, 1800))
96
	);
97
	public static final Holder<Potion> LONG_SLOW_FALLING = register(
98
		PotionIds.LONG_SLOW_FALLING, new Potion("slow_falling", new MobEffectInstance(MobEffects.SLOW_FALLING, 4800))
99
	);
100
	public static final Holder<Potion> WIND_CHARGED = register(
101
		PotionIds.WIND_CHARGED, new Potion("wind_charged", new MobEffectInstance(MobEffects.WIND_CHARGED, 3600))
102
	);
103
	public static final Holder<Potion> WEAVING = register(PotionIds.WEAVING, new Potion("weaving", new MobEffectInstance(MobEffects.WEAVING, 3600)));
104
	public static final Holder<Potion> OOZING = register(PotionIds.OOZING, new Potion("oozing", new MobEffectInstance(MobEffects.OOZING, 3600)));
105
	public static final Holder<Potion> INFESTED = register(PotionIds.INFESTED, new Potion("infested", new MobEffectInstance(MobEffects.INFESTED, 3600)));
106
107
	private static Holder<Potion> register(final ResourceKey<Potion> key, final Potion potion) {
108
		return Registry.registerForHolder(BuiltInRegistries.POTION, key, potion);
109
	}
110
111
	public static Holder<Potion> bootstrap(final Registry<Potion> registry) {
112
		return WATER;
113
	}
114
}
115

Decompiled Minecraft 26.3 source of Potions (net/minecraft/world/item/alchemy/Potions.java) with Mojang official mappings, stored verbatim on the site.