CPM OSC Message Reference List

This page details all the messages sent from Customizable Player Models via OSC that I currently know of, along with brief explanations on what each of them represents (though most are fairly self-explanatory). This is not meant to be an exhaustive list, as it's currently based entirely on what I've observed in usage rather than pulled from the mod's source, though that is something I would like to do. Still, hopefully this should help people get started with using CPM's OSC support more easily, knowing what options they have to work with. Click a message to see more information about it.


/cpm/encodedState

Example Arguments: [63]

Information:

No clue! Unlikely to be relevant to anyone's use case.


/cpm/jumping

Example Arguments: [10247547]

Information:

Unsure - increments by some amount each time you jump, but the value has no clear meaning. Rising edge value can be used to detect if the player just jumped, in any case.


/cpm/hasSkullOnHead

Example Arguments: [false]

Information:

Is the player wearing a skull? (Assume true or false values for similar messages.)


/cpm/wearingHelm

Example Arguments: [false]

Information:

Is the player wearing a helmet? (Skulls DO count as helm here, so you can use wearingHelm and *not* wearingSkull to ensure it's armor, or use tag messages further below.)


/cpm/wearingBody

Example Arguments: [false]

Information:

Is the player wearing something on their body?


/cpm/wearingLegs

Example Arguments: [false]

Information:

Is the player wearing something on their legs?


/cpm/wearingBoots

Example Arguments: [true]

Information:

Is the player wearing something on their feet?


/cpm/wearingElytra

Example Arguments: [false]

Information:

Is the player wearing an elytra?


/cpm/sleeping

Example Arguments: [false]

Information:

Is the player currently lying in bed?


/cpm/dying

Example Arguments: [false]

Information:

Is the player currently dying? (Reports true once the player reaches 0 health, and continues to report true until the player respawns. Tracking the previous value can allow detecting changes, notably allowing for respawning animations.)


/cpm/riding

Example Arguments: [false]

Information:

Is the player riding something? (For vanilla, this includes boats, minecarts, and mountable mobs.)


/cpm/elytraFlying

Example Arguments: [false]

Information:

Is the player actively flying with elytra?


/cpm/swimming

Example Arguments: [false]

Information:

Is the player actively swimming? (Aquatic update swimming.)


/cpm/retroSwimming

Example Arguments: [false]

Information:

Is the player in water? (Notably, this does *not* become false when /cpm/swimming is true, nor does it become true when in lava.)


/cpm/sprinting

Example Arguments: [false]

Information:

Is the player currently sprinting?


/cpm/sneaking

Example Arguments: [false]

Information:

Is the player currently sneaking?


/cpm/takingDmg

Example Arguments: [false]

Information:

Unsure - expected to be true when the player is taking damage, but doesn't seem to report correctly.


/cpm/tridentSpin

Example Arguments: [false]

Information:

Is the player currently dashing with a Riptide trident?


/cpm/crawling

Example Arguments: [false]

Information:

Is the player currently crawling? (For instance, when pushed down into a 1-block-high space by a trapdoor.)


/cpm/moveAmountX

Example Arguments: [0]

Information:

How much the player's world x-position changed in the last tick. Value given in blocks per tick.


/cpm/moveAmountY

Example Arguments: [0]

Information:

How much the player's world y-position (vertical) changed in the last tick. Value given in blocks per tick.


/cpm/moveAmountZ

Example Arguments: [0]

Information:

How much the player's world z-position changed in the last tick. Value given in blocks per tick.


/cpm/attackTime

Example Arguments: [0]

Information:

This reports the percentage completion of the attacking animation. It's not recommended to use this currently, as it only reports correctly when your model is being rendered completely. In other words, when you're in first person (without the First Person Model mod), it will only report 0. If you are in third person, start an attack, and then switch back to first person before it completes, it will continue reporting the last sent value until your full model is visible again. Very unreliable. (Results may vary, this was done on Minecraft 1.20.1 with CPM v0.6.15 and CPM OSC Compat v1.5.1.)


/cpm/swimAmount

Example Arguments: [0]

Information:

Unsure - doesn't seem to respond to any kind of swimming.


/cpm/bowPullback

Example Arguments: [0]

Information:

How much the player has charged their held bow. Ranges 0.0 to 1.0, in other words, as a percentage. Resets to 0.0 when arrow is fired.


/cpm/crossbowPullback

Example Arguments: [0]

Information:

How much the player has charged their held crossbow. Same range as above. Resets to 0.0 when use button is released, *not* when arrow is fired.


/cpm/yaw

Example Arguments: [-318.680389404297]

Information:

The yaw (essentially, amount looking left and right) of the player's head. Given in degrees rotated from south. You'll want to modulo this value by 360.0 (% operator in most scripting/programming languages, so value % 360.0) as it's not bound, so continuing to rotate in the same direction will send the value way past 360 degrees in either positive or negative and effectively be useless as-is. Performing that operation gives you a tidy value between 0.0 and 360.0, representing the player's rotation in degrees from south.


/cpm/bodyYaw

Example Arguments: [-277.009307861328]

Information:

The yaw of the player's body. See above for info and recommended usage.


/cpm/pitch

Example Arguments: [0.1499931961298]

Information:

The pitch (essentially, amount looking up and down) of the player's head. Given in degrees rotated from a level view. Bound from -90.0 to 90.0, with -90.0 looking straight up, and 90.0 looking straight down.


/cpm/speakLevel

Example Arguments: [0]

Information:

Not 100% sure, presumably related to voice chat compatibility.


/cpm/hurtTime

Example Arguments: [0]

Information:

How many ticks of invulnerability the player currently has after being hurt.


/cpm/skyLight

Example Arguments: [15]

Information:

The sky light at the player's current position. Ranges 0 to 15


/cpm/blockLight

Example Arguments: [0]

Information:

The block light at the player's current position. Ranges 0 to 15.


/cpm/mainHand/name

Example Arguments: ["RIGHT"]

Information:

The player's main hand. Will be a string value, either "RIGHT" or "LEFT".


/cpm/mainHand/id

Example Arguments: [0]

Information:

Numerical representation of the above. 0 for right, and 1 for left.


/cpm/activeHand/name

Example Arguments: ["RIGHT"]

Information:

The hand which a usable item was last used in. For instance, holding a shield in your left hand and blocking will set this to "LEFT". Holding a potion in your right hand and drinking it will set this to "RIGHT". Note that this holds its value, so it will always be "RIGHT" or "LEFT", even if the player isn't actively using an item.


/cpm/activeHand/id

Example Arguments: [0]

Information:

Numerical representation of the above. 0 for right, and 1 for left.


/cpm/swingingHand/name

Example Arguments: ["RIGHT"]

Information:

The hand which the player last swung with. Both right- and left-click actions apply here, and otherwise behave the same as above.


/cpm/swingingHand/id

Example Arguments: [0]

Information:

Numerical representation of the above. 0 for right, and 1 for left.


/cpm/leftArm/name

Example Arguments: ["EMPTY"]

Information:

Very general representation of if anything is held in the player's left hand. I've checked blocks, potions, tools, armor, and so on, but only seem to find "EMPTY" and "ITEM" as values to expect. Haven't been able to find the relevant code in CPM itself to verify this for sure.


/cpm/leftArm/id

Example Arguments: [0]

Information:

Numerical representation of the above. 0 for an empty hand, and 1 for an item.


/cpm/rightArm/name

Example Arguments: ["ITEM"]

Information:

Same as above, for the player's right hand.


/cpm/rightArm/id

Example Arguments: [1]

Information:

Numerical representation of the above. 0 for an empty hand, and 1 for an item.


/cpm/usingAnimation/name

Example Arguments: ["NONE"]

Information:

A relevant name to the animation associated with the item the player is currently actively using. "NONE" is the default, with a handful of other expected values like "BLOCK" for blocking with a shield, "DRINK", "EAT", and "BOW". Currently, goat horns and brushes don't seem to have any associated entry, despite being usable items.


/cpm/usingAnimation/id

Example Arguments: [0]

Information:

Numerical representation of above:


/cpm/parrotLeft

Example Arguments: [false]

Information:

Is a parrot on the player's left shoulder?


/cpm/parrotRight

Example Arguments: [false]

Information:

Is a parrot on the player's right shoulder?


/cpm/isFreezing

Example Arguments: [false]

Information:

Is the player currently suffering the powdered snow effects? Remains true until the effect completely wears off.


/cpm/isBurning

Example Arguments: [false]

Information:

Is the player currently on fire?


/cpm/isOnLadder

Example Arguments: [false]

Information:

Is the player on a ladder at all? True if the player is in the same block space as a ladder, whether moving or not.


/cpm/isClimbing

Example Arguments: [false]

Information:

The same as above, but false when the player is sneaking in the same block space as a ladder. Curiously, still true when the player is idle in the same block space as a ladder. Use in conjunction with /cpm/moveAmountY if you wish to actually know if the player is actively ascending or descending.


/cpm/inGui

Example Arguments: [false]

Information:

Unsure - seems to always report false, no matter what menu I'm in.


/cpm/firstPersonMod

Example Arguments: [false]

Information:

Presumably reports true if using the First Person Player Model mod.


/cpm/voiceMuted

Example Arguments: [false]

Information:

Presumably if you have yourself muted when using a supported voice chat mod.


/cpm/invisible

Example Arguments: [false]

Information:

Unsure - would expect it to be true if under the effects of invisibility, but always reports false.


/cpm/animationMode/name

Example Arguments: ["PLAYER"]

Information:

"HAND" if the first-person hand was most recently rendered, "PLAYER" if the player model was most recently rendered. Looking at CPM's source, "GUI" should be a valid expected value as well, but I can't get it to report this, probably related to cpm/inGui.


/cpm/animationMode/id

Example Arguments: [0]

Information:

Numerical representation of above:


/cpm/dayTime

Example Arguments: [6000]

Information:

The current time of day in ticks. Seems to have no upper bound, so it starts from the morning of your first day in the world. Each day is on a 24000 tick cycle by default, so if you want the number of days spent in the world, modulo by 24000.


/cpm/updated

Example Arguments: [true]

Information:

Unsure - maybe is CPM up to date??


/cpm/falling

Example Arguments: [0]

Information:

The distance the player has fallen since last touching the ground, in blocks. Resets to 0.0 upon hitting the ground.


/cpm/creativeFlying

Example Arguments: [false]

Information:

Is the player currently using creative flight?


/cpm/inMenu

Example Arguments: [true]

Information:

Is the player looking at any game interface, like their inventory or a chest? This does *not* include the pause menu or any menu found within.


/cpm/health

Example Arguments: [0.25]

Information:

The player's current health, as a percentage of their maximum. Ranges 0.0 to 1.0 (0% to 100%).


/cpm/hunger

Example Arguments: [0.9]

Information:

As above, for hunger.


/cpm/air

Example Arguments: [1]

Information:

As above, for breath.


/cpm/gesture

Example Arguments: ["WaveHello"]

Information:

The name of the currently-playing gesture, or "null" if no gesture is playing.


/cpm/vanilla_pose/name

Example Arguments: ["STANDING"]

Information:

A name representing the relevant vanilla pose the player is performing. The list of values this can be is too long to exhaustively include here, but expect things like "STANDING", "SWIMMING", "RUNNING", and so on. I recommend using your scripting language of choice to print this value if you're trying to find a specific value.


/cpm/vanilla_pose/id

Example Arguments: [1]

Information:

Numerical representation of above.


/cpm/pose/name

Example Arguments: ["STANDING"]

Information:

Unsure - expected to see the names of the currently-playing custom pose (much like /cpm/gesture), but seems to just be identical to /cpm/vanilla_pose.


/cpm/pose/id

Example Arguments: [1]

Information:

Numerical representation of above.


/cpm/held_item/id

Example Arguments: ["minecraft:potion"]

Information:

The item ID of the item currently in the player's main hand.


/cpm/held_item/count

Example Arguments: [15, 64]

Information:

The quantity of the item currently in the player's main hand. The first value is the quantity held, and the second is the maximum quantity per stack for that item.


/cpm/held_item/damage

Example Arguments: [20, 59]

Information:

A representation of the damage an item has taken to its durability. The first value is how damaged the item is, and the second is how damaged the item can be before breaking. (Sample values are for a wooden pickaxe with around 66% durability remaining.)


/cpm/held_item/tags

Example Arguments: ["#minecraft:logs", "#minecraft:logs_that_burn", "#minecraft:completes_find_tree_tutorial", "#minecraft:spruce_logs"]

Information:

An array containing the tags the currently held item has.


/cpm/armor/helmet/id

Example Arguments: ["minecraft:chainmail_helmet"]

Information:

As above, for the player's helmet slot. Will be "minecraft:air" when nothing is worn.


/cpm/armor/helmet/count

Example Arguments: [1, 1]

Information:

As above, for the player's helmet slot.


/cpm/armor/helmet/damage

Example Arguments: [0, 165]

Information:

As above, for the player's helmet slot.


/cpm/armor/helmet/tags

Example Arguments: ["#minecraft:trimmable_armor"]

Information:

As above, for the player's helmet slot.


/cpm/armor/chestplate/id

Example Arguments: ["minecraft:air"]

Information:

As above, for the player's chest slot. Will be "minecraft:air" when nothing is worn.


/cpm/armor/chestplate/count

Example Arguments: [0, 64]

Information:

As above, for the player's chest slot.


/cpm/armor/chestplate/damage

Example Arguments: [0, 0]

Information:

As above, for the player's chest slot.


/cpm/armor/chestplate/tags

Example Arguments: []

Information:

As above, for the player's chest slot.


/cpm/armor/leggings/id

Example Arguments: ["minecraft:air"]

Information:

As above, for the player's leggings slot. Will be "minecraft:air" when nothing is worn.


/cpm/armor/leggings/count

Example Arguments: [0, 64]

Information:

As above, for the player's leggings slot.


/cpm/armor/leggings/damage

Example Arguments: [0, 0]

Information:

As above, for the player's leggings slot.


/cpm/armor/leggings/tags

Example Arguments: []

Information:

As above, for the player's leggings slot.


/cpm/armor/boots/id

Example Arguments: ["minecraft:golden_boots"]

Information:

As above, for the player's boots slot. Will be "minecraft:air" when nothing is worn.


/cpm/armor/boots/count

Example Arguments: [1, 1]

Information:

As above, for the player's boots slot.


/cpm/armor/boots/damage

Example Arguments: [0, 91]

Information:

As above, for the player's boots slot.


/cpm/armor/boots/tags

Example Arguments: ["#minecraft:trimmable_armor", "#minecraft:piglin_loved"]

Information:

As above, for the player's boots slot.


/cpm/off_hand/id

Example Arguments: ["minecraft:air"]

Information:

As above, for the player's offhand.


/cpm/off_hand/count

Example Arguments: [0, 64]

Information:

As above, for the player's offhand.


/cpm/off_hand/damage

Example Arguments: [0, 0]

Information:

As above, for the player's offhand.


/cpm/off_hand/tags

Example Arguments: [0, 0]

Information:

As above, for the player's offhand.


/cpm/heldSlot

Example Arguments: [4]

Information:

The currently-selected hotbar slot. Zero-indexed, so the first slot on the hotbar will report 0, rather than 1.


/cpm/world/below/id

Example Arguments: ["minecraft:grass_block"]

Information:

The ID of the block below the player's feet, including "minecraft:air" if in the air, or any fluid that is occupying the space below the player. Both flowing fluid and source blocks report the same ID.


/cpm/world/below/tags

Example Arguments: ["#minecraft:wolves_spawnable_on", "#minecraft:azalea_root_replaceable", "#minecraft:rabbits_spawnable_on", "#minecraft:dirt", "#minecraft:nether_carver_replaceables", "#minecraft:dead_bush_may_place_on", "#minecraft:animals_spawnable_on", "#minecraft:frogs_spawnable_on", "#minecraft:enderman_holdable", "#minecraft:foxes_spawnable_on", "#minecraft:bamboo_plantable_on", "#minecraft:sculk_replaceable_world_gen", "#minecraft:goats_spawnable_on", "#minecraft:sculk_replaceable", "#minecraft:valid_spawn", "#minecraft:mineable/shovel", "#minecraft:moss_replaceable", "#minecraft:lush_ground_replaceable", "#minecraft:overworld_carver_replaceables", "#minecraft:big_dripleaf_placeable", "#minecraft:azalea_grows_on", "#minecraft:parrots_spawnable_on", "#minecraft:sniffer_diggable_block"]

Information:

Tags of the block below the player's feet.


/cpm/world/feet/id

Example Arguments: ["minecraft:air"]

Information:

Similar to above, but for the block immediately at the player's feet. This will usually be air or a given fluid or semi-solid block the player is in or on, like water, lower half slabs, or torches.


/cpm/world/feet/tags

Example Arguments: ["#minecraft:replaceable", "#minecraft:parrots_spawnable_on", "#minecraft:enchantment_power_transmitter"]

Information:

Similar to above.


/cpm/world/head/id

Example Arguments: ["minecraft:air"]

Information:

Similar to above, but for the block at the player's head (one block above foot level, in other words).


/cpm/world/head/tags

Example Arguments: ["#minecraft:replaceable", "#minecraft:parrots_spawnable_on", "#minecraft:enchantment_power_transmitter"]

Information:

Similar to above.


/cpm/world/canSeeSky

Example Arguments: [true]

Information:

Is there a clear line of sight directly above the player to the sky? Tile entities and transparent blocks like glass will not affect cause this to be false.


/cpm/world/weather/name

Example Arguments: ["CLEAR"]

Information:

The name of the current in-game weather.


/cpm/world/weather/id

Example Arguments: [0]

Information:

Numerical representation of above:


/cpm/world/y

Example Arguments: [0.16666667163372, 0, -64, 320]

Information:

An array of values relating to the player's depth relative to the world's upper and lower bounds, as well as those bounds. The first value is a percentage of the player's position from bedrock to the build limit of the current dimension, the second is their absolute y-block position with no decimal, the third is the bedrock height of the current dimension, and the fourth is the build limit of the current dimension. The player values are not bound by the world's height limits, so the first and second values can go below or above those limits (below bedrock or above build limit).


/cpm/world/biome/id

Example Arguments: ["minecraft:plains"]

Information:

The ID of the biome the player is currently in.


/cpm/world/biome/tags

Example Arguments: ["#minecraft:has_structure/stronghold", "#minecraft:has_structure/mineshaft", "#c:in_overworld", "#minecraft:has_structure/village_plains", "#minecraft:stronghold_biased_to", "#c:climate_temperate", "#minecraft:has_structure/pillager_outpost", "#minecraft:is_overworld", "#minecraft:has_structure/ruined_portal_standard", "#c:plains"]

Information:

The tags of the biome the player is currently in. Expect this to be big usually.


/cpm/world/biome/rainType/name

Example Arguments: ["RAIN"]

Information:

The type of weather you'll see when it's raining in the current biome.


/cpm/world/biome/rainType/id

Example Arguments: [1]

Information:

Numerical representation of above:


/cpm/world/biome/temperature

Example Arguments: [0.80000001192093]

Information:

The temperature in the current biome.


/cpm/world/biome/humidity

Example Arguments: [0.40000000596046]

Information:

The humidity in the current biome.


/cpm/vehicle/id

Example Arguments: ["minecraft:boat"]

Information:

The specific ID of the "vehicle" the player is currently on, or "null" if not mounted on anything.


/cpm/vehicle/tags

Example Arguments: ["#c:boats"]

Information:

The tags of the "vehicle" the player is currently on.


/cpm/potion

Example Arguments: ["minecraft:invisibility", 0, 3422, false, "minecraft:water_breathing", 0, 9546, false, "minecraft:jump_boost", 0, 3477, false]

Information:

An array containing information about currently-active potion effects, ordered the same as you see them on the in-game HUD. Each effect ID is followed by an amplifier value (each level of potion strength affects this), the remaining duration in ticks, and a boolean for whether or not the effect particles are hidden. If the remaining duration is -1, that effect is infinite.


/cpm/gameTime

Example Arguments: [11331041]

Information:

The current game tick time. Specifically, it appears to be how many milliseconds have elapsed with a world loaded. This value minus the value it was last tick will give you the milliseconds between OSC messages, and is always sent every game tick, so it can be used for timekeeping or ensuring your own OSC messages are only computed as often as CPM can respond to them.



Thanks to Pulse and Dryym for help in figuring out some things with /cpm/attackTime and /cpm/potion respectively, as well as anukwarrior for testing a lot of things related to the tickrate.