Potion
Syntax¶
Potions are created using the pot
constructor. Like all constructors in Terracotta, the values passed into the constructor are Expressions and can take full advantage of their features.
Amplifier
is optional and will default to 1
if omitted.
Duration
is specified in ticks, meaning a duration of 20
is equal to one second. Duration
is optional and will default to infinite if omitted.
# Terracotta can pre-calculate `15*20` as `300` and insert `300` directly into
# the potion item meaning you can safely do multiplications like this without
# creating extra codeblocks. Both examples will compile to the exact same code.
pot("Regeneration", 1, 15*20)
pot("Regeneration", 1, 300)
Potion
is the name of the potion that appears at the top of a potion effect's button, NOT its minecraft id.
Operations¶
txt
+ pot
: txt
¶
Converts the right Potion into a String then adds it onto the end of the left Styled Text.
pot
+ txt
: txt
¶
Converts the left Potion into a String then adds it at the beginning of the right Styled Text.