How do I spawn potions with Command Blocks?

How do I spawn potions with Command Blocks? -

I want to get super speed, like a speed III for 1:00? I want it to be a splash potion that spawns from a command block, I know it can be done, since potions are entities.



Best Answer

You have to use the command /summon.

Summons an entity (mobs, projectiles, items, vehicles, etc.).

The entity for the Potion is called "ThrownPotion". If you want a special effect to that Potion you have to use a variable where you are able to configure the effect.

The whole command looks like this

/summon ThrownPotion ~ ~ ~ {Potion:{id:373,Damage:8226,Count:1}}

The ~ indicates the relative coordination to the commandblock (you can change it to the coordinations where you want to spawn the Potion otherwise the Potion is spawing in the commandblock).

The variable Damage is the effect it will have and count is the count of how many Potions will be spawned.

A list of the effects you find on the wiki.




Pictures about "How do I spawn potions with Command Blocks?"

How do I spawn potions with Command Blocks? -
How do I spawn potions with Command Blocks? - Unrecognizable woman holding paw of dog
How do I spawn potions with Command Blocks? - Crop hacker silhouette typing on computer keyboard while hacking system





How To Spawn Custom Potion Entities (Commands) (Minecraft 1.17)




More answers regarding how do I spawn potions with Command Blocks?

Answer 2

A more simple approach (and a more reliable approach) would be to use the /effect command directly. This directly gives the player a status effect as specified. The syntax is as follows:

/effect <player> <effect> [seconds] [amplifier] [hideParticles]

Where <effect> is the status effect id (e.g. 1, or minecraft:speed). So, for example, if you wanted Speed 3 for 60 seconds, the command is as follows:

/effect @p minecraft:speed 60 2

Note that amplifier is zero-indexed, that is to say that 0 corresponds to effect level 1.

Answer 3

/summon Item ~ ~1 ~ {Item:{id:373,Damage:16385,Count:1,tag:{CustomPotionEffects:[{Id:1,Amplifier:1,Duration:1000000,}],display:{Name:"Name of Item",Lore:["Line 1 of Lore","Line 2 of Lore"]}}}}

That command should summon a dropped potion.

Answer 4

If you are wanting the potion in your inventory rather than in effect, you will need to use droppers. Unfortunately they haven't made a way for a command block to do the job. Droppers should work well for a while. But this also means you must refill them often.

(I am using potions for a PvP map. If there is a different reason you want a potion-giving command, I probably don't have an answer, other then using your creative inventory or the answers above.)

Answer 5

/give @p minecraft:potion 1 18197
The 1897 is the code for splash potion of healing add a 1 in front for splash.

Answer 6

/give @p slash_potion (amount) (id 1-40)

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Geometric Photography, Geometric Photography, Ivan Babydov, Anete Lusina