ItemComponent - Potion Contents Component Apply (Section) — SkBee
Addon: SkBee · Category: Section · Since: 3.8.1
Syntax
apply potion contents [component] to %itemstacks/itemtypes/slots%Description
Apply a potion contents component to an item (can be used on a potion/arrow or any consumable item). See [**Potion Contents Component**](https://minecraft.wiki/w/Data_component_format#potion_contents) on McWiki for more info. Note: `potion` and `custom_effects` entries cannot be used together.
**Entries**: - `potion` = The base potion of the item. - `custom_color` = The overriding color of this potion texture, and/or the particles of the area effect cloud created. - `custom_name` = An optional string used to generate containing stack name. (See McWiki for more details on this) [Optional] - `custom_effects` = A list of the additional effects that this item should apply. [Optional]
Examples
apply potion contents to {_i}:
potion: long_swiftness
custom_color: rgb(126, 207, 243)
apply potion contents component to {_i}:
custom_color: pink
custom_name: "harming"
custom_effects:
apply -> potion effect of night vision for 5 minutes
apply -> potion effect of slowness for 6 minutes
set {_i} to 1 of potion
set {_pe::*} to active potion effects of player
apply potion contents to {_i}:
custom_color: rgb(126, 207, 243)
custom_effects:
apply -> {_pe::*}
give {_i} to player