Functions.
Every function a value can use, with its parameters and what it gives back.
Players.
The player
The player in context: the event's player, or the loop's.
the player
The victim
The event's second player: who was attacked or killed.
the victim
Everyone
Everyone in the challenge.
everyone
Everyone else
Everyone in the challenge but the player in context.
everyone else
A random player
One player of the challenge, at random.
a random player
The nearest other player
The other player nearest the player in context, in the same world.
the nearest other player
Team of
The id of the team a player is on, or nothing.
the team of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Players on a team
Everyone on a team.
the players on team team
Parameters
- team
- a team's id, required. The team's id.
Is on a team
Whether a player is on a team.
of is on team team
Parameters
- team
- a team's id, required. The team's id.
- of
- a player, optional. Which player; the player in context when left out.
Nearest player
The player nearest a place.
the nearest player to to among of
Parameters
- to
- a place, required. The place to measure from.
- of
- players, optional. Which players to choose from; everyone when left out.
Farthest player
The player farthest from a place.
the farthest player from to among of
Parameters
- to
- a place, required. The place to measure from.
- of
- players, optional. Which players to choose from; everyone when left out.
Player named
The player with this name, or nobody.
the player named name
Parameters
- name
- text, required. The player's name.
Name
A player's name.
the name of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Health
Health points (2 is a heart).
the health of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Maximum health
Maximum health points.
the maximum health of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Hunger
Hunger, 0 to 20.
the hunger of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Saturation
Saturation, 0 to 20.
the saturation of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Level
Experience level.
the level of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Experience
Experience points in all.
the experience of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Armour
Armour points.
the armour of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Air
Breath left, in ticks (300 when full).
the air of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Absorption
Absorption health points.
the absorption of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Light
The light level where the player stands, 0 to 15.
the light at of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Is
Whether a player is doing something: sneaking, flying and so on.
of is state
Parameters
- state
- sneaking, sprinting, flying, gliding, swimming, in_water, in_lava, on_ground, on_fire, sleeping, blocking or in_vehicle, required. What to check.
- of
- a player, optional. Which player; the player in context when left out.
Holding
Whether a player holds one of these items.
of holds items in the hand
Parameters
- items
- items, required. Ids, tags and custom items; any of them counts.
- hand
- main, off or either, optional. Which hand; either when left out.
- of
- a player, optional. Which player; the player in context when left out.
Has item
Whether a player carries these items.
of has count of items
Parameters
- items
- items, required. Ids, tags and custom items; any of them counts.
- count
- a whole number, 1 to 2304, optional. How many at least; 1 when left out.
- of
- a player, optional. Which player; the player in context when left out.
Wearing
Whether a player wears one of these items.
of wears items on the slot
Parameters
- items
- items, required. Ids, tags and custom items; any of them counts.
- slot
- head, chest, legs, feet or any, optional. Which armour slot; any when left out.
- of
- a player, optional. Which player; the player in context when left out.
Has effect
Whether a player has a potion effect.
of has effect
Parameters
- effect
- an effect, required. The effect.
- of
- a player, optional. Which player; the player in context when left out.
Game mode
survival, creative, adventure or spectator.
the game mode of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Held item
What a player holds in the main hand, or nothing.
what of holds
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Offhand item
What a player holds in the other hand, or nothing.
what of holds in the other hand
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Block below
The block under a player's feet.
the block under of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Block looked at
The block a player looks at, up to 64 blocks away.
the block of looks at
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Is alive
Whether a player is alive and in survival or adventure mode.
of is alive
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Dimension
The id of the dimension a player is in.
the dimension of of
Parameters
- of
- a player, optional. Which player; the player in context when left out.
In dimension
Whether a player is in one of these dimensions.
of is in dimensions
Parameters
- dimensions
- dimensions, tags included, required. Any of them counts.
- of
- a player, optional. Which player; the player in context when left out.
In biome
Whether a player stands in one of these biomes.
of is in biomes
Parameters
- biomes
- biomes, tags included, required. Any of them counts.
- of
- a player, optional. Which player; the player in context when left out.
Mobs.
Mobs tagged
Every mob carrying a tag, in the challenge's worlds.
the mobs tagged tag
Parameters
- tag
- a name, required. The tag, as spawn_mob and tag give it.
Mobs near
The mobs within some blocks of a place, nearest first.
the mobs within radius blocks of place of kind of
Parameters
- place
- a place, required. The centre.
- radius
- a number, 1 to 256, required. In blocks.
- of
- kinds of mob, optional. Only these kinds; any kind when left out.
Entities near
Everything within some blocks of a place, nearest first: mobs, players, dropped items and the rest.
the entities within radius blocks of place
Parameters
- place
- a place, required. The centre.
- radius
- a number, 1 to 256, required. In blocks.
Dropped items near
The items lying within some blocks of a place, nearest first.
the dropped items within radius blocks of place of of
Parameters
- place
- a place, required. The centre.
- radius
- a number, 1 to 256, required. In blocks.
- of
- items, optional. Only these items; any when left out.
Item of
What a dropped item is; nothing for anything else.
the item entity is
Parameters
- entity
- an entity, required. The dropped item.
Kind of mob
What kind a mob is.
the kind of mob
Parameters
- mob
- a mob, required. The mob.
Is kind of mob
Whether a mob is one of these kinds.
mob is types
Parameters
- mob
- a mob, required. The mob.
- types
- kinds of mob, required. Any of them counts.
Has tag
Whether a mob carries a tag.
mob is tagged tag
Parameters
- mob
- a mob, required. The mob.
- tag
- a name, required. The tag.
Mob health
A mob's health points.
the health of mob
Parameters
- mob
- a mob, required. The mob.
Mob maximum health
A mob's maximum health points.
the maximum health of mob
Parameters
- mob
- a mob, required. The mob.
Mobs exist
Whether at least some mobs match.
mobs exist, at least count
Parameters
- mobs
- mobs, required. Which mobs.
- count
- a whole number, 1 to 1000, optional. How many at least; 1 when left out.
Vectors.
Vector
A direction with a strength, by its parts.
(x, y, z)
Parameters
- x
- a number, required. East.
- y
- a number, required. Up.
- z
- a number, required. South.
Direction
The way from one place to another, one block long.
the direction from from to to
Parameters
- from
- a place, required. Where it starts.
- to
- a place, required. Where it points.
Facing
The way a player looks, one block long.
the way of faces
Parameters
- of
- a player, optional. Which player; the player in context when left out.
Up
Straight up, one block long.
up
Scale
A vector made longer or shorter.
vector times by
Parameters
- vector
- a vector, required. The vector.
- by
- a number, required. How many times.
Places.
Place of
Where a player, mob, block or chunk is.
where of is
Parameters
- of
- anything, optional. The player, mob, block or chunk; the player in context when left out.
Coordinates
A place by its coordinates.
x, y, z in world
Parameters
- x
- a number, required. East.
- y
- a number, required. Up.
- z
- a number, required. South.
- world
- a dimension, optional. Which dimension; the challenge's main world when left out.
Offset
A place moved by some blocks.
place moved by x, y, z
Parameters
- place
- a place, required. The place to move.
- x
- a number, optional. Blocks east.
- y
- a number, optional. Blocks up.
- z
- a number, optional. Blocks south.
Spread
A place moved up to some blocks away horizontally, at random.
place spread radius blocks
Parameters
- place
- a place, required. The centre.
- radius
- a number, 0 to 256, required. How far at most.
On the surface
A place lifted onto the highest block there.
place on the surface
Parameters
- place
- a place, required. The place.
Where the player looks
The block a player looks at (up to 64 away), or the point 64 blocks along their view.
where of looks
Parameters
- of
- a player, optional. Which player; the player in context when left out.
The spawn
The challenge's main world's spawn.
the spawn
X of
A place's east coordinate.
the x of place
Parameters
- place
- a place, required. The place.
Y of
A place's height.
the y of place
Parameters
- place
- a place, required. The place.
Z of
A place's south coordinate.
the z of place
Parameters
- place
- a place, required. The place.
Distance
Blocks between two places; 1,000,000,000 when they are in different worlds.
the distance from a to b
Parameters
- a
- a place, required. One place.
- b
- a place, required. The other.
Top height
The height just above the highest block at a place.
the top height at place
Parameters
- place
- a place, required. The place.
World border
The world border's width in blocks.
the world border's size
Box between
The box of blocks between two places, corners included.
the box from from to to
Parameters
- from
- a place, required. One corner.
- to
- a place, required. The other corner.
Box around
A box of blocks centred on a place.
a width by height by depth box around center
Parameters
- center
- a place, required. The middle of the box.
- width
- a whole number, 1 to 512, required. Blocks along X, 1 to 512.
- height
- a whole number, 1 to 512, required. Blocks along Y, 1 to 512.
- depth
- a whole number, 1 to 512, required. Blocks along Z, 1 to 512.
All of a chunk
A chunk's whole column of blocks, bottom to top.
all of chunk
Parameters
- chunk
- a chunk, required. The chunk.
Chunk at
The chunk a place is in.
the chunk at place
Parameters
- place
- a place, required. The place.
Loaded chunks
Every chunk loaded in the world.
the loaded chunks of world
Parameters
- world
- a dimension, optional. Which dimension; the challenge's main world when left out.
Chunks near
The chunks within some chunks of a place, nearest first.
the chunks within radius chunks of place
Parameters
- place
- a place, required. The middle.
- radius
- a whole number, 0 to 16, required. How many chunks out, 0 to 16.
Chunk X
A chunk's X coordinate.
the chunk x of chunk
Parameters
- chunk
- a chunk, required. The chunk.
Chunk Z
A chunk's Z coordinate.
the chunk z of chunk
Parameters
- chunk
- a chunk, required. The chunk.
Biome at
The biome's id at a place.
the biome at place
Parameters
- place
- a place, required. The place.
Blocks.
Block at
The block at a place.
the block at place
Parameters
- place
- a place, required. The place.
Kind of block
What kind of block a block is.
the kind of block
Parameters
- block
- a block, required. The block.
Is air
Whether a block is air.
block is air
Parameters
- block
- a block, required. The block.
Is kind of block
Whether a block is one of these kinds.
block is types
Parameters
- block
- a block, required. The block.
- types
- kinds of block, required. Ids and tags; any of them counts.
Is solid
Whether a block stands in the way.
block is solid
Parameters
- block
- a block, required. The block.
Blocks in
The blocks of a box, all of them or only some kinds; a loop walks them a few at a time.
the blocks in area of of
Parameters
- area
- an area, required. The box of blocks.
- of
- kinds of block, optional. Only these kinds; ids and tags.
Layer
The blocks at one height across chunks: the loaded ones when left out.
layer y of of
Parameters
- y
- a whole number, -64 to 319, required. The height.
- of
- chunks, optional. Which chunks; every loaded chunk when left out.
Same spot in
The block at the same spot of another chunk.
block's spot in chunk
Parameters
- block
- a block, required. The block.
- chunk
- a chunk, required. The other chunk.
Kinds.
Random item
One of these items at random, or any survival item.
a random item of of
Parameters
- of
- items, optional. Ids and tags to pick from; any survival item when left out.
- seed
- text, optional. Text that makes the pick the same every time it is the same.
Random block
One of these blocks at random, or any block that can be placed.
a random block of of
Parameters
- of
- kinds of block, optional. Ids and tags to pick from; any placeable block when left out.
- seed
- text, optional. Text that makes the pick the same every time it is the same.
Random mob kind
One of these kinds at random, or any mob that can be spawned.
a random mob kind of of
Parameters
- of
- kinds of mob, optional. Ids and tags to pick from; any spawnable mob when left out.
- seed
- text, optional. Text that makes the pick the same every time it is the same.
Is one of
Whether an item, block or mob kind is one of these.
value is kinds
Parameters
- value
- anything, required. The item, block kind or mob kind.
- kinds
- a list of anything, required. Ids and tags; any of them counts.
Name of
How the game names an item, block, mob kind or anything else.
the name of of
Parameters
- of
- anything, required. The thing to name.
Numbers.
Add
The sum.
a + b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Subtract
The difference.
a − b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Multiply
The product.
a × b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Divide
The quotient; dividing by zero gives 0.
a ÷ b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Remainder
What is left after dividing.
the remainder of a ÷ b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
The lower
The lower of two numbers.
the lower of a and b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
The higher
The higher of two numbers.
the higher of a and b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Power
A number raised to a power.
a to the power b
Parameters
- a
- a number, required. The base.
- b
- a number, required. The power.
Absolute
A number without its sign.
the size of n
Parameters
- n
- a number, required. The number.
Round down
The whole number below.
n rounded down
Parameters
- n
- a number, required. The number.
Round up
The whole number above.
n rounded up
Parameters
- n
- a number, required. The number.
Round
The nearest whole number.
n rounded
Parameters
- n
- a number, required. The number.
Random number
A whole number from the first to the second, both included.
a random number from min to max
Parameters
- min
- a number, required. The lowest.
- max
- a number, required. The highest.
- seed
- text, optional. Text that makes the pick the same every time it is the same.
Random decimal
A decimal from the first up to the second.
a random decimal from min to max
Parameters
- min
- a number, required. The lowest.
- max
- a number, required. The highest.
- seed
- text, optional. Text that makes the pick the same every time it is the same.
Keep between
A number kept within bounds.
n kept between min and max
Parameters
- n
- a number, required. The number.
- min
- a number, required. The lower bound.
- max
- a number, required. The upper bound.
Logic.
And
Both hold.
a and b
Parameters
- a
- yes or no, required. One check.
- b
- yes or no, required. The other.
Or
Either holds.
a or b
Parameters
- a
- yes or no, required. One check.
- b
- yes or no, required. The other.
Not
The opposite.
not a
Parameters
- a
- yes or no, required. The check.
Equals
Whether two values are the same.
a is b
Parameters
- a
- anything, required. One value.
- b
- anything, required. The other.
Is not
Whether two values differ.
a is not b
Parameters
- a
- anything, required. One value.
- b
- anything, required. The other.
Is below
Less than.
a is below b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Is at most
Less than or equal.
a is at most b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Is above
Greater than.
a is above b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Is at least
Greater than or equal.
a is at least b
Parameters
- a
- a number, required. One number.
- b
- a number, required. The other.
Chance
Holds this percent of the time, at random.
a percent% chance
Parameters
- percent
- a number, 0 to 100, required. 0 to 100.
Is nothing
Whether a value is empty: nobody, nowhere, nothing.
of is nothing
Parameters
- of
- anything, required. The value.
Is empty
Whether a list has nothing in it.
of is empty
Parameters
- of
- a list of anything, required. The list.
If, else
One value or the other, by a check.
then if condition, else else
Parameters
- condition
- yes or no, required. The check.
- then
- anything, required. The value when it holds.
- else
- anything, required. The value when it doesn't.
Lists.
How many
How many things a list holds.
how many of
Parameters
- of
- a list of anything, required. The list.
The first
The first thing in a list, or nothing.
the first of of
Parameters
- of
- a list of anything, required. The list.
The last
The last thing in a list, or nothing.
the last of of
Parameters
- of
- a list of anything, required. The list.
A random one
One thing of a list, at random.
a random one of of
Parameters
- of
- a list of anything, required. The list.
- seed
- text, optional. Text that makes the pick the same every time it is the same.
Some at random
Some things of a list, at random.
n random of of
Parameters
- of
- a list of anything, required. The list.
- n
- a whole number, 1 to 10000, required. How many to pick.
- seed
- text, optional. Text that makes the pick the same every time it is the same.
The first few
The first things of a list.
the first n of of
Parameters
- of
- a list of anything, required. The list.
- n
- a whole number, 1 to 10000, required. How many to keep.
Where
The things of a list for which a check holds, each checked as "each" (and as the player, for players).
of where is
Parameters
- of
- a list of anything, required. The list.
- as
- a name for each one, optional. A name for the thing being checked; "each" when left out.
- is
- yes or no, required. The check made for each thing.
Without
A list less one thing.
of without item
Parameters
- of
- a list of anything, required. The list.
- item
- anything, required. The thing to leave out.
Together
Two lists as one, without repeats.
a together with b
Parameters
- a
- a list of anything, required. One list.
- b
- a list of anything, required. The other.
Includes
Whether a list holds a thing.
of includes item
Parameters
- of
- a list of anything, required. The list.
- item
- anything, required. The thing to look for.
The nearest
The thing of a list nearest a place.
the nearest of of to to
Parameters
- of
- a list of anything, required. Players, mobs, blocks or chunks.
- to
- a place, required. The place to measure from.
The farthest
The thing of a list farthest from a place.
the farthest of of from to
Parameters
- of
- a list of anything, required. Players, mobs, blocks or chunks.
- to
- a place, required. The place to measure from.
By distance
A list sorted nearest first.
of by distance from to
Parameters
- of
- a list of anything, required. Players, mobs, blocks or chunks.
- to
- a place, required. The place to measure from.
Text.
Join
Texts one after another.
parts joined
Parameters
- parts
- texts, required. The texts, in order.
Number as text
A number written out, with some decimals.
n as text with decimals decimals
Parameters
- n
- a number, required. The number.
- decimals
- a whole number, 0 to 6, optional. How many decimals; 0 when left out.
Game.
The clock
Seconds played.
the clock
Time left
Seconds left, or -1 without a time limit.
the time left
Player count
How many players are in the challenge.
how many players there are
Alive count
How many players are in survival or adventure mode.
how many players are alive
Time of day
0 to 23999; 0 is sunrise and 13000 is nightfall.
the time of day
Day
Days since the world began.
the day
Weather
clear, rain or thunder.
the weather
Goal complete
Whether a goal is complete.
the goal objective is complete
Parameters
- objective
- a goal's id, required. Which goal.
Loop round
The round of the innermost loop, from 1.
the loop's round
Loop rounds
How many rounds the innermost loop has.
how many rounds the loop has
Lowest height
The main world's lowest block height.
the world's lowest height
Highest height
The main world's highest block height.
the world's highest height
Game speed
How fast the game runs: 1 is normal.
the game's speed
Variables.
Total of
A per-player number variable's values added up.
the total of variable
Parameters
- variable
- a variable's name, required. A per-player number.
Highest of
A per-player number variable's highest value.
the highest variable
Parameters
- variable
- a variable's name, required. A per-player number.
Lowest of
A per-player number variable's lowest value.
the lowest variable
Parameters
- variable
- a variable's name, required. A per-player number.