1 2.7 Playback modifiers and entity filters
mt1006 edited this page 2026-05-30 23:44:08 +02:00

Playback modifiers and entity filters

Using playback modifiers

One of the most important features of Motion Capture are playback modifiers. They allow you to change how recording is played back, without actually changing the recording itself. The most basic playback modifiers include player name and player skin modifiers, but there are more modifiers not accessible within playback start or scenes add_to arguments.

To change playback modifiers use:

  • /mocap scenes modify [scene name] [element ID] [modifier] - to set playback modifier for specific scene element
  • /mocap playback modifiers set [modifier] ... - to set modifier directly to playbacks started with playback start

Use whichever command you prefer. When applying playback modifiers you may want to save it somewhere, and/or apply different modifiers to different playbacks. You may also want to change modifiers later. That's why you will probably find scenes modify more useful.

Despite that, /mocap playback modifiers isn't that useless as there are a few more subcommands except set:

  • /mocap playback modifiers list - lists currently applied modifiers
  • /mocap playback modifiers reset - restore default modifiers
  • /mocap playabck modifiers add_to [scene name] [recording name] - add recording to a scene with applied modifiers
  • /mocap playback modifiers set [modifier] ... - change playback modifier

All modifiers applied by /mocap playback modifiers are temporal (they reset after rejoining world) and are not shared between players.

Available playback modifiers

  • player_name - specifies player name:
    • inherited (default) - inherit player name from parent scene, or else from recording
    • set [name] - set to specific name
    • blank - same as set "", with Motion Capture installed on a client, this means gray name bar above head will be hidden
  • player_skin - specifies player skin (more details here: Applying skins and "player as entity"):
    • default (default) - inherit skin from parent scene, or else load from profile with specified player name
    • from_player [player name] - load skin from player with given name
    • from_mineskin [url] - load skin from mineskin.org URL
    • from_file [file] - load skin from file
  • player_as_entity - replaces player with given entity. As of current version player_name and player_skin modifiers are ignored when player_as_entity is enabled.
    • disabled (default) - player is a normal player
    • enabled [id] [nbt] - players is replaced with entity with given ID and NBT data (nbt argument is optional)
  • entity_filter - allows to filter which entities should be included in the playback. Note that playback/entity_filter setting isn't default value of this modifier, but is applied regardless of this modifier state/value.
    • disabled (default) - allows all entities, counterpart of * filter
    • enabled [filter] - applies given filter (more details on entity filter value below)
  • transformation - group of playback modifier related to geometric transformations of playback. You can find more details about available transformation modifiers below.
  • time - group of playback modifiers related to time. You can find more details about available time modifiers below.

Entity filters

Entity filters are semicolon separated sequences of elements which are used to filter (exclude) entities from playback or recording, depending on context in which they're used.

Possible filter elements:

  • * - all entities
  • id - entity with id minecraft:id
  • namespace:id - entity with id namespace:id
  • namespace:* - entities with ids in namespace
  • $tag - entities with tag inside Tags NBT
  • @group - entities from a predefined group:
    • @none - empty group
    • @vehicles - entities rideable by player (implementing PlayerRideable interface), minecarts, and boats
    • @projectiles - projectiles
    • @items - item entities
    • @mobs - all mobs
    • @minecarts - minecarts (subset of @vehicles)

Note that as of current version * sign can only be used to match all entities or all entities in a given namespace. It doesn't work as a wildcard, so it cannot match prefixes/suffixes of ids, but such feature might be added in the future.

Each element either includes entity, or excludes it if it's preceded by the minus sign (-). Filter elements are applied in order in which they appear, which means that *;-pig will include all entities except pigs, but -pig;* includes all entities (including pigs, just like *).

Examples:

  • @none - exclude all entities
  • * - include all entities
  • horse;pig;cow - include only horses, pigs, and cows.
  • minecraft:* - include all vanilla entities (but not modded entities)
  • @mobs;-pigs;-zombie;armor_stand - include all mobs except pigs and zombies, and include armor stands
  • *;-somemod:* - include all entities except entities from "somemod"

Transformation modifiers group

Transformations are applied to all elements of a recording (entities and blocks), or all elements of a scene, unless said otherwise. Transformations are applied relative to specific point called "center" (except offset which doesn't need such point). This point is usually recording start position rounded to nearest block corner or block center. Details on how exactly it's determined and how to modify it are in the description of transformation config modifiers.

Transformations are applied in a following order: rotation, mirror, scale, offset. Previous transformations affect value of a center.

  • offset [x] [y] [z] - shifts positions (of entities and blocks) by given value ("0 0 0" by default)
  • rotation [deg] - rotates playback around Y axis by a given number of degrees (0 by default)
  • scale of_player [val] - applies scale attribute only to player entity, or other main entity if player_as_entity is enabled (1 by default)
  • scale of_scene [val] - applies scale attribute to all played back entities and tries to scale placed blocks, e.g. make single block 2x2 for val=2, (1 by default). When both of_player and of_scene scales are set, player scale is result of multiplication of this two values (player scale = of_player*of_scene).
  • mirror - mirrors positions
    • none (default) - doesn't change anything
    • over_x - mirrors over XY plane - Z values change
    • over_z - mirrors over YZ plane - X values change
    • both - applies both mirroring over XY plane and YZ plane
  • config - various transformation settings, mainly regarding center of transformations
    • round_block_pos [true/false] - when transformations may result in noninteger block positions and this value is set to true, block position and scale will be rounded, otherwise block actions will be ignored (false by default, but true for pre-1.4 scenes).
    • recording_center - specifies how transformation center for recording should be obtained
      • actual - use exact value of recording start
      • block_center - round recording start position to nearest block side center
      • block_corner - round recording start position to nearest block corner
      • auto (default) - automatically choose the best transformation center, close to recording start. If scale of_scene is 1 or is not integer, it will choose either block corner or block side center, whichever one is closer. Otherwise, if scale of_scene is even it will choose block corner, or if it's odd, block side center.
    • scene_center - specifies how transformation center for an elements of a scene to which this configuration modifier was applied should be obtained
      • common_first (default) - use center of a first element, as center for all other elements
      • common_last - use center of a last element, as center for all other elements
      • common_specific [pos] - use center of an element at given position in a scene, as center for all other elements
      • invididual - let each one element use their own center, which means transformations will be applied at an individual level to each recording, not as a whole transformation of a scene
    • center_offset - shift transformation center by a given offset ("0 0 0" by default)

Time modifiers group

Mainly related to postponing playback start or finish, and specifying behavior relative to other scene elements.

  • start_delay [sec] - by how long start should be delayed in seconds (0 by default)
  • wait_on_start [sec] - how long should recording be paused right after it has begun (0 by default)
  • wait_on_end [sec] - how long should recording be paused at the end before ending it (0 by default)
  • wait_for_parent_end [true/false] - this setting has two different meanings depending on loop value:
    • for loop set to false, don't stop until parent scene isn't stopped, that is until all the elements of a parent scene have finished playing back (true by default)
    • for loop set to true, when it's true the loop will be infinite, when false, loop will end when all other parent scene elements will finish. Loops in this mode are ignored by the parent, so they don't contribute to the overall length of a scene. In both cases default value is true.
  • loop - repeat playback until scene is finished, or indefinitely, depending on wait_for_parent_end value. Important note: when you will try to start playback with only loop set to true (without adding other elements to a scene) it will stop immediately. This is because wait_for_parent_end is set to true by default. To change this behavior and make loop infinite, set it to false.