YSM Molang reference
Every Molang function and variable you can use in Yes Steve Model animations and controllers, with what it returns and the YSM version that added it. New to Molang? Start with Molang in YSM.
- All 280
- Math functions 33
- Query (q.) 60
- YSM player & entity 105
- YSM projectiles 9
- Controller (ctrl.) 25
- Script controller 5
- TaCZ guns 9
- Immersive Melodies 5
- Touhou Little Maid 16
- Curios accessories 4
- Other mods 9
| Molang | What it does | Since |
|---|---|---|
| math.pi | Pi (π), constantFixed at 3.14159265358979 | 1.1.5 |
| math.e | Euler's number (e), constantFixed at 2.71828182845904 | 1.1.5 |
| math.floor(value) | Round value down to the nearest integer | 1.1.5 |
| math.round(value) | Round value to the nearest integer | 1.1.5 |
| math.ceil(value) | Round value up to the nearest integer | 1.1.5 |
| math.trunc(value) | Truncate value to an integer (rounds towards zero, which rounds up for negative numbers) | 1.1.5 |
| math.clamp(value, min, max) | Clamp value between min and max | 1.1.5 |
| math.max(x, y) | Return the maximum of x and y | 1.1.5 |
| math.min(x, y) | Return the minimum of x and y | 1.1.5 |
| math.abs(value) | Absolute value of value | 1.1.5 |
| math.exp(value) | Exponential function of value with base e ($e^{value}$) | 1.1.5 |
| math.ln(value) | Natural logarithm of value (base e) | 1.1.5 |
| math.sqrt(value) | Square root of value | 1.1.5 |
| math.mod(value, denominator) | Remainder of value divided by denominator | 1.1.5 |
| math.pow(base, exponent) | Return base raised to the power of exponent | 1.1.5 |
| math.sin(value) | Sine of valueInput is in degrees | 1.1.5 |
| math.cos(value) | Cosine of valueInput is in degrees | 1.1.5 |
| math.acos(value) | Arccosine of valueInput value range is [-1, 1], returns radians | 1.1.5 |
| math.asin(value) | Arcsine of valueInput value range is [-1, 1], returns radians | 1.1.5 |
| math.atan(value) | Arctangent of valueInput value range is [-∞, +∞], returns radians | 1.1.5 |
| math.atan2(y, x) | Angle (in radians) between the positive x-axis and the ray from (0,0) to (x,y) | 1.1.5 |
| math.lerp(start, end, 0_to_1) | Linearly interpolate between start and end via 0_to_1Equivalent to: $start + (end - start) \times 0\_to\_1$ | 1.1.5 |
| math.lerprotatee(start, end, 0_to_1) | Interpolate angle between start and end via 0_to_1Wraps around to 0 when exceeding 360 degrees | 1.1.5 |
| math.random(low, high) | Return a random number between low and high | 1.1.5 |
| math.random_integer(low, high) | Return a random **integer** between low and high | 1.1.5 |
| math.die_roll(num, low, high) | Return the sum of num random numbers, each ranging from low to highGenerated numbers are **not** integers like normal dice. Use math.die_roll_integer for that. | 1.1.5 |
| math.die_roll_integer(num, low, high) | Return the sum of num random integers, each ranging from low to highGenerated numbers are integers, like normal dice | 1.1.5 |
| math.hermite_blend(value) | Smooth curve interpolation using a Hermite function: $3 \times value^{2} - 2 \times value^{3}$While any valid float is a valid input, this works best in the [0, 1] range | 1.1.5 |
| math.min_angle(value) | Wrap an angle into the equivalent [-180, 180) rangeRemoves extra full rotations from the input angle to keep it within [-180, 180] | 1.2.0 |
| math.randomi(value) | Same as math.random_integerNon-standard naming, for original GeckoLib compatibility only | 1.1.5 |
| math.roll(value) | Same as math.die_rollNon-standard naming, for original GeckoLib compatibility only | 1.1.5 |
| math.rolli(value) | Same as math.die_roll_integerNon-standard naming, for original GeckoLib compatibility only | 1.1.5 |
| math.hermite(value) | Same as math.hermite_blendNon-standard naming, for original GeckoLib compatibility only | 1.1.5 |
| query.debug_output(arg1, arg2...) | Output message to chatOnly works in animation debug mode | 1.2.0 |
| query.biome_has_all_tags(tag1, tag2...) | Check if the player's current biome has all specified biome tagsOnly available in 1.18+ (1.16 lacks biome tags); Use the locate command to check current biome tags | 2.2.1 |
| query.biome_has_any_tag(tag1, tag2...) | Check if the player's current biome has any of the specified biome tagsOnly available in 1.18+ (1.16 lacks biome tags);Use the locate command to check current biome tags | 2.2.1 |
| query.relative_block_has_all_tags<br>(xOffset, yOffset, zOffset, tag1, tag2...) | Check if a block near the player has all specified block tagsThe first three parameters are centered on the player's lower body; max offset is 8 | 1.2.0 |
| query.relative_block_has_any_tag<br>(xOffset, yOffset, zOffset, tag1, tag2...) | Check if a block near the player has any of the specified block tagsThe first three parameters are centered on the player's lower body; max offset is 8 | 1.2.0 |
| query.is_item_name_any<br>(slotType, id1, id2...) | Check if the player's equipped item ID matches any of the specified IDsslotType values: chest feet head legs mainhand offhand | 1.2.0 |
| query.equipped_item_all_tags<br>(slotType, tag1, tag2...) | Check if the player's equipped item has all specified item tagsslotType values: chest feet head legs mainhand offhand | 1.2.0 |
| query.equipped_item_any_tag<br>(slotType, tag1, tag2...) | Checks if the player's equipped item contains any of the specified item tags.slotType parameters: chest feet head legs mainhand offhand | 1.2.0 |
| query.position(value) | Returns the entity's position coordinates (accurate to 14 decimal places).0: X coordinate1: Y coordinate2: Z coordinate | 1.2.0 |
| query.position_delta(value) | Returns the difference in the entity's position coordinates since the last animation update (frame rate dependent).0: X coordinate1: Y coordinate2: Z coordinate | 1.2.0 |
| query.max_durability(slotType) | Returns the maximum durability of the item in the specified slot.slotType parameters: chest feet head legs mainhand offhand | 2.2.1 |
| query.remaining_durability<br>(slotType) | Returns the remaining durability of the item in the specified slot.slotType parameters: chest feet head legs mainhand offhand | 2.2.1 |
| query.actor_count | Returns the number of entities within the loaded range. | 1.1.5 |
| query.anim_time | Current animation playback time (seconds), or 0 if not playing.Represents the animation timeline in seconds. For looping animations, it is the total playback duration with no limit. | 1.1.5 |
| query.life_time | How long the current animation has played (seconds), or 0 if not playing.Represents the animation's life time; the maximum value is the length of the current animation. | 1.1.5 |
| query.all_animations_finished | All animations in the current controller have finished playing.Can only be used inside an animation controller. | 2.3.0 |
| query.any_animation_finished | Any animation in the current controller has finished playing.Can only be used inside an animation controller. | 2.3.0 |
| query.head_x_rotation | Returns the player's head X rotation angle; defaults to 0. | 1.1.5 |
| query.head_y_rotation | Returns the player's head Y rotation angle; defaults to 0. | 1.1.5 |
| query.moon_phase | Returns the current moon phase (0-7). | 1.1.5 |
| query.time_of_day | Returns the time of day.Midnight = 0, Sunrise = 0.25 Noon = 0.5, Sunset = 0.75 | 1.1.5 |
| query.time_stamp | Returns the timestamp of the current world. | 1.1.5 |
| query.yaw_speed | Returns the entity's Y-axis rotation speed. | 1.1.5 |
| query.cardinal_facing_2d | Returns the player's facing direction.Ignores vertical pitch. North = 2.0, South = 3.0, West = 4.0, East = 5.0 | 1.1.5 |
| query.distance_from_camera | Returns the distance between the player and the camera. | 1.1.5 |
| query.eye_target_x_rotation | Returns the player's view X rotation angle; defaults to 0. | 1.1.5 |
| query.eye_target_y_rotation | Returns the player's view Y rotation angle; defaults to 0. | 1.1.5 |
| query.ground_speed [+client] | Returns the player's speed. Cannot be synced on the server; use ysm.ground_speed instead.Always non-negative (outputs a positive value even when moving backward, so it cannot distinguish movement direction). Walking is ~1.7, running is ~3.2, flying is 20. | 1.1.5 |
| query.modified_distance_moved | Total horizontal distance moved by the player (meters). | 1.1.5 |
| query.vertical_speed | Returns the player's vertical movement speed (m/s); upward is positive.Creative mode flight: [-7.5, 7.5] Falling from height: [0, 20] | 1.1.5 |
| query.walk_distance | Returns the total walking distance moved by the player (meters). | 1.1.5 |
| query.has_rider | true if the player is being ridden, otherwise false. | 1.1.5 |
| query.is_first_person | true if the player is in first-person view, otherwise false. | 1.1.5 |
| query.is_in_water | true if the player is in water, otherwise false. | 1.1.5 |
| query.is_in_water_or_rain | true if the player is in water or rain, otherwise false. | 1.1.5 |
| query.is_on_fire | true if the player is on fire, otherwise false. | 1.1.5 |
| query.is_on_ground | true if the player is on the ground, otherwise false. | 1.1.5 |
| query.is_riding | true if the player is riding, otherwise false. | 1.1.5 |
| query.is_sneaking | true if the player is sneaking, otherwise false. | 1.1.5 |
| query.is_spectator | true if the player is in Spectator mode, otherwise false. | 1.1.5 |
| query.is_sprinting | true if the player is sprinting, otherwise false. | 1.1.5 |
| query.is_swimming | true if the player is swimming, otherwise false. | 1.1.5 |
| query.body_x_rotation | Returns the player's body X rotation angle; defaults to 0. | 1.1.5 |
| query.body_y_rotation | Returns the player's body Y rotation angle; defaults to 0. | 1.1.5 |
| query.health | Returns the player's health. | 1.1.5 |
| query.max_health | Returns the player's maximum health. | 1.1.5 |
| query.hurt_time | Player's hurt timer; defaults to 0. | 1.1.5 |
| query.is_eating | true if the player is eating, otherwise false. | 1.1.5 |
| query.is_playing_dead | true if the player is dying, otherwise false. | 1.1.5 |
| query.is_sleeping | true if the player is sleeping, otherwise false. | 1.1.5 |
| query.is_using_item | true if the player is using an item, otherwise false. | 1.1.5 |
| query.item_in_use_duration | Counts up from 0 to the item's max use duration (in seconds). Defaults to 0. | 1.1.5 |
| query.item_max_use_duration | Max use duration of the item being used (in seconds). Defaults to 0. | 1.1.5 |
| query.item_remaining<br>_use_duration | Remaining use duration of the item being used (in seconds). Defaults to 0. | 1.1.5 |
| query.equipment_count | Returns the number of equipped armor pieces (0-4), excluding held items.Integer, varies with armor count, max 4. | 1.1.5 |
| query.has_cape | true if the player has a cape, otherwise false. | 1.1.5 |
| query.cape_flap_amount | Returns the cape flap amount. Works even if the player has no cape.0 is fully down, 1 is fully up. Returns weird data, not recommended. | 1.2.0 |
| query.player_level | Returns the player's experience level. | 1.1.5 |
| query.is_jumping | true if the player is jumping, otherwise false. | 1.1.5 |
| query.rotation_to_camera(args) | Returns the yaw and pitch of the player's camera view.args is 0 or 1. 0 for pitch 1 for yaw | 2.6.0 |
| ysm.dump_equipped_item(slotType) | Outputs equipped item info to the chat. Only works in animation debug mode.slotType options: chest feet head legs mainhand offhand | 1.2.0 |
| ysm.dump_relative_block<br>(xOffset, yOffset, zOffset) | Outputs info of a nearby block to the chat.Only works in animation debug mode.Centered on the player's lower body. Max value for each parameter is 8. | 1.2.0 |
| ysm.dump_mods | Outputs installed mods info to the chat.Only works in animation debug mode. | 1.2.0 |
| ysm.dump_effects | Outputs active status effects info to the chat.Only works in animation debug mode. | 1.2.0 |
| ysm.dump_biome | Outputs current biome ID and tags to the chat.Only works in animation debug mode. | 1.2.0 |
| ysm.mod_version(modid) | Returns the version of a specified mod installed on the client. | 1.2.0 |
| ysm.equipped_enchantment<br>_level(slotType, id) | Returns the level of a specified enchantment on an equipped item. In 2.5.0+, accepts multiple id arguments and returns the sum of their levels.slotType options: chest feet head legs mainhand offhand | 1.2.0 |
| ysm.effect_level(id) | Returns the level of a status effect on the player or arrow.In 2.5.0+, accepts multiple id arguments and returns the sum of their levels. | 1.2.0 |
| ysm.relative_block_name<br>(xOffset, yOffset, zOffset) | Returns the ID of a nearby block.Centered on the player's lower body. Max value for each parameter is 8. | 1.2.0 |
| ysm.head_yaw | Same as query.head_x_rotation. | 1.1.5 |
| ysm.head_pitch | Same as query.head_y_rotation. | 1.1.5 |
| ysm.weather | Returns the current weather.0: Clear, 1: Rain/Snow, 2: Thunder/Blizzard | 1.2.0 |
| ysm.dimension_name | Returns the current dimension ID. | 1.2.0 |
| ysm.fps | Returns the game FPS. | 1.1.5 |
| ysm.input_vertical | Gets the player's forward/backward movement input.>0 when moving forward, <0 when moving backward, 0 when stationary. | 2.3.0 |
| ysm.input_horizontal | Gets the player's left/right movement input.>0 when moving right, <0 when moving left, 0 when stationary. | 2.3.0 |
| ysm.person_view | Returns the current camera perspective.First-person: 0, Third-person back: 1, Third-person front: 2. Should be compatible with Shoulder Surfing? | 2.3.1 |
| ysm.is_passenger | Same as query.is_riding. | 1.1.5 |
| ysm.is_sleep | Same as query.is_sleeping. | 1.1.5 |
| ysm.is_sneak | Same as query.is_sneaking. | 1.1.5 |
| ysm.biome_category | Gets the category of the player's current biome.Only available in 1.16.5 and 1.18.2. | 1.2.0 |
| ysm.is_open_air | Checks if the player is in an open-air area. | 1.2.0 |
| ysm.eye_in_water | Checks if the player's eyes are underwater (used to determine if fully submerged). | 2.2.1 |
| ysm.frozen_ticks | Increases by 1 per tick when in powder snow (max 140). Decreases by 2 per tick when not, down to 0. | 2.2.1 |
| ysm.air_supply | Air supply value, max 300. | 2.2.1 |
| ysm.has_helmet | true if the player is wearing a helmet, otherwise false. | 1.1.5 |
| ysm.has_chest_plate | true if the player is wearing a chestplate, otherwise false. | 1.1.5 |
| ysm.has_leggings | true if the player is wearing leggings, otherwise false | 1.1.5 |
| ysm.has_boots | true if the player is wearing boots, otherwise false | 1.1.5 |
| ysm.has_mainhand | true if the player is holding an item in the main hand, otherwise false | 1.1.5 |
| ysm.has_offhand | true if the player is holding an item in the off-hand, otherwise false | 1.1.5 |
| ysm.has_elytra | Returns true if the player is wearing an elytra, otherwise false | 1.1.5 |
| ysm.is_riptide | true if the player is in the Riptide state, otherwise false | 1.1.5 |
| ysm.armor_value | Returns the player's armor value | 1.1.5 |
| ysm.is_close_eyes | Defaults to false, returns true when the player needs to blinkBlink interval is around 4 seconds. Also returns true when sleeping | 1.1.5 |
| ysm.rendering_in_inventory | Checks if the model is rendering in a GUI (e.g., model selection screen) Returns true when rendered in these places | 2.2.1 |
| ysm.rendering_in_paperdoll | Checks if the model is rendering in the paperdollThe paperdoll refers to the extra player preview in the top-left corner | 2.3.1 |
| ysm.on_ladder | Boolean, checks if the entity is on a ladder | 2.2.1 |
| ysm.ladder_facing | Facing direction of the ladder the entity is climbingOutputs 0-3, corresponding to: South, West, North, East | 2.2.1 |
| ysm.arrow_count | Number of arrows stuck in the player | 2.2.1 |
| ysm.stinger_count | Number of bee stingers stuck in the player | 2.2.1 |
| ysm.texture_name | Returns the name of the texture currently used by the player (including extension) | 1.2.0 |
| ysm.elytra_rot_x | Returns the X rotation angle of the player's elytra | 1.1.5 |
| ysm.elytra_rot_y | Returns the Y rotation angle of the player's elytra | 1.1.5 |
| ysm.elytra_rot_z | Returns the Z rotation angle of the player's elytra | 1.1.5 |
| ysm.food_level | Returns the player's food level | 1.1.5 |
| ysm.first_person_mod_hide | true when the First-person Model mod is installed and the player's head needs to be hidden, otherwise false | 1.1.5 |
| ysm.has_left_shoulder_parrot | Checks if a parrot is perched on the player's left shoulder | 2.2.1 |
| ysm.has_right_shoulder_parrot | Checks if a parrot is perched on the player's right shoulder | 2.2.1 |
| ysm.left_shoulder<br>_parrot_variant | Returns the variant of the parrot on the player's left shoulderVersions 1.19 and earlier do not have string-based parrot color variants, so this variable is only available in 1.20+ | 2.2.1 |
| ysm.right_shoulder<br>_parrot_variant | Returns the variant of the parrot on the player's right shoulderVersions 1.19 and earlier do not have string-based parrot color variants, so this variable is only available in 1.20+ | 2.2.1 |
| ysm.attack_damage | Player's attack damage, inherited from player attributes | 2.2.1 |
| ysm.attack_speed | Player's attack speed, inherited from player attributes | 2.2.1 |
| ysm.attack_knockback | Player's attack knockback, inherited from player attributes | 2.2.1 |
| ysm.movement_speed | Player's base movement acceleration, inherited from player attributes | 2.2.1 |
| ysm.knockback_resistance | Player's knockback resistance, inherited from player attributes | 2.2.1 |
| ysm.luck | Player's luck value, inherited from player attributes | 2.2.1 |
| ysm.block_reach | Player's block reach distance, inherited from player attributes | 2.2.1 |
| ysm.entity_reach | Player's entity reach distance, inherited from player attributes | 2.2.1 |
| ysm.swim_speed | Player's swim speed, inherited from player attributes | 2.2.1 |
| ysm.entity_gravity | Gravity applied to the player (falling acceleration), inherited from player attributes | 2.2.1 |
| ysm.step_height_addition | Additional step height (determines the max height a player can step up without jumping and the min height preventing falling while sneaking), inherited from player attributes | 2.2.1 |
| ysm.nametag_distance | Render distance of the nametag | 2.2.1 |
| ysm.first_order(name, input, response) | First-order system function | 2.3.0 |
| ysm.second_order(name, input, frequency, coefficient, response) | Second-order system function | 2.3.0 |
| ysm.bone_rot(name).x | Gets the X-axis rotation value of the specified bone from the previous frame | 2.2.2 |
| ysm.bone_rot(name).y | Gets the Y-axis rotation value of the specified bone from the previous frame | 2.2.2 |
| ysm.bone_rot(name).z | Get the Z-axis rotation of a specific bone from the previous frame | 2.2.2 |
| ysm.bone_pos(name).x | Get the X-axis position of a specific bone in model-relative space | 2.2.2 |
| ysm.bone_pos(name).y | Get the Y-axis position of a specific bone in model-relative space | 2.2.2 |
| ysm.bone_pos(name).z | Get the Z-axis position of a specific bone in model-relative space | 2.2.2 |
| ysm.bone_scale(name).x | Get the X-axis scale of a specific bone from the previous frame | 2.2.2 |
| ysm.bone_scale(name).y | Get the Y-axis scale of a specific bone from the previous frame | 2.2.2 |
| ysm.bone_scale(name).z | Get the Z-axis scale of a specific bone from the previous frame | 2.2.2 |
| ysm.bone_pivot_abs(name).x | Get the X-axis pivot position of a specific bone in absolute model space | 2.2.2 |
| ysm.bone_pivot_abs(name).y | Get the Y-axis pivot position of a specific bone in absolute model space | 2.2.2 |
| ysm.bone_pivot_abs(name).z | Get the Z-axis pivot position of a specific bone in absolute model space | 2.2.2 |
| ysm.entity_type | Return the type of the currently rendered entity (since rendering is no longer limited to players)Returns player or maid | 2.4.0 |
| ysm.is_player | Whether the currently rendered entity is a player | 2.4.0 |
| ysm.is_maid | Whether the currently rendered entity is a maid | 2.4.0 |
| ysm.particle('id', x, y, z, dx, dy, dz, speed, count, life_time) | Spawn particles. Parameters match the vanilla particle command, with an extra life_time parameterSee official wiki: [Particle Command](https://minecraft.wiki/w/Commands/particle) | 2.4.0 |
| ysm.abs_particle('id', x, y, z, dx, dy, dz, speed, count, life_time) | Spawn particles. Parameters match the vanilla particle command, with an extra life_time parameterParticles spawned by this function do not rotate with the player's facing direction (spawns in absolute coordinates) | 2.4.0 |
| ysm.mainhand_charged_crossbow | Whether the mainhand is holding a charged crossbow | 2.4.0 |
| ysm.offhand_charged_crossbow | Whether the offhand is holding a charged crossbow | 2.4.0 |
| ysm.is_fishing | Whether the player has cast a fishing bobberAlso applies to maids | 2.4.0 |
| ysm.perlin_noise(seed, x, y, z) | Perlin noise function, returns a float between 0 and 1See Khan Academy's tutorial: [Perlin Noise](https://www.khanacademy.org/computing/computer-programming/programming-natural-simulations/programming-noise/a/perlin-noise) | 2.4.0 |
| ysm.relative_block_name_any<br>(xOffset, yOffset, zOffset, 'blockName1', 'blockName2'...) | Similar to ysm.relative_block_name, but accepts multiple block ID stringsReturns true if at least one ID matches | 2.5.0 |
| ysm.in_shield_block_cooldown | Boolean. Whether currently in the cooldown period after a successful shield blockCooldown lasts 5 ticks | 2.5.0 |
| ysm.xxa<br/>ysm.yya<br/>ysm.zza | Directional movement input values (forward, backward, left, right) when riding an entityForward/backward is ysm.zza Left/right is ysm.xxa Usage of ysm.yya is unknown (no value change observed during vertical movement) | 2.5.0 |
| ysm.play_sound('id', 'sound_name', flags?, volume, pitch)[+new_sound] | Play sound. id is the sound identifier, sound_name uses the same format as sound keyframes. flags are special bit flagsWhen set to force play, each execution stops any previously playing sound with the same ID and restarts it from the beginning. | 2.5.0 |
| ysm.stop_sound('id', global?)[+new_sound] | Stop sound. id is the sound identifier | 2.5.0 |
| ysm.stop_all_sounds(global?)[+new_sound] | Stop all sounds played via Molang | 2.5.0 |
| ysm.block_light | Block light level at the entity's feet0-15 | 2.5.0 |
| ysm.sky_light | Sky light level at the entity's feet0-15, 15 when fully exposed to the sky | 2.5.0 |
| ysm.mouse(keycode) [+client] | Detect mouse button stateEnter keycode: [Mouse button numbers](https://www.glfw.org/docs/latest/group__buttons.html) | 2.5.0 |
| ysm.keyboard(keycode1, keycode2, ...) [+client] | Detect keyboard key stateEnter keycode: [Key numbers](https://www.glfw.org/docs/latest/group__keys.html). Supports 1 or more arguments. When multiple arguments are provided, returns true if any of the keys is pressed | 2.5.0 |
| ysm.time_delta | Time interval between two frames | 2.5.0 |
| ysm.sync(int1, int2, ...) | Actively sync data to the server. Refer to the custom functions section for details | 2.5.0 |
| ysm.ground_speed2 | Return player speedBoth this and query.ground_speed represent character speed, but this value syncs between players on the server.Returns a slightly larger value than query.ground_speed | 2.5.1 |
| ysm.hit_target_id | Return the ID of the block or entity the crosshair is pointing atReturns an empty string if pointing at nothing | 2.6.0 |
| ysm.hit_target_type | Return the target type the crosshair is pointing atReturns block for blocks Returns entity for entities Returns an empty string if pointing at nothing | 2.6.0 |
| ysm.swinging | Boolean. Returns true when the player is swinging their arm | 2.6.0 |
| ysm.swing_time | Integer. Returns the swing tick count when the player is swinging, usually under 10 | 2.6.0 |
| ysm.swinging_arm | The swinging arm: 0 for mainhand, 1 for offhandAlways returns 0 when not swinging, so use it together with ysm.swinging | 2.6.0 |
| ysm.attack_time | Float. Attack wind-up counter between 0 and 1. Triggers the attack when it reaches 1Simply understood as a pre-attack wind-up counter | 2.6.0 |
| ysm.on_ground_time | Duration the arrow has been on the ground (in ticks)In-game arrows despawn 1200 ticks (60 seconds) after landing. Resets to 0 if the arrow moves during this time | 1.2.0 |
| ysm.in_ground | Check if the arrow is in the ground | 1.2.0 |
| ysm.projectile_owner | Returns the player entity that shot the arrowCan use the -> operator to query its properties ==Currently has a memory leak issue; not recommended== | 1.2.0 |
| ysm.delta_movement_length | Gets the displacement length of the arrow between two ticks, used to determine speed | 1.2.0 |
| ysm.is_spectral_arrow | Checks if the arrow is a spectral arrow | 1.2.0 |
| ysm.shoot_item_id | Item ID of the weapon that shot this arrowCan be used to distinguish arrows shot from regular bows and crossbows | 2.3.0 |
| ysm.throwable_item | Item ID of the item-based projectile | 2.5.0 |
| ysm.hooked_in | ID of the entity hooked by the fishing bobberEmpty string if none | 2.5.0 |
| ysm.is_biting | Whether a fish is biting the hookBoolean | 2.5.0 |
| ctrl.death | true when dead | 2.3.0 |
| ctrl.riptide | true when triggering Riptide with a trident | 2.3.0 |
| ctrl.sleep | true when sleeping | 2.3.0 |
| ctrl.swim | true when swimming | 2.3.0 |
| ctrl.climb | true when crawling and moving | 2.3.0 |
| ctrl.climbing | true when crawling and stationary | 2.3.0 |
| ctrl.ladder_up | true when climbing up a ladder | 2.3.0 |
| ctrl.ladder_stillness | true when stationary on a ladder | 2.3.0 |
| ctrl.ladder_down | true when climbing down a ladder | 2.3.0 |
| ctrl.fly | true when flying | 2.3.0 |
| ctrl.elytra_fly | true when flying with Elytra | 2.3.0 |
| ctrl.swim_stand | true when treading water (swimming upright) | 2.3.0 |
| ctrl.attacked | true when attacked | 2.3.0 |
| ctrl.jump | true when jumping | 2.3.0 |
| ctrl.sneak | true when sneaking and moving | 2.3.0 |
| ctrl.sneaking | true when sneaking and stationary | 2.3.0 |
| ctrl.run | true when sprinting | 2.3.0 |
| ctrl.walk | true when walking | 2.3.0 |
| ctrl.idle | true when idle | 2.3.1 |
| ctrl.hold(slotType, id) | Usage: ctrl.hold('mainhand', '$minecraft:apple')slotType parameters: mainhand offhand The second parameter is similar to the legacy animation naming: $ for item ID, # for item tag, : for special category | 2.3.0 |
| ctrl.swing(slotType, id) | Usage: ctrl.swing('offhand', '#minecraft:axes')slotType parameters: mainhand offhandThe second parameter is similar to the legacy animation naming: $ for item ID, # for item tag, : for special category | 2.3.0 |
| ctrl.use(slotType, id) | Usage: ctrl.use('offhand', ':eat')slotType parameters: mainhand offhandThe second parameter is similar to the legacy animation naming: $ for item ID, # for item tag, : for special category | 2.3.0 |
| ctrl.armor(slotType, id) | Usage: ctrl.armor('head', '$minecraft:iron_helmet') First parameter options: feet, legs, chest, headslotType parameters: chest feet head legsThe second parameter is similar to the legacy animation naming: $ for item ID, # for item tag, : for special category | 2.3.0 |
| ctrl.ride(type, id) | Usage: ctrl.ride('vehicle', '$minecraft:pig') ctrl.ride('passenger', '$minecraft:pig')type parameters: vehicle passengerThe second parameter is similar to the legacy animation naming: $ for entity ID, # for entity tag, : for special category | 2.3.0 |
| ctrl.playing_extra_animation | Whether the player is playing a wheel animationReturns boolean | 2.5.0 |
| ctrl.tac_hold_gun | Whether the player is holding a TaCZ gun in the main handReturns boolean | 2.3.0 |
| ctrl.tac_gun_type | Type of gun currently held by the player (e.g., rifle, pistol)Returns stringReturns empty string if not holding a gun | 2.3.0 |
| ctrl.tac_gun_id | ID of the gun currently held by the playerReturns stringReturns empty string if not holding a gun | 2.3.0 |
| ctrl.tac_is_fire | Whether the player is firingReturns boolean | 2.3.0 |
| ctrl.tac_is_aim | Whether the player is aimingReturns boolean | 2.3.0 |
| ctrl.tac_is_reload | Whether the player is reloadingReturns boolean | 2.3.0 |
| ctrl.tac_is_melee | Whether the player is performing a melee attack (bayonet)Returns boolean | 2.3.0 |
| ctrl.tac_is_draw | Whether the player is drawing/switching gunsReturns boolean | 2.3.0 |
| ctrl.tac_fire_mode | Firearm firing modeReturns a string, usually uppercase AUTO, SEMI, or BURST | 2.6.0 |
| ctrl.im_current | Current signal level, range 0~1 | 2.6.0 |
| ctrl.im_delta | Time interval since the last note outputUnit: ms | 2.6.0 |
| ctrl.im_pitch | Pitch, common range 0~2Exact value depends on the note currently being played | 2.6.0 |
| ctrl.im_volume | Note intensity (velocity), common range 0~2 | 2.6.0 |
| ctrl.im_time | Elapsed time since playing startedUnit: ms | 2.6.0 |
| ctrl.carryon_type | Type carried by the player: block, entity, or playerReturns a stringReturns an empty string if carrying nothing | 2.3.0 |
| ctrl.carryon_is_princess | Whether the player is **being** carriedReturns a boolean | 2.3.0 |
| ctrl.parcool_state | Returns the currently executing parkour actionReturns a stringReturns an empty string if no parkour action is executing | 2.3.0 |
| ctrl.swem_is_ride | Whether the player is **riding** an SWEM horseReturns a boolean | 2.3.0 |
| ctrl.swem_state | Equestrian action currently performed by the playerReturns a stringReturns an empty string if not riding an SWEM horse | 2.3.0 |
| ctrl.slashblade_animation | Name of the Sword Art currently performed by the playerReturns a stringReturns an empty string if no Sword Art is performed | 2.3.0 |
| ctrl.create_hanging_skyhook | Whether the player is hanging on a Create chain drive with a skyhookReturns a boolean | 2.5.0 |
| ctrl.bcombat_attack_animation | Better Combat attack animationNote: Does not distinguish between main/off-hand or weapon types; requires additional conditions | 2.6.0 |
| ctrl.iss_animation | Iron's Spells 'n Spellbooks casting animationReturns a string | 2.6.0 |
| ctrl.set_beginning_<br>transition_length(second) | Script controller only. Sets the animation transition time for the current controllerAccepts 1 parameter: animation transition time in seconds | 2.5.0 |
| ctrl.set_animation(animation, loop_type) | Script controller only. Plays the specified animationAccepts 1~2 parameters. 1st: animation name. 2nd (optional): loop type. Uses the animation's preset loop type if omitted | 2.5.0 |
| ysm.state_continue<br>ysm.state_stop<br/>ysm.state_pause<br/>ysm.state_bypass | Constants, script controller onlySee the custom functions section for details | 2.5.0 |
| ysm.reset | No parametersImmediately resets the animation controller to its initial state. Abruptly stops any playing animation without smooth transition. Also includes the effect of ctrl.indicate_reload | 2.5.0 |
| ysm.indicate_reload | Reload animationSimilar to ysm.reset, but called before animations like play_once or hold_on_last_frame to reset and replay them. | 2.5.0 |
| tlm.is_begging | true when the maid is begging, otherwise false | 2.4.0 |
| tlm.is_sitting | true when the maid is sitting (waiting), otherwise false | 2.4.0 |
| tlm.has_backpack | true when the maid is wearing a backpack, otherwise false | 2.4.0 |
| tlm.favorability_point | Maid favorability pointsReturn value: 0-384 | 2.4.0 |
| tlm.favorability_level | Maid favorability levelReturn value: 0-384 | 2.4.0 |
| tlm.task_id | Maid task mode IDReturns a string | 2.4.0 |
| tlm.schedule | Maid work scheduleReturn values: day, night, all Corresponding to: Day shift, Night shift, All day | 2.4.0 |
| tlm.activity | Maid current activityReturn values: work, idle, resetCorresponding to: Working, Off duty, Sleeping | 2.4.0 |
| tlm.gomoku_win_count | Maid total Gomoku winsCurrently only records Gomoku | 2.4.0 |
| tlm.gomoku_rank | Maid Gomoku rank1-4, ==no 0== | 2.4.0 |
| tlm.game_statue | Board game statusReturn values: win, lost, or an empty string | 2.4.0 |
| tlm.backpack_type | Maid backpack IDMaids can equip multiple types of backpacks | 2.4.0 |
| tlm.is_entity | Rendering maid entityMaids can be made into statues or garage kits; this variable distinguishes between them | 2.4.0 |
| tlm.is_statue | Rendering statueMaids can be made into statues or garage kits; this variable distinguishes between them | 2.4.0 |
| tlm.is_garage_kit | Rendering garage kit (figure)Maids can be made into statues or garage kits; this variable distinguishes between them | 2.4.0 |
| tlm.show_item | Item ID in the maid's display slotThe last slot of the maid's inventory has a special display; this records the item ID in that slot | 2.4.0 |
| ysm.has_any_curios(type, name...) | Checks if the specified Curios slot has any of the specified items equipped. type is the slot type, name is the item ID (supports multiple, same below)name can be omitted to only check if the slot is not empty | 2.5.0 |
| ysm.has_any_curios_with_all_tags(type, tag...) | Checks if the specified Curios slot has an item equipped with **all** the given tagsReturns a booleanNote the s at the end of the function name | 2.5.0 |
| ysm.has_any_curios_with_any_tag(type, tag...) | Checks if the specified Curios slot has an item equipped with **any** of the given tagsReturns a booleanNote there is no s at the end of the function name | 2.5.0 |
| ysm.dump_curios | Outputs the player's currently equipped Curios info. Only works in animation debug mode.All information about the player's currently equipped Curios | 2.5.0 |