Skip to content

Potion Sets

totemo edited this page Feb 16, 2020 · 16 revisions

Start: Home ⬩ Previous: Zones ⬩ Next: Disguises
See also: Potion Set Command Reference


Potions Sets randomly select one or more potion effects to apply to a mob or player. They are like Loot Tables, except that they only drop potion effects. Unlike Loot Tables, Potion Sets do not support the weighted selection of just a single option; Potion Sets always process the probabilities of all entries in the set independently and therefore can select multiple entries.

Command Interface Overview

The /beast-potion command manipulates Potion Sets. You use /beast-potion add <potion-set-id> to create a new Potion Set and then add potion effects to it with /beast-potion add-potion ....

You can show the current contents of a Potion Set with /beast-potion info <potion-set-id> and list all existing Potion Sets with /beast-potion list.

For a custom mob to utilise a Potion Set, you must set its potion-buffs and/or attack-potions properties to the identifier of the Potion Set that selects potion effects to apply.

Commands for manipulating potions sets are documented in the Potion Set Command Reference.

You can type /beast-potion add-potion to list all available potion types.

Example: Potion Buffs Given to a Mob

Let's create a wasp mob from an invisible vex wearing a custom player head.

Firstly, define items for the wasp to wear as its head and wings, while holding the custom head and a set of elytras, respectively:

/beast-item define wasp-head
/beast-item define elytras 

Define a Potion Set called wasp-buffs containing the potions to be applied to the wasp:

/beast-potion add wasp-buffs
/beast-potion add-potion wasp-buffs 100 inf invisibility 1
/beast-potion add-potion wasp-buffs 100 inf increase_damage 3

The wasp-buffs will have a 100% chance of imparting infinite duration invisibility and 100% chance of imparting strength 3 to the wasp.

Now we define the custom mob:

/beast-mob add wasp vex
/beast-mob set wasp main-hand air
/beast-mob set wasp helmet wasp-head
/beast-mop set wasp helmet-drop-percent 1
/beast-mob set wasp chest-plate elytras
/beast-mop set wasp chest-plate-drop-percent 0
/beast-mob set wasp potion-buffs wasp-buffs

The main-hand property is set to the built-in item air in order to remove the iron sword that vexes normally carry. The drop chance of the helmet slot is set to 1%, and we completely disallow the elytra drop. If you don't set ...-drop-percent properties, vanilla Minecraft drop rates will apply.

Finally, we test the mob by spawning it at the current location:

/beast-mob spawn wasp here

Example: Attack Potions Imparted by a Mob

The attack-potions property of custom mobs specifies the ID of a Potion Set that imparts effects on the victim of a custom mob's attacks. The potions are applied both when the mob directly strikes a player and when a projectile fired by the mob damages a player.

First, let's create a potion set containing the attack potions:

/beast-potion add wasp-attacks
/beast-potion add-potion wasp-attacks 50 30 weakness 1
/beast-potion add-potion wasp-attacks 50 30 confusion 4
/beast-potion add-potion wasp-attacks 25 10 poison 1

The attacks include a 50% chance of 30 seconds of weakness, a 50% chance of 30 seconds of confusion and a 25% chance of 10 seconds of poison. Note that these probabilities are independent, meaning that none, all or just some of these potion effects could be applied in a single strike.

Then we configure the wasp to use the potion set and spawn a test mob:

/beast-mob set wasp attack-potions wasp-attacks
/beast-mob spawn wasp here

If, for example, you wanted to apply all the same potions to every arrow fired by a vanilla Minecraft skeleton, you could do the following:

/beast-mob set skeleton attack-potions wasp-attacks

and of course, you can get skeletons back to normal with:

/beast-mob clear skeleton attack-potions

Start: Home ⬩ Previous: Zones ⬩ Next: Disguises