Upcoming Features
Functions
Used to modify outcome objects, such as BlockStates, Entities, ItemStacks, etc. This is intended mostly as an alternative to the component system for Entities & Blocks.
set_age
ageable entities
age
set age of animal
set_count
all
count
set count of anything
distribute_count
all
functions, total_count
uses the count from all functions to determine a proportional amount to the total
group
all
functions
run multiple functions once
loop
all
function
run the function over time at an interval; for example: once every 1s
random_count
all
function, count
run the function multiple times
random_split
all
valid_function, invalid_function
runs a function for all valid targets and a different function for all invalid targets
set_pos
all
pos
set position of anything
set_color
colorables
color
dye sheep, shulkers, items, blocks, etc
set_charged
creepers
charged
make creepers charged
set_direction
directionals
direction
set direction of blocks, entities, or structures
set_velocity
entities, particles
velocity
set velocity of entity
add_passenger
entities
passenger
add a passenger to entity
set_nbt
entities/block entities
nbt
only because nbt still exists, please please remove it mojang
set_goat_horns
goats
horns
set goat horns on goat
set_components
items
components
item modifications
set_name
items/entities
name
set name of item or entity
add_enchantments
items
enchantments
set enchantments of item
add_status_effects
living entities
status_effects
add status effect to entity
set_equipment
living entities
slot->item
set mob equipment
set_attribute_modifiers
living entities/items
attribute->value
set max health, armor, etc of the spawned mob or of the itemstack
set_level
enchantments
level
set level of enchantment
set_target
mobs
target
angering & setting target of mobs
set_owner
pets
owner
taming pets, ender pearls
set_sitting
pets
sitting
make pets sit
set_rotation
rotationals
rotation
setting initial mob rotation
set_sheared
sheep
sheared
make sheep sheared
set_variant
variant entities
variant
frog variants, fox variants, tropical fish, axolotls, etc
set_size
slimes, salmon, pufferfish
size
sets the size of the entity
set_saddle
rideables
saddle
adds a saddle to the entity so they can be ridden
set_villager_data
villagers
profession, rank, trades
sets villager data
set_baby
animals
baby
makes the animal a baby
set_item
item frames, foxes
stack
sets the entity's single held item when not using equipment slots
initialize_mobs
mobs
data
default mob spawning mechanics: skeleton bows, horse stats, etc
Boolean Providers
Return a boolean value, usable in any codec-based object.
simple
value
returns a boolean
random
N/A
returns true or false
Color Providers
Return a color value, usable in any codec-based object.
simple
color
returns a color
random
colors
returns a random color
Entity Providers
Return an Entity value, usable in any codec-based object.
random_in_shape
shape
returns a random player in the shape
target
provider
returns the current target entity of the provided
attacker
provider
returns the current attacker entity of the provided
owner
provider
returns the owner entity of the provided
random_passenger
provider
returns a random passenger entity of the provided
Stack Providers
Return an ItemStack value, usable in any codec-based object.
simple
stack, components
returns an itemstack
random
stacks
returns a random itemstack from the provided list
Text Providers
Return a text value, usable in any codec-based object.
simple
text
returns a basic text
random
texts
returns a random text
compound
texts
returns a combination of multiple texts
Vec Providers
Return a Vec3d value, usable in any codec-based object.
constant
vec
returns a vector
random
vecs
returns a random vector
random_in_shape
shape
returns a random vector within the shape
clamp_to_heightmap
vec, heightmap
clamps the vector to the heightmap
random_velocity
power, pitch
returns a velocity vector, based on power and pitch
Last updated