Molang

YSM Molang reference: Controller (ctrl.)

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.

MolangWhat it doesSince
ctrl.deathtrue when dead2.3.0
ctrl.riptidetrue when triggering Riptide with a trident2.3.0
ctrl.sleeptrue when sleeping2.3.0
ctrl.swimtrue when swimming2.3.0
ctrl.climbtrue when crawling and moving2.3.0
ctrl.climbingtrue when crawling and stationary2.3.0
ctrl.ladder_uptrue when climbing up a ladder2.3.0
ctrl.ladder_stillnesstrue when stationary on a ladder2.3.0
ctrl.ladder_downtrue when climbing down a ladder2.3.0
ctrl.flytrue when flying2.3.0
ctrl.elytra_flytrue when flying with Elytra2.3.0
ctrl.swim_standtrue when treading water (swimming upright)2.3.0
ctrl.attackedtrue when attacked2.3.0
ctrl.jumptrue when jumping2.3.0
ctrl.sneaktrue when sneaking and moving2.3.0
ctrl.sneakingtrue when sneaking and stationary2.3.0
ctrl.runtrue when sprinting2.3.0
ctrl.walktrue when walking2.3.0
ctrl.idletrue when idle2.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 category2.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 category2.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 category2.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 category2.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 category2.3.0
ctrl.playing_extra_animationWhether the player is playing a wheel animationReturns boolean2.5.0