Dummy Components

Deprecation Warning

'Dummy Components' is an older concept, which has been primarily replaced by actor properties. You should consider using actor properties when possible.

Dummy components are "useless" components that are only used for data storage. Dummy components don't do anything on their own. They need to be paired with secondary mechanics to have any function. Dummy components are useful because they allow us to store information on the entities, and use the information to drive graphics/gameplay mechanics.

Good examples are variant and mark_variant. These components can be set with an Integer value. In the vanilla resource pack, this Integer is used to pick the textures for the Cat, and Horse. Another good example is is_tamed, which is used by the Horse to handle whether he is ridable or not.

Dummy components are good because they allow us to save data about our entity, and then query this data using Molang.

Integer Dummies

Integer dummies are set with an integer value, which allows you to store numbers, such as 1, 10, or 1423. These integers can be read using queries. Integer dummies are the most useful.

Bit Dummies

Bit dummies store a single bit of information. Namely True or False. For example is_tamed, which is either False (not added to the entity), or True (Added to the entity).

Dummies

TypeQueryComponentNotes
Intq.variantminecraft:variant
Intq.mark_variantminecraft:mark_variant
Intq.skin_idminecraft:skin_id
Int*Filter like: "test": "is_color", colors are provided below.minecraft:colorAlso sets color in materials.
Int*No known filter, but can be used with "has_component"minecraft:color2Also sets color in materials.
Bitq.is_illager_captainminecraft:is_illager_captain
Bitq.is_babyminecraft:is_babyDisables use of minecraft:breedable
Bitq.is_shearedminecraft:is_sheared
Bitq.is_saddledminecraft:is_saddled
Bitq.is_tamedminecraft:is_tamed
Bitq.is_chestedminecraft:is_chestedWill drop chest on death
Bitq.is_poweredminecraft:is_charged
Bitq.is_stunnedminecraft:is_stunned
Bitq.can_climbminecraft:can_climbWill allow entities to climb ladders
Bitq.can_flyminecraft:can_flyMarks the entity as being able to fly, the pathfinder won't be restricted to paths where a solid block is required underneath it.
Bitq.can_power_jumpminecraft:can_power_jumpAllows the entity to power jump like the horse does in vanilla.
Bitq.is_ignitedminecraft:is_ignited
Bitq.out_of_controlminecraft:out_of_controlNew, used by code for hardcoded boat movement/particle stuff, and the Molang q. Probably safe
Bitq.has_any_family('monster')minecraft:type_familyCan use a family type and return a bit value from a family such as 'monster' as true or false.

Colors for the color and color2 components

  • black
  • blue
  • brown
  • cyan
  • gray
  • green
  • light_blue
  • light_green
  • magenta
  • orange
  • pink
  • purple
  • red
  • silver
  • white
  • yellow

Contributors