Registry ObjectValue Functions

Name Description Usage
is_in(tag: ResouceLocation): Double
Returns 1.0 if tag is in the registry, otherwise returns 0.0.
v.registry.is_in('#cobblemon:guilded_chest')
is_of(identifier: ResourceLocation): Double
Returns 1.0 if identifier is in the registry, otherwise returns 0.0.
v.registry.is_of('minecraft:dirt')

Biome Functions

Can use the Registry ObjectValue. Type is ObjectValue<Biome>.*

Name Description Usage
None :)

World Functions

Can use the Registry ObjectValue. Type is ObjectValue<Level>.*

Name Description Usage
game_time(): Double
Returns the game time in ticks.
q.world.game_time()
time_of_day(): Double
Returns the dayTime in ticks.
q.world.time_of_day()
server(): QueryStruct
Returns a Server object if on a server, otherwise returns 0.0.
q.world.server()
is_raining_at(x: Int, y: Int, z: Int): Double
Takes a block position and returns 1.0 if it is raining there, otherwise returns 0.0.
q.world.is_raining_at(0, 0, 0)
is_chunk_loaded_at(x: Int, y: Int, z: Int): Double
Takes a block position and returns 1.0 if the chunk containing the block is loaded, otherwise returns 0.0.
q.world.is_chunk_loaded_at(0, 0, 0)
is_thundering(): Double
Returns 1.0 if the the world is thundering, otherwise returns 0.0.
q.world.is_thundering()
is_raining(): Double
Returns 1.0 if the the world is raining, otherwise returns 0.0.
q.world.is_raining()
set_block(x: Int, y: Int, z: Int, block: String): Double?
Take a block position and set it to be a block. Returns 0.0 and logs the unknown string if it's an invalid block. Check if world.set block returns anything
q.world.set_block(0, 0, 0, 'minecraft:dirt')
get_block(x: Int, y: Int, z: Int): ObjectValue<Block>
Gets the block at the location x, y, and z.
q.world.get_block(0, 0, 0)
spawn_explosion(x: Double, y: Double, z: Double, range: Double, interaction: String?) Check if world.explode returns anything
Spawns an explosion at x, y, and z with range of range. interaction is a string of what kind of explosion it should be, such as block, mob, tnt, trigger, or none. Is tnt by default.
q.world.spawn_explosion(0, 0, 0, 3)
spawn_lightning(x: Double, y: Double, z: Double): Double
Spawns a lightning bolt at the location x, y, and z. Returns 1.0.
q.world.spawn_lightning(0, 0, 0)
spawn_bedrock_particles(particle: String, x: Double, y: Double, z: Double, player: MoValue?) Double?
Spawns bedrock particles at the location x, y, and z. When run on the server, if a player value is specified (either a player object or a UUID) then only the player specified will receive the packet, otherwise all nearby players will receive it. If run on a client then it will play the animation for only that player, ignoring the player value, returning 0.0 if the particle is not in the registry.
q.world.spawn_bedrock_particles('ambient_shiny_particles', 0, 0, 0)
get_entities_around(x: Double, y: Double, z: Double, range: Double): ArrayStruct<MoValue>
Returns a list of entities within range of x, y, and z. This list contains the most specific MoValue for an entity, either Player, PokemonEntity, NPCEntity, or a regular Entity.
q.world.get_entities_around(0, 0, 0, 10)

Dimension Functions

Can use the Registry ObjectValue. Type is ObjectValue<Dimension>.*

Name Description Usage
None :)

Block Functions

Can use the Registry ObjectValue. Type is ObjectValue<Block>.*

Name Description Usage
None :)

Footnote: *Technically the type is ObjectValue<Holder<*>>, but for the purposes of this documentation Holder has been omitted.