diff --git a/src/MolangData/General.ts b/src/MolangData/General.ts index 7d5dacd..4fb345a 100644 --- a/src/MolangData/General.ts +++ b/src/MolangData/General.ts @@ -182,6 +182,16 @@ export namespace General { id: "actor_count", documentation: "Returns the number of actors rendered in the last frame", }, + { + id: "all", + documentation: + "Requires at least 3 arguments. Evaluates the first argument, then returns 1.0 if all of the following arguments evaluate to the same value as the first. Otherwise it returns 0.0.", + parameters: [ + { id: "evaluate", documentation: "The value to evaluate" }, + { id: "first", documentation: "The first value to compare" }, + { id: "second", documentation: "The first value to compare" }, + ], + }, { id: "all_animations_finished", documentation: @@ -197,20 +207,20 @@ export namespace General { "Returns the anger level of the actor [0,n]. On errors or if the actor has no anger level, returns 0. Available on the Server only.", }, { - id: "all", + id: "anim_time", documentation: - "Requires at least 3 arguments. Evaluates the first argument, then returns 1.0 if all of the following arguments evaluate to the same value as the first. Otherwise it returns 0.0.", + "Returns the time in seconds since the current animation started, else 0.0 if not called within an animation", + }, + { + id: "any", + documentation: + "Requires at least 3 arguments. Evaluates the first argument, then returns 1.0 if any of the following arguments evaluate to the same value as the first. Otherwise it returns 0.0.", parameters: [ { id: "evaluate", documentation: "The value to evaluate" }, { id: "first", documentation: "The first value to compare" }, { id: "second", documentation: "The first value to compare" }, ], }, - { - id: "anim_time", - documentation: - "Returns the time in seconds since the current animation started, else 0.0 if not called within an animation", - }, { id: "any_animation_finished", documentation: @@ -220,16 +230,6 @@ export namespace General { id: "any_tag", documentation: "Returns if the item or block has any of the tags specified", }, - { - id: "any", - documentation: - "Requires at least 3 arguments. Evaluates the first argument, then returns 1.0 if any of the following arguments evaluate to the same value as the first. Otherwise it returns 0.0.", - parameters: [ - { id: "evaluate", documentation: "The value to evaluate" }, - { id: "first", documentation: "The first value to compare" }, - { id: "second", documentation: "The first value to compare" }, - ], - }, { id: "approx_eq", documentation: "Returns 1.0 if all of the arguments are within 0.000000 of each other, else 0.0.", @@ -268,6 +268,94 @@ export namespace General { documentation: "Returns the block face for this (only valid for certain triggers such as placing blocks, or interacting with block) (Down=0.0, Up=1.0, North=2.0, South=3.0, West=4.0, East=5.0, Undefined=6.0).", }, + { + id: "block_has_all_tags", + documentation: "Takes a world-origin-relative position and one or more tag names, and returns either 0 or 1 based on if the block at that position has all of the tags provided.", + parameters: [ + { + id: "x", + documentation: "World-origin-relative position on the x axis", + }, + { + id: "y", + documentation: "World-origin-relative position on the y axis", + }, + { + id: "z", + documentation: "World-origin-relative position on the z axis", + }, + { + id: "tag", + documentation: "The first tag", + } + ], + }, + { + id: "block_has_any_tags", + documentation: "Takes a world-origin-relative position and one or more tag names, and returns either 0 or 1 based on if the block at that position has any of the tags provided.", + parameters: [ + { + id: "x", + documentation: "World-origin-relative position on the x axis", + }, + { + id: "y", + documentation: "World-origin-relative position on the y axis", + }, + { + id: "z", + documentation: "World-origin-relative position on the z axis", + }, + { + id: "tag", + documentation: "The first tag", + } + ], + }, + { + id: "block_neighbor_has_all_tags", + documentation: "Takes a block-relative position and one or more tag names, and returns either 0 or 1 based on if the block at that position has all of the tags provided.", + parameters: [ + { + id: "x", + documentation: "block-relative position on the x axis", + }, + { + id: "y", + documentation: "block-relative position on the y axis", + }, + { + id: "z", + documentation: "block-relative position on the z axis", + }, + { + id: "tag", + documentation: "The first tag", + } + ], + }, + { + id: "block_neighbor_has_any_tags", + documentation: "Takes a block-relative position and one or more tag names, and returns either 0 or 1 based on if the block at that position has any of the tags provided.", + parameters: [ + { + id: "x", + documentation: "block-relative position on the x axis", + }, + { + id: "y", + documentation: "block-relative position on the y axis", + }, + { + id: "z", + documentation: "block-relative position on the z axis", + }, + { + id: "tag", + documentation: "The first tag", + } + ], + }, { id: "block_property", documentation: "Returns the value of the associated Blocks Block State", @@ -300,6 +388,26 @@ export namespace General { documentation: "Returns the axis aligned bounding box of a bone as a struct with members '.min', '.max', along with '.x', '.y', and '.z' values for each.", }, + { + id: "bone_orientation_matrix", + documentation: "Takes the name of the bone as an argument. Returns the bone orientation (as a matrix) of the desired bone provided it exists in the queryable geometry of the mob, else this returns the identity matrix and throws a content error.", + parameters: [ + { + id: "bone", + documentation: "Bone name" + } + ] + }, + { + id: "bone_orientation_trs", + documentation: "TRS stands for Translate/Rotate/Scale. Takes the name of the bone as an argument. Returns the bone orientation matrix decomposed into the component translation/rotation/scale parts of the desired bone provided it exists in the queryable geometry of the mob, else this returns the identity matrix and throws a content error. The returned value is returned as a variable of type 'struct' with members '.t', '.r', and '.s', each with members '.x', '.y', and '.z'", + parameters: [ + { + id: "bone", + documentation: "Bone name" + } + ] + }, { id: "bone_origin", documentation: @@ -359,14 +467,14 @@ export namespace General { "Returns value between 0.0 and 1.0 with 0.0 meaning cape is fully down and 1.0 is cape is fully up", }, { - id: "cardinal_facing_2d", + id: "cardinal_facing", documentation: - "Returns the current facing of the player ignoring up/down part of the direction (North=2.0, South=3.0, West=4.0, East=5.0, Undefined=6.0).", + "Returns the current facing of the player (Down=0.0, Up=1.0, North=2.0, South=3.0, West=4.0, East=5.0, Undefined=6.0).", }, { - id: "cardinal_facing", + id: "cardinal_facing_2d", documentation: - "Returns the current facing of the player (Down=0.0, Up=1.0, North=2.0, South=3.0, West=4.0, East=5.0, Undefined=6.0).", + "Returns the current facing of the player ignoring up/down part of the direction (North=2.0, South=3.0, West=4.0, East=5.0, Undefined=6.0).", }, { id: "cardinal_player_facing", @@ -378,6 +486,14 @@ export namespace General { documentation: "Combines any valid entity references from all arguments into a single array. Note that order is not preserved, and duplicates and invalid values are removed.", }, + { + id: "cooldown_time", + documentation: "Returns the total cooldown time in seconds for the item held or worn by the specified equipment slot name (and if required second numerical slot id), otherwise returns 0. Uses the same name and id that the replaceitem command takes when querying entities." + }, + { + id: "cooldown_time_remaining", + documentation: "Returns the cooldown time remaining in seconds for specified cooldown type or the item held or worn by the specified equipment slot name (and if required second numerical slot id), otherwise returns 0. Uses the same name and id that the replaceitem command takes when querying entities. Returns highest cooldown if no parameters are supplied." + }, { id: "count", documentation: @@ -482,10 +598,6 @@ export namespace General { id: "had_component_group", documentation: "Usable only in behavior packs when determining the default value for an entity's Property. Requires one string argument. If the entity is being loaded from data that was last saved with a component_group with the specified name, returns 1.0, otherwise returns 0.0. The purpose of this query is to allow entity definitions to change and still be able to load the correct state of entities.", }, - { - id: "has_dash_cooldown", - documentation: "Returns 1.0 if the entity has cooldown on its dash, else it returns 0.0.", - }, { id: "has_any_family", documentation: "Returns 1 if the entity has any of the specified families, else 0.", @@ -517,17 +629,25 @@ export namespace General { documentation: "Returns 1.0 if the entity has collisions enabled, else it returns 0.0.", }, { - id: "has_gravity", - documentation: "Returns 1.0 if the entity is affected by gravity, else it returns 0.0.", + id: "has_dash_cooldown", + documentation: "Returns 1.0 if the entity has cooldown on its dash, else it returns 0.0.", }, { - id: "has_property", - documentation: "Takes one argument: the name of the property on the Actor. Returns 1.0 if a property with the given name exists, 0 otherwise.", + id: "has_gravity", + documentation: "Returns 1.0 if the entity is affected by gravity, else it returns 0.0.", }, { id: "has_owner", documentation: "Returns true if the entity has an owner ID else it returns false", }, + { + id: "has_player_rider", + documentation: "Returns 1 if the entity has a player riding it in any seat, else it returns 0.", + }, + { + id: "has_property", + documentation: "Takes one argument: the name of the property on the Actor. Returns 1.0 if a property with the given name exists, 0 otherwise.", + }, { id: "has_rider", documentation: "Returns 1.0 if the entity has a rider, else it returns 0.0.", @@ -606,6 +726,10 @@ export namespace General { id: "is_angry", documentation: "Returns 1.0 if the entity is angry, else it returns 0.0.", }, + { + id: "is_attached", + documentation: "Returns 1.0 if the entity is attached to another entity (such as being held or worn), else it will return 0.0. Available only with resource packs." + }, { id: "is_attached_to_entity", documentation: "Returns 1.0 if the actor is attached to an entity, else it will return 0.0.", @@ -638,14 +762,14 @@ export namespace General { id: "is_casting", documentation: "Returns 1.0 if the entity is casting, else it returns 0.0.", }, - { - id: "is_celebrating_special", - documentation: "Returns 1.0 if the entity is doing a special celebration, else it returns 0.0.", - }, { id: "is_celebrating", documentation: "Returns 1.0 if the entity is celebrating, else it returns 0.0.", }, + { + id: "is_celebrating_special", + documentation: "Returns 1.0 if the entity is doing a special celebration, else it returns 0.0.", + }, { id: "is_charged", documentation: "Returns 1.0 if the entity is charged, else it returns 0.0.", @@ -658,6 +782,10 @@ export namespace General { id: "is_chested", documentation: "Returns 1.0 if the entity has chests attached to it, else it returns 0.0.", }, + { + id: "is_cooldown_type", + documentation: "Returns 1.0 if the specified held or worn item has the specified cooldown type name, otherwise returns 0.0. First argument is the cooldown name to check for, second argument is the equipment slot name, and if required third argument is the numerical slot id. For second and third arguments, uses the same name and id that the replaceitem command takes when querying entities." + }, { id: "is_crawling", documentation: "Returns 1.0 if the entity is crawling, else it returns 0.0.", @@ -682,26 +810,26 @@ export namespace General { id: "is_digging", documentation: "Returns 1.0 if the entity is digging, else it returns 0.0.", }, - { - id: "is_eating_mob", - documentation: "Returns 1.0 if the entity is eating a mob, else it returns 0.0.", - }, { id: "is_eating", documentation: "Returns 1.0 if the entity is eating, else it returns 0.0.", }, { - id: "is_elder", - documentation: "Returns 1.0 if the entity is an elder version of it, else it returns 0.0.", + id: "is_eating_mob", + documentation: "Returns 1.0 if the entity is eating a mob, else it returns 0.0.", }, { - id: "is_emoting", - documentation: "Returns 1.0 if the entity is emoting, else it returns 0.0.", + id: "is_elder", + documentation: "Returns 1.0 if the entity is an elder version of it, else it returns 0.0.", }, { id: "is_emerging", documentation: "Returns 1.0 if the entity is emerging, else it returns 0.0.", }, + { + id: "is_emoting", + documentation: "Returns 1.0 if the entity is emoting, else it returns 0.0.", + }, { id: "is_enchanted", documentation: "Returns 1.0 if the entity is enchanted, else it returns 0.0.", @@ -747,6 +875,10 @@ export namespace General { documentation: "Returns 1.0 if the entity is in contact with any water (water, rain, splash water bottle), else it returns 0.0.", }, + { + id: "is_in_lava", + documentation: "Returns 1.0 if the entity is in lava, else it returns 0.0." + }, { id: "is_in_love", documentation: "Returns 1.0 if the entity is in love, else it returns 0.0.", @@ -755,17 +887,13 @@ export namespace General { id: "is_in_ui", documentation: "Returns 1.0 if the entity is rendered as part of the UI, else it returns 0.0.", }, - { - id: "is_in_water_or_rain", - documentation: "Returns 1.0 if the entity is in water or rain, else it returns 0.0.", - }, { id: "is_in_water", documentation: "Returns 1.0 if the entity is in water, else it returns 0.0.", }, { - id: "is_in_lava", - documentation: "Returns 1.0 if the entity is in lava, else it returns 0.0.", + id: "is_in_water_or_rain", + documentation: "Returns 1.0 if the entity is in water or rain, else it returns 0.0.", }, { id: "is_interested", @@ -796,14 +924,15 @@ export namespace General { { id: "item", documentation: "" }, ], }, - { - id: "is_jumping", - documentation: "Returns 1.0 if the entity is in water or rain, else it returns 0.0.", - }, + { id: "is_jump_goal_jumping", documentation: "Returns 1.0 if the entity is doing a jump goal jump, else it returns 0.0.", }, + { + id: "is_jumping", + documentation: "Returns 1.0 if the entity is in water or rain, else it returns 0.0.", + }, { id: "is_laying_down", documentation: "Returns 1.0 if the entity is laying down, else it returns 0.0.", @@ -920,21 +1049,21 @@ export namespace General { documentation: "Returns 1.0 if the entity is scared, else it returns 0.0.", }, { - id: "query.is_scenting", + id: "is_scenting", documentation: "Returns 1.0 if the entity is scenting, else it returns 0.0.", }, { id: "is_selected_item", documentation: "Returns true if the player has selected an item in the inventory, else it returns 0.0.", }, - { - id: "is_shaking_wetness", - documentation: "Returns 1.0 if the entity is shaking water off, else it returns 0.0.", - }, { id: "is_shaking", documentation: "Returns 1.0 if the entity is casting, else it returns 0.0.", }, + { + id: "is_shaking_wetness", + documentation: "Returns 1.0 if the entity is shaking water off, else it returns 0.0.", + }, { id: "is_sheared", documentation: "Returns 1.0 if the entity is able to be sheared and is sheared, else it returns 0.0.", @@ -955,10 +1084,6 @@ export namespace General { id: "is_sleeping", documentation: "Returns 1.0 if the entity is sleeping, else it returns 0.0.", }, - { - id: "is_spectator", - documentation: "Returns 1.0 if the entity is spectator, else it returns 0.0.", - }, { id: "is_sneaking", documentation: "Returns 1.0 if the entity is sneaking, else it returns 0.0.", @@ -975,6 +1100,10 @@ export namespace General { id: "is_sonic_boom", documentation: "Returns 1.0 if the entity is using sonic boom, else it returns 0.0.", }, + { + id: "is_spectator", + documentation: "Returns 1.0 if the entity is spectator, else it returns 0.0.", + }, { id: "is_sprinting", documentation: "Returns 1.0 if the entity is sprinting, else it returns 0.0.", @@ -1176,6 +1305,46 @@ export namespace General { id: "property", documentation: "Takes one argument: the name of the property on the entity. Returns the value of that property if it exists, else 0.0 if not.", }, + { + id: "relative_block_has_all_tags", + documentation: "Takes an entity-relative position and one or more tag names, and returns either 0 or 1 based on if the block at that position has all of the tags provided." + }, + { + id: "relative_block_has_any_tag", + documentation: "Takes an entity-relative position and one or more tag names, and returns either 0 or 1 based on if the block at that position has any of the tags provided." + }, + { + id: "ride_body_x_rotation", + documentation: "Returns the body pitch world-rotation of the ride an entity, else it returns 0.0." + }, + { + id: "ride_body_y_rotation", + documentation: "Returns the body yaw world-rotation of the ride an entity, else it returns 0.0." + }, + { + id: "ride_head_x_rotation", + documentation: "Returns the hea x world-rotation of the ride an entity, else it returns 0.0." + }, + { + id: "ride_head_y_rotation", + documentation: "Takes one optional argument as a parameter. Returns the head y world-rotation of the ride of an entity, else it returns 0.0. First parameter only for horses, zombie horses, skeleton horses, donkeys and mules that clamps rotation in degrees." + }, + { + id: "rider_body_x_rotation", + documentation: "Returns the body pitch world-rotation of a valid rider at the provided index if called on an entity, else it returns 0.0." + }, + { + id: "rider_body_y_rotation", + documentation: "Returns the body yaw world-rotation of a valid rider at the provided index if called on an entity, else it returns 0.0." + }, + { + id: "rider_head_x_rotation", + documentation: "Takes one argument as a parameter. Returns the head x world-rotation of the rider entity at the provided index, else it returns 0.0." + }, + { + id: "rider_head_y_rotation", + documentation: "Takes one or two arguments as parameters. Returns the head y world-rotation of the rider entity at the provided index, else it returns 0.0. Horses, zombie horses, skeleton horses, donkeys and mules require a second parameter that clamps rotation in degrees." + }, { id: "remaining_durability", documentation: "Returns the how much durability an item has remaining", @@ -1190,6 +1359,10 @@ export namespace General { "Returns the rotation required to aim at the camera. Requires one argument representing the rotation axis you would like (0 for x, 1 for y)", parameters: [{ id: "axis", documentation: "0 for x, 1 for y" }], }, + { + id: "scoreboard", + documentation: "Takes one argument - the name of the scoreboard entry for this entity. Returns the specified scoreboard value for this entity. Available only with behavior packs." + }, { id: "shake_angle", documentation: "Returns the shaking angle of the entity if it makes sense, else it returns 0.0.",