Skip to content

MoLang Queries

Queries Argon adds for MoLang expressions, for example in animations and values.

QueryReturnsDescription
argon.dodge_direction_forwardNumberHow much of the current Dodge points forward, from -1 (backward) to 1, or 0 when not dodging.
argon.dodge_direction_sideNumberHow much of the current Dodge points sideways, from -1 to 1, or 0 when not dodging.
argon.facing_block(distance)BooleanWhether a block is within the given distance along the entity's line of sight.
  • distance (Number): How far to look, in blocks.
argon.item_energy(slot)NumberThe energy stored in the item in the given slot, or 0 if there is none.
  • slot (String): The slot to read, e.g. "mainhand".
argon.item_energy_level(slot, start, step, min_level, max_level)NumberThe stored energy of the item in a slot as a level: min_level at or below start, then one more level for every step of energy, up to max_level.
  • slot (String): The slot to read.
  • start (Number): The energy at or below which the level is min_level.
  • step (Number): How much energy each level above min_level takes.
  • min_level (Number): The lowest level.
  • max_level (Number): The highest level.
argon.swing_arm_leftBooleanWhether the entity's left arm is swinging, counting offhand swings.
argon.swing_arm_rightBooleanWhether the entity's right arm is swinging, counting offhand swings (unlike palladium.attack_on_right_arm, which only follows the main hand).
argon.swing_arm_yawNumberThe body twist of the current swing in degrees, doubled like the vanilla arm yaw and signed for whichever arm is swinging, main hand or offhand.
argon.wall_crawl_rollNumberThe roll, in degrees, of the body on the surface Wall Crawling is attached to, following where the entity looks. 0 when not on a surface.