Skip to content

API reference / @jsprismarine/entities

@jsprismarine/entities ​

Join the Discord Servernpm

The Bedrock entity runtime: definition parsing, the component and component-group state machine, the event engine, entity properties, the filter evaluator and the goal scheduler. It builds on @jsprismarine/content for registries, component binding and hook dispatch, on @jsprismarine/packs for the filter grammar, and on a caller-supplied Molang evaluator for the expressions component bodies carry.

typescript
import { EntityTypes } from '@jsprismarine/entities';

const types = new EntityTypes();
const diagnostics = types.load(files); // { data, pack, path } per entity file

const zombie = types.spawn('minecraft:zombie');
zombie.fire('minecraft:start_transforming_into_drowned');
zombie.tick(); // the event lands here, not when it was fired

The definition model ​

An entity file is {"format_version": "<semver>", "minecraft:entity": {...}}, and the entity body has description, components, component_groups, events and upgrades. Mojang's own ActorDocument.json types those five keys and leaves every body dynamic, so parseEntityDefinition validates structure and reports an unknown key rather than refusing the file. A pack written against a newer game still loads, and the report names what the runtime did not read.

description yields identifier, isSpawnable, isSummonable, isExperimental, spawnCategory, runtimeIdentifier, properties, animations, scripts and entityVersion.

format_version gates four things, and a file that uses one below its version loads and is reported as entity.versionGate: root-level event filters need 1.19.20, queue_command needs 1.20.60, emit_particle and play_sound need 1.21.50, and entity_version with upgrades needs 1.26.20.

components is the always-active set. component_groups is a map of group name to component map, inactive until an event adds it. Both resolve once at load: the base components through resolveTypes, the groups through the same ComponentRegistry, and the result is an EntityType that answers questions without parsing anything.

Java datapack entity_type tags are mapped to Bedrock identifiers during content loading. EntityType.tags and EntityType.hasTag() expose those memberships to type consumers, while EntityInstance.getTags() and EntityInstance.hasTag() expose them on live entities. Bedrock minecraft:type_family remains separate and continues to drive family filters.

The event engine ​

An event runs in two steps, which is the rule the documentation states. The effects are determined immediately and applied when the entity next ticks, so a filter in a later sequence entry cannot see what an earlier one changed. determineEvent is the first step and returns EventEffects; EntityInstance.fire queues them and EntityInstance.tick applies them.

Within one node the engine runs add, remove, set_property, the raw actions and trigger, then walks sequence in order, then draws one branch of randomize, then takes the first passing branch of first_valid. A node's own filters gate the whole node. Nodes nest without limit.

  • randomize weights are relative, not percentages. The zombie's spawn event writes 9500, 425 and 75; other entities write 1 and 1. The draw goes through a RandomSource a caller injects, so a test scripts it.
  • trigger on self folds into the same result, with a cycle guard that reports instead of looping. A trigger on other, player, target, baby, parent, holder or block comes back as an OutgoingTrigger for the caller to route.
  • set_property takes a literal or an expression. A string is ambiguous in the file, because the engine reads it as Molang and vanilla also writes enum members bare, so the parser keeps the text and the engine resolves it: a member of the target property's enum wins, and anything else goes to the Molang evaluator.

Event actions ​

Nine action keys parse into an EntityAction and run. Eight are everything the composed vanilla pack writes, measured over its 850 events: play_sound 23 uses, set_home_position 17, emit_vibration 9, drop_item 2, execute_event_on_home_block 2, and one each of emit_particle, reset_target and stop_movement. The ninth is queue_command, which the documentation describes and no vanilla entity uses. Four of those eight appear in no documentation page.

Six of the nine leave the package through EntityEnvironment.effects: playSound, emitParticle, emitVibration, queueCommand, dropItem and executeEventOnBlock. The other three stay here. set_home_position reads the actuator's position and records it, which is what home_distance then measures against; stop_movement abandons the path through the actuator; and reset_target clears the attack target the entity owns.

Nothing passes silently. An action key the package does not parse, a body it cannot read, and an action whose environment member a caller left out each reach the report with the event that asked.

Applying effects removes groups first and adds second, so a group an event both removes and adds ends up active and re-initialized. That is the documented rule: "adding a component group that is already active will cause those components to be re-initialized ... an already-added minecraft:timer that is added again will start its timing logic over." A re-added group also moves to the end of the active list, so its components replace an earlier group's.

Exactly one spawn event runs when an entity is created. spawnEventFor maps the cause to minecraft:entity_spawned, minecraft:entity_born, minecraft:entity_transformed or minecraft:on_prime, and an event the caller names replaces it rather than adding to it, which is what /summon, a spawn rule's initial_event, minecraft:spawn_entity.spawn_event and the minecraft:drowned<minecraft:as_adult> form in transformation.into all do.

Entity properties ​

description.properties declares int, float, enum and bool properties. An int or float clamps into its range silently, an enum accepts only its declared members, and a write of anything else is refused and reported. A default is a literal or a Molang expression; the expression goes to EntityEnvironment.propertyDefault, which takes no entity because a default may only call query.had_component_group. The documented limits are checked and reported rather than enforced: 32 properties per entity, 16 members per enum, member names starting with a letter.

Filters read properties through int_property, float_property, bool_property, enum_property and has_property, and an entity answers those about itself with no caller view, along with has_component, is_family, is_baby, is_tamed, is_missing_health, is_persistent, actor_health, is_variant, is_mark_variant and is_skin_id.

The filter grammar ​

@jsprismarine/packs owns the grammar and parses both encodings, including the integer subject and operator the 1.26 serializer writes in 27 vanilla entity files and the AND, OR, NOT, all and any aliases. This package evaluates the parsed form against a FilterContext.

A context holds the subjects (self, other, player, target, parent, baby, damager, holder), an item view, a block view, a world view and a random source. Every view member is optional, and a test whose fact no view answers evaluates to false and reports through onUnanswered, which is what the engine does for a fact it cannot establish. self is the only required subject, because it is what a test with no subject key reads.

The entity view is deliberately small: flag, measure and names take the test's own name, so one member answers 43 boolean tests, one answers 17 numeric tests and one answers 12 name-set tests. The rest are the facts that need their own shape: properties, components, equipment, slot fill, vehicle, owner, attack target, leash holder and trust.

Two shapes the vanilla files write are not in the published grammar, and the packs parser reads both. Five vanilla filters put all_of and any_of in one object, which reads as one all_of over the two groups; one filter, in the skeleton's minecraft:lightning_immune group, writes the legacy shorthand {"other_with_families": "lightning"}. parseEntityFilter is that parser under the name this package calls it by.

The goal seam ​

A goal is a component carrying a priority and control_flags. goalComponent wraps a GoalFactory into a component factory that parses those two fields, builds the goal when the component initializes and takes it off the scheduler when its group is removed. A later agent implementing the other 167 goals writes exactly this:

typescript
export interface GoalFactory<P> {
    /** The component name, such as `minecraft:behavior.random_stroll`. */
    readonly name: string;
    /** The control flags the goal holds when the definition names none. */
    readonly controlFlags: readonly ControlFlag[];
    /** Parses the goal's own parameters; `priority` and `control_flags` are handled for you. */
    readonly schema: ComponentSchema<P>;
    /** Builds the goal for one entity, each time the component initializes. */
    create(params: P, entity: EntityInstance): Goal;
}

export interface Goal {
    canStart(): boolean;
    canContinue?(): boolean;
    start?(): void;
    stop?(): void;
    tick?(): void;
}

ControlFlag is move, look or jump. The scheduler stops every running goal that cannot continue, then walks the registered goals from priority 0 upward and starts each one whose control flags are free or held by a strictly worse priority, stopping the holder in the same tick. That is the documented rule: "0 is the highest priority ... If the entity is busy doing a low priority behavior and a high priority behavior comes up, the entity will immediately switch." A goal with no control flags runs alongside everything else, which is how the targeting goals work. Ties break by name so the order is stable.

minecraft:behavior.float, minecraft:behavior.random_stroll and minecraft:behavior.look_at_player ship as reference implementations, one per control flag. They move the entity through EntityActuator, the navigation and look-control seam a caller supplies.

Damage, triggers and riding ​

Three pieces of entity state live here because the components that read and write them do.

EntityInstance.damage runs one damage event end to end. The first component that answers onDamage decides the amount, which is what minecraft:damage_sensor does with its cause list and filters. An immunity component turns the cause aside afterwards, so a sensor still fires its event on damage the entity ends up ignoring: minecraft:fire_immune covers campfire, fire, fire_tick, lava, magma and soul_campfire, and minecraft:freezing_immune covers freezing. What is left comes off the health attribute. Whoever dealt the damage answers both the damager and the other filter subjects.

minecraft:cannot_be_attacked blocks attacks from entities. An attacker can carry minecraft:ignore_cannot_be_attacked to allow all targets, or only targets passing its filters. minecraft:angry.filters excludes matching targets while that component is active. The runtime applies both rules during entity target checks, melee, projectile, and explosion damage.

The ten event-shaped minecraft:on_* components fire through EntityInstance.trigger, which evaluates the component's filters, queues a self event for the next tick and routes any other target. Nine fire at fixed points the runtime owns: on_hurt, on_hurt_by_player and on_death from a damage event, on_target_acquired and on_target_escape from setAttackTarget, on_friendly_anger from the anger broadcast, on_start_landing when an airborne entity lands, and on_start_takeoff after a successful ground jump, and on_wake_with_owner when a sleeping cat's owner wakes. Prismarine also fires on_ignite when daylight starts a fire. The slot-specific minecraft:on_equipment_changed raises the first matching on_equip or on_unequip event when a default equipment slot changes; inventory slots are outside its scope.

minecraft:rideable seats riders on the vehicle. mount checks the seat count and the family_types list, moves a rider off whatever it was riding, and fires on_rider_enter_event; dismount fires on_rider_exit_event; and taking the component off a group empties the seats. That answers rider_count and is_controlling_passenger_family on the vehicle, and is_riding and the vehicle subject on the rider.

Components ​

Components come in two kinds, and the difference matters when reading the coverage numbers.

Components with behavior contribute hooks. The nine attribute components (health, movement, underwater_movement, lava_movement, flying_speed, follow_range, knockback_resistance, attack_damage, horse.jump_strength) and minecraft:attack write their attribute when they initialize, which is what makes a re-added group reset the stat it carries. minecraft:attack also applies its configured status effect after a melee hit. The rest:

ComponentWhat it does
minecraft:timerDraws its duration and raises its event, restarting whenever its group is re-added
minecraft:spawn_entityCounts down each configured entry, then spawns its item or entity, honoring filters, count, event, sound, and single_use
minecraft:spawn_egg_interactionUses a matching spawn egg to create the offspring declared by the entity's component data
minecraft:offspring_dataDeclares compatible mates and offspring pairs for breeding and spawn egg interactions
minecraft:breedableMatches breed_items, checks tame, health, baby, love, and cooldown requirements, enters the love state, and replaces the consumed item with its per-item result_item (component reference)
minecraft:ageableCounts duration down, advances the remaining time by matching feed_items and their growth, pauses or resets it through the configured items and events, applies result_item, drops drop_items on growth, honors interact_filters, and raises grow_up (component reference)
minecraft:healableMatches a configured item and filter, restores health when the entity is injured or force_use is set, applies each configured effect with its chance, duration, and amplifier, and replaces the consumed item with result_item (component reference)
minecraft:combat_regenerationWhen its current attack target dies, applies Regeneration I to the killer when apply_to_self or apply_to_family allows it, and removes Mining Fatigue (component reference)
minecraft:mob_effectApplies the configured effect to nearby mobs and players that pass entity_filter, honoring effect_range, effect_time, cooldown_time, and ambient (component reference)
minecraft:spell_effectsApplies its configured effects and then removes the named effects when the component is added; restored entities do not repeat the one-time operation (component reference)
minecraft:tameableAccepts configured tame_items, rolls probability for each attempt, and on success records the owner, raises tame_event, and replaces the consumed item with result_item; failed attempts are accepted and consume one item outside creative mode (component reference)
minecraft:interactApplies on_interact.filters and events, enforces cooldowns, projects interact_text to touch-screen clients, plays play_sounds, emits vibration, adjusts health, emits particle_on_start at the entity with its configured offsets, repairs entity inventory or equipment items, moves an entity's main-hand item into an empty player hand, creates configured entities, rolls add_items and spawn_items loot tables, uses or transforms the live player's item, equips or drops named equipment and minecraft:inventory slots, and gives items to the entity's main hand. Piglin interactions can start admiration and request a barter when the matching components are active. Successful interactions relay the player's arm swing to other viewers tracking them by default; set swing: false to suppress it. Non-none particle_on_start.copper_event still reports as unsupported (component reference)
minecraft:admire_itemSets the piglin's admiration duration and the cooldown after damage, which ends current admiration and disables new attempts
minecraft:barterRolls barter_table with the barter loot context after the piglin releases its gold ingot, honoring the cooldown after damage
minecraft:angryCounts down over duration plus or minus duration_delta, raises calm_event, excludes targets with filters, broadcasts on activation, attack, being attacked, or death as configured, and plays angry_sound on its sound_interval (component reference)
minecraft:environment_sensorEvaluates its triggers against the world every tick
minecraft:entity_sensorSearches nearby mobs and players for each subsensor, applies event_filters, count bounds, require_all, range offsets, and cooldowns, then raises its event (component reference)
minecraft:block_sensorRaises every matching on_block_broken event when a listed block breaks within sensor_radius, applying sources to the breaker (component reference)
minecraft:inside_block_notifierTracks block states overlapped by the entity and raises the configured events when it enters or leaves a match (component reference)
minecraft:target_nearby_sensorTracks the current target through inside_range and outside_range, honors must_see for inside events, and fires its vision-loss event while the target is inside range
minecraft:homeRecords the entity's spawning position for home-based behavior unless an event or save already supplied one (component reference)
minecraft:teleportTries timed random destinations, teleports toward a distant target, and evades matching projectiles before their hit effects apply (component reference)
minecraft:shareablesMatches item names and tags during pickup and sharing, prioritizes rules, applies pickup limits and piglin admiration or barter flags, carries consume_item pickups for eat_carried_item, stores stored_in_inventory items in the entity container, and shares from both container slots and the flat inventory using surplus and wanted amounts. A craft_into rule uses a loaded crafting recipe that consumes copies of its input and yields a plain item (component reference)
minecraft:damage_sensorAnswers a damage event by cause and filters; the first trigger that matches wins
minecraft:hurt_on_conditionHurts the entity every half second while a condition's filters pass
minecraft:damage_over_timeHurts the entity every time_between_hurt seconds while it is active
minecraft:burns_in_daylightValidates protection_slot; the dimension runtime ignites the entity in direct sunlight unless that slot is occupied or it is wet, keeps fire while exposed, and applies fire damage
minecraft:breathableSpends and refills the air supply, and suffocates once it is gone
minecraft:ambient_sound_intervalPlays its sound on the interval its body names
minecraft:rideableHolds the seats, and empties them when the component goes
minecraft:transformationCounts down and asks the world to replace the entity
minecraft:despawnApplies the distance and chance rules, or its filters, unless the entity is persistent
minecraft:instant_despawnRemoves the entity the moment it becomes active
minecraft:ignore_cannot_be_attackedLets attacker data filter exceptions to a target's attack protection
minecraft:on_* triggersRaise events at their owning fixed point; on_equipment_changed watches default equipment slots

Other empty markers are read directly rather than through hooks: minecraft:persistent stops minecraft:despawn; minecraft:transient excludes the actor from saved records; minecraft:fire_immune and minecraft:freezing_immune turn their causes aside in EntityInstance.damage; and minecraft:cannot_be_attacked blocks entity attacks unless the attacker's minecraft:ignore_cannot_be_attacked filter allows the target. minecraft:fire_immune also sets the Bedrock actor's FIRE_IMMUNE flag. minecraft:body_rotation_blocked projects to BODY_ROTATION_BLOCKED. minecraft:out_of_control projects to OUT_OF_CONTROL. minecraft:strength is parsed as value (default 1) and max (default 5); the entity runtime adds value * additional_slots_per_strength to an inventory's declared size.

Data components parse, normalize and expose their value through EntityInstance.componentParams. The separate breeding runtime reads compatible mates and offspring pairs from minecraft:offspring_data. Entity definitions using the older minecraft:offspring spelling are normalized to that component when their type is resolved. The pathfinder reads minecraft:can_climb to climb ladders and minecraft:can_fly to allow airborne paths, and reads minecraft:can_stand_on_powder_snow to treat powder snow as support. The runtime projects minecraft:can_climb to CANCLIMB, the active navigation profile's walk and swim abilities to CANWALK and CANSWIM, and its flight ability to CANFLY. It projects minecraft:can_power_jump, minecraft:dash_action, minecraft:input_ground_controlled, minecraft:free_camera_controlled, and minecraft:vertical_movement_action to CAN_POWER_JUMP, CAN_DASH, WASD_CONTROLLED, WASD_FREE_CAMERA_CONTROLLED, and CAN_USE_VERTICAL_MOVEMENT_ACTION. These flags tell the client which controls are available; the server does not yet apply those inputs to entity movement. The outer runtime also reads physics values from the active component set: minecraft:air_drag_modifier changes air resistance, minecraft:uses_uniform_air_drag applies the same drag on both axes, minecraft:friction_modifier changes ground friction, and minecraft:bounciness changes how much impact velocity a collision returns. minecraft:collision_box, minecraft:type_family, minecraft:loot, minecraft:experience_reward, minecraft:inventory, minecraft:equipment, minecraft:physics, minecraft:pushable, minecraft:air_drag_modifier, minecraft:friction_modifier, minecraft:bounciness, minecraft:nameable, minecraft:is_dyeable, the seven minecraft:navigation.* flavors, the nine minecraft:movement.* flavors and the six integer state components are written out; the rest are parsed structurally. minecraft:type_family and the integer state components are data a filter reads, so an entity answers is_family, is_variant, is_mark_variant and is_skin_id from them with no caller view. minecraft:nameable gates name-tag use, queues its default and matching name events, and projects the configured visibility and custom name to the client. minecraft:is_dyeable gates dye use, updates the entity's palette color, and projects its touch-screen prompt.

Every non-goal key in the vanilla pack has a component factory, so the loader preserves its body and exposes it through EntityInstance.componentParams. Some of the 34 keys used by only one entity still have no runtime behavior. Their factories preserve their bodies, and the corpus test counts them as parsed rather than behaviorally implemented.

Measured coverage ​

Against the composed vanilla behavior pack of Bedrock Dedicated Server 1.26.51.1, through the corpus test in src/vanillaEntities.test.ts:

MeasureResult
Entity definitions composed129
Files that parse without an error129
Unknown top-level or description keys0
Non-goal component keys in vanilla202, all registered
Non-goal keys with a component hook85
Non-goal keys with a runtime effect across the server96
Entities whose every non-goal component is registered129 of 129
Goal names in vanilla170, all registered by @jsprismarine/entity-goals
Entities that declare goals92 of 129; all their goal names are registered
Filter tests the documentation lists107, all implemented
Filter tests vanilla uses86, all implemented
Event action keys vanilla uses8, all carried out; 56 uses
Stats both editions publish for the same entity438, of which 287 agree

The 151 stats the two editions disagree on, measured against the 93 entity types of @jsprismarine/bedrock-data's java_entity_attributes, are movement_speed 42, height 35, width 24, follow_range 21, attack_damage 15, max_health 10, flying_speed 2 and knockback_resistance 2.

Java's table is keyed by Java's entity names, and five types spawn under the name Bedrock used before Mojang renamed them: the evoker as evocation_illager, the villager and zombie villager as villager_v2 and zombie_villager_v2, the tropical fish as tropicalfish and the zombified piglin as zombie_pigman. Those rows are found through @jsprismarine/mapping, so the decision reaches them too.

Which edition wins is decided per stat in src/javaStats.ts and recorded in ADR 0001. Java decides the four a Bedrock client never computes for itself, so the wither spawns with Java's 300 health rather than Bedrock's 600 and the witch follows from Java's 16 blocks rather than 64. Bedrock decides the five the client predicts an actor with, which ClientMovementPredictionSyncPacket enumerates: the bounding box width and height, the movement and flying speeds, and the jump strength. 33 disagreements resolve to Java, 103 keep Bedrock's value because Bedrock decides the stat, and 15 are reviewed exceptions where Java publishes a number it overwrites at spawn, such as the horse's 53 health or a slime's.

Pass the table in to turn the decision on:

typescript
import { java_entity_attributes } from '@jsprismarine/bedrock-data';

const wither = types.spawn('minecraft:wither', { environment: { javaStats: java_entity_attributes } });
wither.attributes.get('health')?.base; // 300, where the pack writes 600

statRuling(identifier, stat) answers why one entity's stat resolved the way it did, so a parity row quotes the decision instead of keeping a second copy of it.

The registry recognizes all 202 non-goal component names used by the 129 vanilla entities. That measures name coverage rather than complete simulation: 85 component factories have hooks, and 96 components have a runtime effect across the server when host reads and protocol projections are included. The remaining 106 bodies are available as data for behavior that still needs to be added.

minecraft:area_attack has a dedicated schema here; Prismarine applies its filtered, cooldowned range damage from the active component set.

For minecraft:teleport, the actuator supplies reachable destinations and the current target position. Prismarine moves the entity and marks the client update as a teleport. Matching projectile hits can be evaded before damage lands.

minecraft:target_nearby_sensor reads the entity's current target, checks follow_range, and uses the current block view to determine whether a solid block occludes the path between their eyes.

The corpus test needs the sources that pnpm --filter @jsprismarine/bedrock-data run fetch:sources caches and runs only with JSP_VANILLA_ENTITIES set:

sh
JSP_VANILLA_ENTITIES=1 pnpm --filter @jsprismarine/entities exec vitest run src/vanillaEntities.test.ts

What a later agent adds ​

  • Goal parity. All 170 vanilla goal names have registered factories, and the totality test keeps that inventory complete. The remaining work is validating each goal's world effects and timing against its game behavior.
  • Spawn rules. The 21 spawn-rule components, the population pools and the herd placement. The filter evaluator and spawnEventFor already take the initial_event, event and permute_type names a spawn rule hands over.
  • Trading. minecraft:economy_trade_table and minecraft:trade_table parse as data today; the tier, demand and restock machinery is the trading agent's.
  • The world seams. EntityActuator for navigation and look control, EntityEnvironment.remove and transform for despawn and transformation, effects for the six event actions that leave the package, route for a trigger aimed at another entity, molang for the expressions in component bodies, and filterContext for everything about the world a filter asks.
  • Remaining entity component behavior. Of the 202 non-goal component names in the vanilla pack, 106 currently expose data without runtime behavior. The component bodies remain accessible to the host, but registration alone does not mean the server simulates them.

Classes ​

Interfaces ​

AdmireItemParams ​

Defined in: entities/src/components/interactions.ts:120

What minecraft:admire_item declares. Durations are in seconds.

Properties ​

cooldownAfterBeingAttacked ​

readonly cooldownAfterBeingAttacked: number

Defined in: entities/src/components/interactions.ts:124

Time after damage during which the entity will not admire items.

duration ​

readonly duration: number

Defined in: entities/src/components/interactions.ts:122

How long the entity admires an offered item.


AgeableParams ​

Defined in: entities/src/components/lifecycle.ts:301

What minecraft:ageable declares.

Properties ​

dropItems ​

readonly dropItems: readonly unknown[]

Defined in: entities/src/components/lifecycle.ts:317

Items dropped when the entity grows up.

duration ​

readonly duration: number

Defined in: entities/src/components/lifecycle.ts:303

How long the baby takes to grow up, in seconds; vanilla writes 1200 in all but one body.

feedItems ​

readonly feedItems: readonly unknown[]

Defined in: entities/src/components/lifecycle.ts:311

Items that feed the baby, and the fraction of its remaining growth time each item advances.

growUp? ​

readonly optional growUp?: SensorTrigger

Defined in: entities/src/components/lifecycle.ts:305

The event fired when the entity finishes growing.

interactFilters? ​

readonly optional interactFilters?: Filter

Defined in: entities/src/components/lifecycle.ts:319

Gates the feeding interaction.

pauseGrowth? ​

readonly optional pauseGrowth?: SensorTrigger

Defined in: entities/src/components/lifecycle.ts:307

The event fired when one of pause_growth_items is used.

pauseGrowthItems ​

readonly pauseGrowthItems: readonly unknown[]

Defined in: entities/src/components/lifecycle.ts:313

Items that pause growth when fed to the baby.

resetGrowth? ​

readonly optional resetGrowth?: SensorTrigger

Defined in: entities/src/components/lifecycle.ts:309

The event fired when one of reset_growth_items is used.

resetGrowthItems ​

readonly resetGrowthItems: readonly unknown[]

Defined in: entities/src/components/lifecycle.ts:315

Items that reset the countdown when fed to the baby.


AmbientSoundChoice ​

Defined in: entities/src/components/lifecycle.ts:458

One {condition, event_name} entry of minecraft:ambient_sound_interval.event_names.

Properties ​

condition? ​

readonly optional condition?: string

Defined in: entities/src/components/lifecycle.ts:460

A Molang expression; the first entry whose condition holds wins.

eventName ​

readonly eventName: string

Defined in: entities/src/components/lifecycle.ts:461


AmbientSoundIntervalParams ​

Defined in: entities/src/components/lifecycle.ts:465

What minecraft:ambient_sound_interval declares.

Properties ​

choices ​

readonly choices: readonly AmbientSoundChoice[]

Defined in: entities/src/components/lifecycle.ts:472

eventName ​

readonly eventName: string

Defined in: entities/src/components/lifecycle.ts:471

The sound played when no conditional entry holds.

range ​

readonly range: number

Defined in: entities/src/components/lifecycle.ts:469

How many more seconds the engine may add to the wait.

value ​

readonly value: number

Defined in: entities/src/components/lifecycle.ts:467

The shortest wait between sounds, in seconds.


AngryParams ​

Defined in: entities/src/components/combat.ts:276

What minecraft:angry declares.

Properties ​

angrySound? ​

readonly optional angrySound?: string

Defined in: entities/src/components/combat.ts:294

broadcastAnger ​

readonly broadcastAnger: boolean

Defined in: entities/src/components/combat.ts:284

Whether anger spreads to nearby matching entities.

broadcastAngerOnAttack ​

readonly broadcastAngerOnAttack: boolean

Defined in: entities/src/components/combat.ts:286

Whether this entity broadcasts anger when it attacks.

broadcastAngerOnBeingAttacked ​

readonly broadcastAngerOnBeingAttacked: boolean

Defined in: entities/src/components/combat.ts:288

Whether this entity broadcasts anger when another entity attacks it.

broadcastAngerWhenDying ​

readonly broadcastAngerWhenDying: boolean

Defined in: entities/src/components/combat.ts:290

Whether this entity broadcasts anger when it dies; defaults to true.

broadcastFilters? ​

readonly optional broadcastFilters?: Filter

Defined in: entities/src/components/combat.ts:297

broadcastRange ​

readonly broadcastRange: number

Defined in: entities/src/components/combat.ts:291

broadcastTargets? ​

readonly optional broadcastTargets?: readonly string[]

Defined in: entities/src/components/combat.ts:299

Entity families that receive the anger; omitted means the same entity type.

calm? ​

readonly optional calm?: SensorTrigger

Defined in: entities/src/components/combat.ts:282

The event fired when the anger runs out.

duration ​

readonly duration: number

Defined in: entities/src/components/combat.ts:278

How long the anger lasts, in seconds.

durationDelta ​

readonly durationDelta: number

Defined in: entities/src/components/combat.ts:280

How far either side of duration the engine draws the real length.

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/components/combat.ts:293

A mob that passes this filter is excluded from attack targets while this component is active.

soundInterval ​

readonly soundInterval: readonly [number, number]

Defined in: entities/src/components/combat.ts:296

Integer seconds between repeated angry sounds; a zero interval disables repeats.


AreaAttackParams ​

Defined in: entities/src/components/combat.ts:43

What minecraft:area_attack declares.

Properties ​

cause ​

readonly cause: string

Defined in: entities/src/components/combat.ts:45

Damage cause reported to damage sensors and death handling.

damageCooldown ​

readonly damageCooldown: number

Defined in: entities/src/components/combat.ts:47

Seconds between hits to the same target.

damagePerTick ​

readonly damagePerTick: number

Defined in: entities/src/components/combat.ts:49

Damage dealt to each eligible target.

damageRange ​

readonly damageRange: number

Defined in: entities/src/components/combat.ts:51

Maximum distance between the entities' collision boxes.

deathMessageOverride ​

readonly deathMessageOverride: string | undefined

Defined in: entities/src/components/combat.ts:55

Localization key used when this attack kills a player.

entityFilter ​

readonly entityFilter: Filter | undefined

Defined in: entities/src/components/combat.ts:53

Filter a target has to pass before this component damages it.

playAttackSound ​

readonly playAttackSound: boolean

Defined in: entities/src/components/combat.ts:57

Whether to play the attack sound for each eligible hit.

useSelfAsDamageSource ​

readonly useSelfAsDamageSource: boolean

Defined in: entities/src/components/combat.ts:59

Whether the attacker is recorded as the source of damage.


AttackParams ​

Defined in: entities/src/components/combat.ts:32

What minecraft:attack declares.

Properties ​

damage ​

readonly damage: DamageRange

Defined in: entities/src/components/combat.ts:33

effectAmplifier ​

readonly effectAmplifier: number

Defined in: entities/src/components/combat.ts:39

One below the displayed potency of the effect.

effectDuration ​

readonly effectDuration: number

Defined in: entities/src/components/combat.ts:37

How long the effect lasts, in seconds.

effectName? ​

readonly optional effectName?: string

Defined in: entities/src/components/combat.ts:35

The status effect a hit applies, such as poison.


Attribute ​

Defined in: entities/src/attributes.ts:29

One attribute's live value with the bounds its component declared.

Properties ​

base ​

readonly base: number

Defined in: entities/src/attributes.ts:31

The value the component declared, which a reset returns to.

current ​

readonly current: number

Defined in: entities/src/attributes.ts:35

The value now, always within the bounds.

max ​

readonly max: number

Defined in: entities/src/attributes.ts:33

min ​

readonly min: number

Defined in: entities/src/attributes.ts:32


AttributeSpec ​

Defined in: entities/src/attributes.ts:39

How a component declares an attribute.

Properties ​

base ​

base: number

Defined in: entities/src/attributes.ts:41

The starting value; the component's value.

max? ​

optional max?: number

Defined in: entities/src/attributes.ts:43

The component's max, defaulting to the base.

min? ​

optional min?: number

Defined in: entities/src/attributes.ts:45

The component's min, defaulting to 0.


BarterParams ​

Defined in: entities/src/components/interactions.ts:146

What minecraft:barter declares.

Properties ​

barterTable? ​

readonly optional barterTable?: string

Defined in: entities/src/components/interactions.ts:148

Loot table rolled when the entity completes a barter.

cooldownAfterBeingAttacked ​

readonly cooldownAfterBeingAttacked: number

Defined in: entities/src/components/interactions.ts:150

Time after damage during which the entity will not barter.


BlockSensorBreak ​

Defined in: entities/src/components/sensors.ts:234

One block identifier and event within minecraft:block_sensor.on_break.

Properties ​

blockList ​

readonly blockList: readonly string[]

Defined in: entities/src/components/sensors.ts:235

event ​

readonly event: string

Defined in: entities/src/components/sensors.ts:236


BlockSensorParams ​

Defined in: entities/src/components/sensors.ts:240

What minecraft:block_sensor declares.

Properties ​

onBreak ​

readonly onBreak: readonly BlockSensorBreak[]

Defined in: entities/src/components/sensors.ts:245

sensorRadius ​

readonly sensorRadius: number

Defined in: entities/src/components/sensors.ts:242

Maximum distance from the entity, capped at 32 blocks.

sources? ​

readonly optional sources?: Filter

Defined in: entities/src/components/sensors.ts:244

Filter the breaker must pass, evaluated with the breaker as other.


BreathableParams ​

Defined in: entities/src/components/hazards.ts:182

What minecraft:breathable declares.

Properties ​

breathesAir ​

readonly breathesAir: boolean

Defined in: entities/src/components/hazards.ts:187

breathesLava ​

readonly breathesLava: boolean

Defined in: entities/src/components/hazards.ts:189

breathesWater ​

readonly breathesWater: boolean

Defined in: entities/src/components/hazards.ts:188

generatesBubbles ​

readonly generatesBubbles: boolean

Defined in: entities/src/components/hazards.ts:190

inhaleTime ​

readonly inhaleTime: number

Defined in: entities/src/components/hazards.ts:191

suffocateTime ​

readonly suffocateTime: number

Defined in: entities/src/components/hazards.ts:186

How many seconds between suffocation ticks; -1 means the entity does not suffocate.

totalSupply ​

readonly totalSupply: number

Defined in: entities/src/components/hazards.ts:184

How many seconds of air the entity holds.


BreedableItemParams ​

Defined in: entities/src/components/interactions.ts:614

One item minecraft:breedable accepts.

Properties ​

item ​

readonly item: string

Defined in: entities/src/components/interactions.ts:616

The item identifier, normalized to the default Minecraft namespace.

resultItem? ​

readonly optional resultItem?: string

Defined in: entities/src/components/interactions.ts:618

Item replacing the consumed item after the entity enters its love state.


BreedableParams ​

Defined in: entities/src/components/interactions.ts:622

The minecraft:breedable values used when an entity receives a breeding item.

Extends ​

Indexable ​

[key: string]: unknown

Properties ​

breedItems ​

readonly breedItems: readonly BreedableItemParams[]

Defined in: entities/src/components/interactions.ts:624

Items that can put the entity into its love state.

requireFullHealth ​

readonly requireFullHealth: boolean

Defined in: entities/src/components/interactions.ts:628

Whether the entity must be at full health before accepting a breeding item.

requireTame ​

readonly requireTame: boolean

Defined in: entities/src/components/interactions.ts:626

Whether the entity must be tamed before accepting a breeding item.


BurnsInDaylightParams ​

Defined in: entities/src/components/hazards.ts:113

The sunlight protection slot declared by minecraft:burns_in_daylight.

Properties ​

protectionSlot ​

readonly protectionSlot: "slot.armor.body" | "slot.armor.chest" | "slot.armor.feet" | "slot.armor.head" | "slot.armor.legs" | "slot.weapon.mainhand" | "slot.weapon.offhand"

Defined in: entities/src/components/hazards.ts:115

The occupied slot that protects the entity, defaulting to its head.


CollisionBoxParams ​

Defined in: entities/src/components/body.ts:37

What minecraft:collision_box declares, in blocks.

Properties ​

height ​

readonly height: number

Defined in: entities/src/components/body.ts:39

width ​

readonly width: number

Defined in: entities/src/components/body.ts:38


CombatRegenerationParams ​

Defined in: entities/src/components/combat.ts:175

What minecraft:combat_regeneration declares.

Properties ​

applyToFamily ​

readonly applyToFamily: boolean

Defined in: entities/src/components/combat.ts:177

Whether a same-family mob that kills this entity's attack target receives the buffs.

applyToSelf ​

readonly applyToSelf: boolean

Defined in: entities/src/components/combat.ts:179

Whether this entity receives the buffs when it kills its attack target.

regenerationDurationTicks ​

readonly regenerationDurationTicks: number

Defined in: entities/src/components/combat.ts:181

Regeneration duration in ticks, or -1 when it never expires.


DamageCondition ​

Defined in: entities/src/components/hazards.ts:25

One entry of minecraft:hurt_on_condition.damage_conditions.

Properties ​

cause ​

readonly cause: string

Defined in: entities/src/components/hazards.ts:29

The damage cause to apply, such as lava.

damagePerTick ​

readonly damagePerTick: number

Defined in: entities/src/components/hazards.ts:30

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/components/hazards.ts:27

Gates the condition; absent means it always hurts.


DamageEvent ​

Defined in: entities/src/hooks.ts:140

One incoming damage event, as minecraft:damage_sensor and the hurt triggers read it.

Properties ​

amount ​

readonly amount: number

Defined in: entities/src/hooks.ts:144

The damage before any component changes it.

cause ​

readonly cause: string

Defined in: entities/src/hooks.ts:142

The damage cause, such as fall or entity_attack.

damager? ​

readonly optional damager?: FilterEntityView

Defined in: entities/src/hooks.ts:149

Who dealt the damage, which the damager and other filter subjects read and minecraft:on_hurt_by_player tests for the player family.


DamageOutcome ​

Defined in: entities/src/hooks.ts:153

What a damage hook decides about one damage event.

Properties ​

amount ​

readonly amount: number

Defined in: entities/src/hooks.ts:155

The damage to apply; zero means the entity takes none.

events? ​

readonly optional events?: readonly string[]

Defined in: entities/src/hooks.ts:157

Events to fire as a result, applied on the entity's next tick.


DamageOverTimeParams ​

Defined in: entities/src/components/hazards.ts:139

What minecraft:damage_over_time declares.

Properties ​

damagePerHurt ​

readonly damagePerHurt: number

Defined in: entities/src/components/hazards.ts:140

timeBetweenHurt ​

readonly timeBetweenHurt: number

Defined in: entities/src/components/hazards.ts:142

Seconds between hurts; a zero falls back to the half-second hurt interval.


DamageRange ​

Defined in: entities/src/components/combat.ts:17

A damage amount, which vanilla writes as a number or a {range_min, range_max} object.

Properties ​

max ​

readonly max: number

Defined in: entities/src/components/combat.ts:19

min ​

readonly min: number

Defined in: entities/src/components/combat.ts:18


DamageResult ​

Defined in: entities/src/hooks.ts:180

What one damage event did to the entity.

Properties ​

amount ​

readonly amount: number

Defined in: entities/src/hooks.ts:182

The damage applied after every component had its say; never negative.

died ​

readonly died: boolean

Defined in: entities/src/hooks.ts:186

Whether the damage took the entity to zero health.

events ​

readonly events: readonly string[]

Defined in: entities/src/hooks.ts:188

The events the damage queued, in the order they were raised.

health? ​

readonly optional health?: number

Defined in: entities/src/hooks.ts:184

The health left, or undefined when the entity declares no minecraft:health.


DamageSensorParams ​

Defined in: entities/src/components/sensors.ts:575

What minecraft:damage_sensor declares.

Properties ​

triggers ​

readonly triggers: readonly DamageSensorTrigger[]

Defined in: entities/src/components/sensors.ts:576


DamageSensorTrigger ​

Defined in: entities/src/components/sensors.ts:565

One minecraft:damage_sensor trigger.

Properties ​

cause ​

readonly cause: string

Defined in: entities/src/components/sensors.ts:567

The damage cause it answers for, or any.

damageMultiplier ​

readonly damageMultiplier: number

Defined in: entities/src/components/sensors.ts:569

dealsDamage ​

readonly dealsDamage: "yes" | "no" | "no_but_side_effects_apply" | "no_but_entity_effects_apply"

Defined in: entities/src/components/sensors.ts:568

event? ​

readonly optional event?: string

Defined in: entities/src/components/sensors.ts:571

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/components/sensors.ts:570


DefinitionSource ​

Defined in: entities/src/definition.ts:88

Where a definition came from, for diagnostics.

Extended by ​

Properties ​

pack ​

pack: string

Defined in: entities/src/definition.ts:90

The pack the file came from.

path? ​

optional path?: string

Defined in: entities/src/definition.ts:92

The pack-relative path of the file.


DespawnParams ​

Defined in: entities/src/components/lifecycle.ts:20

What minecraft:despawn declares.

Properties ​

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/components/lifecycle.ts:22

When set, the entity despawns as soon as the filters pass and the distance rules do not apply.

maxDistance ​

readonly maxDistance: number

Defined in: entities/src/components/lifecycle.ts:24

minDistance ​

readonly minDistance: number

Defined in: entities/src/components/lifecycle.ts:23

minRangeRandomChance ​

readonly minRangeRandomChance: number

Defined in: entities/src/components/lifecycle.ts:26

One in this many ticks, the entity beyond minDistance rolls to despawn.

removeChildEntities ​

readonly removeChildEntities: boolean

Defined in: entities/src/components/lifecycle.ts:27


Diagnostic ​

Defined in: entities/src/diagnostics.ts:11

One finding reported while parsing or resolving an entity definition.

Properties ​

code ​

code: string

Defined in: entities/src/diagnostics.ts:14

A stable machine-readable code, such as entity.unknownKey.

message ​

message: string

Defined in: entities/src/diagnostics.ts:19

pack ​

pack: string

Defined in: entities/src/diagnostics.ts:16

The name of the pack the finding belongs to, or the identifier when no pack is known.

path? ​

optional path?: string

Defined in: entities/src/diagnostics.ts:18

The file within the pack, when the finding concerns one file.

severity ​

severity: DiagnosticSeverity

Defined in: entities/src/diagnostics.ts:12


DyeableParams ​

Defined in: entities/src/components/dyeable.ts:8

What minecraft:is_dyeable declares.

Properties ​

interactText? ​

readonly optional interactText?: string

Defined in: entities/src/components/dyeable.ts:10

The touch-screen prompt shown when a player can dye this entity.


EntityActuator ​

Defined in: entities/src/hooks.ts:69

What a goal does to the entity it runs on.

This is the navigation and look-control seam. The package ships no implementation: a caller supplies one, and the reference goals prove the scheduler against a recording double in the tests.

Methods ​

jump() ​

jump(): void

Defined in: entities/src/hooks.ts:79

Makes the entity jump once.

Returns ​

void

lookAt() ​

lookAt(position): void

Defined in: entities/src/hooks.ts:77

Points the head at a position.

Parameters ​
position ​

EntityPosition

Returns ​

void

moveTo() ​

moveTo(position, speedMultiplier): void

Defined in: entities/src/hooks.ts:73

Paths toward a position at a multiple of the entity's minecraft:movement speed.

Parameters ​
position ​

EntityPosition

speedMultiplier ​

number

Returns ​

void

nearestPlayer() ​

nearestPlayer(maxDistance): EntityPosition | undefined

Defined in: entities/src/hooks.ts:83

The position of the nearest player within the distance, or undefined when there is none.

Parameters ​
maxDistance ​

number

Returns ​

EntityPosition | undefined

position() ​

position(): EntityPosition

Defined in: entities/src/hooks.ts:71

Where the entity is now.

Returns ​

EntityPosition

randomPosition()? ​

optional randomPosition(center, xDistance, yDistance, zDistance): EntityPosition | undefined

Defined in: entities/src/hooks.ts:85

A reachable random position around a point, or undefined when the navigator finds none.

Parameters ​
center ​

EntityPosition

xDistance ​

number

yDistance ​

number

zDistance ​

number

Returns ​

EntityPosition | undefined

randomTarget() ​

randomTarget(xzDistance, yDistance): EntityPosition | undefined

Defined in: entities/src/hooks.ts:81

A reachable position within the box around the entity, or undefined when the navigator finds none.

Parameters ​
xzDistance ​

number

yDistance ​

number

Returns ​

EntityPosition | undefined

stopMoving() ​

stopMoving(): void

Defined in: entities/src/hooks.ts:75

Abandons the current path.

Returns ​

void

targetPosition()? ​

optional targetPosition(): EntityPosition | undefined

Defined in: entities/src/hooks.ts:92

The current attack target's position, or undefined when the entity has no live target.

Returns ​

EntityPosition | undefined

teleportTo()? ​

optional teleportTo(position): void

Defined in: entities/src/hooks.ts:94

Moves the entity instantly, stopping its current path.

Parameters ​
position ​

EntityPosition

Returns ​

void


EntityAddItemsRequest ​

Defined in: entities/src/hooks.ts:192

A Bedrock loot table whose items a successful interaction adds to the player's inventory.

Extended by ​

Properties ​

table ​

readonly table: string

Defined in: entities/src/hooks.ts:194

The pack-relative Bedrock loot-table path.


EntityAngerBroadcast ​

Defined in: entities/src/hooks.ts:23

One request to spread an entity's anger to nearby matching entities.

Properties ​

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/hooks.ts:27

Filters evaluated with the broadcaster as caller and each candidate as other.

range ​

readonly range: number

Defined in: entities/src/hooks.ts:25

Maximum distance from the broadcaster, in blocks.

target? ​

readonly optional target?: FilterEntityView

Defined in: entities/src/hooks.ts:31

The entity that caused the broadcast, which candidates may target.

targets? ​

readonly optional targets?: readonly string[]

Defined in: entities/src/hooks.ts:29

Families that receive the broadcast; omitted means the broadcaster's entity type.


EntityBlockBreakEvent ​

Defined in: entities/src/hooks.ts:35

One block break an active minecraft:block_sensor can inspect.

Properties ​

block ​

readonly block: FilterBlockView

Defined in: entities/src/hooks.ts:37

The block that was removed.

position ​

readonly position: EntityPosition

Defined in: entities/src/hooks.ts:39

The block's integer world position.

source? ​

readonly optional source?: FilterEntityView

Defined in: entities/src/hooks.ts:41

The player or entity that caused the break, when the runtime knows it.


EntityBlockState ​

Defined in: entities/src/hooks.ts:45

One block state as an entity component reads it from the world.

Properties ​

identifier ​

readonly identifier: string

Defined in: entities/src/hooks.ts:47

The namespaced block identifier.

states ​

readonly states: Readonly<Record<string, string | number | boolean>>

Defined in: entities/src/hooks.ts:49

The block's state values.


EntityDefinition ​

Defined in: entities/src/definition.ts:73

One parsed entity definition.

Properties ​

componentGroups ​

readonly componentGroups: ReadonlyMap<string, ComponentMap>

Defined in: entities/src/definition.ts:81

Group name to component map, inactive until an event adds the group.

components ​

readonly components: ComponentMap

Defined in: entities/src/definition.ts:79

The always-active component set.

description ​

readonly description: EntityDescription

Defined in: entities/src/definition.ts:77

events ​

readonly events: ReadonlyMap<string, EventNode>

Defined in: entities/src/definition.ts:82

formatVersion? ​

readonly optional formatVersion?: FormatVersion

Defined in: entities/src/definition.ts:76

The file's format_version, which selects how the engine reads the rest.

identifier ​

readonly identifier: string

Defined in: entities/src/definition.ts:74

upgrades ​

readonly upgrades: unknown

Defined in: entities/src/definition.ts:84

The upgrades handlers, kept raw; vanilla uses none yet.


EntityDefinitionInput ​

Defined in: entities/src/entityType.ts:61

One definition to resolve, with where it came from.

Properties ​

definition ​

readonly definition: EntityDefinition

Defined in: entities/src/entityType.ts:62

pack ​

readonly pack: string

Defined in: entities/src/entityType.ts:64

The pack the definition came from; diagnostics name it.

path? ​

readonly optional path?: string

Defined in: entities/src/entityType.ts:66

The pack-relative path of the file.


EntityDescription ​

Defined in: entities/src/definition.ts:53

The parsed description block.

Properties ​

animations ​

readonly animations: ReadonlyMap<string, string>

Defined in: entities/src/definition.ts:66

Behavior animation and animation controller names, by short name.

entityVersion? ​

readonly optional entityVersion?: FormatVersion

Defined in: entities/src/definition.ts:69

The saved-data version, which drives the upgrades handlers.

identifier ​

readonly identifier: string

Defined in: entities/src/definition.ts:54

isExperimental ​

readonly isExperimental: boolean

Defined in: entities/src/definition.ts:59

isSpawnable ​

readonly isSpawnable: boolean

Defined in: entities/src/definition.ts:56

Adds a spawn egg to the creative inventory when true.

isSummonable ​

readonly isSummonable: boolean

Defined in: entities/src/definition.ts:58

Allows /summon when true.

properties ​

readonly properties: ReadonlyMap<string, PropertyDefinition>

Defined in: entities/src/definition.ts:64

runtimeIdentifier? ​

readonly optional runtimeIdentifier?: string

Defined in: entities/src/definition.ts:63

Inherits engine mechanics from a vanilla entity that has no component form.

scripts ​

readonly scripts: EntityScripts

Defined in: entities/src/definition.ts:67

spawnCategory? ​

readonly optional spawnCategory?: string

Defined in: entities/src/definition.ts:61

The pool the entity spawns with; Mojang recommends creators leave it unset.


EntityEffects ​

Defined in: entities/src/hooks.ts:98

Operations an entity component delegates to the world outside this package.

Methods ​

applyStatusEffect()? ​

optional applyStatusEffect(entity, target, effect): boolean

Defined in: entities/src/hooks.ts:105

Adds or refreshes an effect on an entity selected by a component.

Parameters ​
entity ​

EntityInstance

target ​

FilterEntityView

effect ​

EntityStatusEffect

Returns ​

boolean

dropItem()? ​

optional dropItem(entity, slot): void

Defined in: entities/src/hooks.ts:115

Drops what the entity carries in one slot, such as slot.weapon.mainhand.

Parameters ​
entity ​

EntityInstance

slot ​

string

Returns ​

void

emitParticle()? ​

optional emitParticle(entity, particle): void

Defined in: entities/src/hooks.ts:101

Parameters ​
entity ​

EntityInstance

particle ​

string

Returns ​

void

emitVibration()? ​

optional emitVibration(entity, vibration): void

Defined in: entities/src/hooks.ts:103

Emits a game-event vibration sculk sensors and wardens listen for.

Parameters ​
entity ​

EntityInstance

vibration ​

"entity_interact" | "entity_act" | "entity_die"

Returns ​

void

executeEventOnBlock()? ​

optional executeEventOnBlock(entity, position, event): void

Defined in: entities/src/hooks.ts:117

Fires a block event on the block at the entity's home position.

Parameters ​
entity ​

EntityInstance

position ​

EntityPosition

event ​

string

Returns ​

void

playSound()? ​

optional playSound(entity, sound): void

Defined in: entities/src/hooks.ts:100

Plays a sound at the entity; the name is the pack's own, such as saddle.

Parameters ​
entity ​

EntityInstance

sound ​

string

Returns ​

void

queueCommand()? ​

optional queueCommand(entity, command, target): void

Defined in: entities/src/hooks.ts:113

Runs one command with the named subject as its executor.

Parameters ​
entity ​

EntityInstance

command ​

string

target ​

"self" | "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

Whom the command runs as, self when the body names none.

Returns ​

void

removeStatusEffect()? ​

optional removeStatusEffect(entity, target, identifier): boolean

Defined in: entities/src/hooks.ts:107

Removes an effect from an entity selected by a component.

Parameters ​
entity ​

EntityInstance

target ​

FilterEntityView

identifier ​

string

Returns ​

boolean


EntityEnvironment ​

Defined in: entities/src/entityInstance.ts:148

What an entity needs from the world around it.

Properties ​

actuator? ​

optional actuator?: EntityActuator

Defined in: entities/src/entityInstance.ts:169

Moves, looks and jumps on behalf of the goals.

effects? ​

optional effects?: EntityEffects

Defined in: entities/src/entityInstance.ts:171

Carries out the event actions that leave the package, such as play_sound.

javaNavigation? ​

optional javaNavigation?: JavaEntityNavigation

Defined in: entities/src/entityInstance.ts:200

Java's path navigator and collision behavior, when the host has the pinned class dump.

javaStats? ​

optional javaStats?: Readonly<Record<string, JavaEntityStats>>

Defined in: entities/src/entityInstance.ts:198

Java Edition's entity stats, which decide the four attributes a Bedrock client never simulates. Leaving it out runs the pack's own numbers.

See ​

SHARED_STATS for which stat each edition decides.

random? ​

optional random?: RandomSource

Defined in: entities/src/entityInstance.ts:173

Draws the randomize weights and the random_chance filter.

Methods ​

blockAt()? ​

optional blockAt(position): EntityBlockState | undefined

Defined in: entities/src/entityInstance.ts:165

Reads a block at an integer world position, or leaves it unknown when the chunk is unloaded.

Parameters ​
position ​

EntityPosition

The integer block position to read.

Returns ​

EntityBlockState | undefined

broadcastAnger()? ​

optional broadcastAnger(entity, request): void

Defined in: entities/src/entityInstance.ts:167

Delivers an angry component's broadcast to nearby matching entities.

Parameters ​
entity ​

EntityInstance

request ​

EntityAngerBroadcast

Returns ​

void

componentSetChanged()? ​

optional componentSetChanged(entity): void

Defined in: entities/src/entityInstance.ts:150

Refreshes world indexes when an event changes the active component set.

Parameters ​
entity ​

EntityInstance

Returns ​

void

entitySensorCandidates()? ​

optional entitySensorCandidates(entity, query): readonly EntitySensorCandidate[]

Defined in: entities/src/entityInstance.ts:160

Finds live entities a minecraft:entity_sensor can sense.

Parameters ​
entity ​

EntityInstance

query ​

EntitySensorQuery

Returns ​

readonly EntitySensorCandidate[]

filterContext()? ​

optional filterContext(entity): FilterContext

Defined in: entities/src/entityInstance.ts:156

Builds the filter context for one evaluation. The entity fills in its own facts (properties, components, type families, attributes) over whatever this returns.

Parameters ​
entity ​

EntityInstance

Returns ​

FilterContext

molang()? ​

optional molang(source, entity): PropertyValue | undefined

Defined in: entities/src/entityInstance.ts:175

Evaluates a Molang expression for a set_property value or a component's expression.

Parameters ​
source ​

string

entity ​

EntityInstance

Returns ​

PropertyValue | undefined

propertyDefault()? ​

optional propertyDefault(source, definition): PropertyValue | undefined

Defined in: entities/src/entityInstance.ts:181

Evaluates a property's Molang default. It takes no entity, because a default expression may only call query.had_component_group, which reads the saved data the entity is being built from.

Parameters ​
source ​

string

definition ​

PropertyDefinition

Returns ​

PropertyValue | undefined

remove()? ​

optional remove(entity, reason): void

Defined in: entities/src/entityInstance.ts:185

Takes the entity out of the world, for minecraft:despawn and minecraft:instant_despawn.

Parameters ​
entity ​

EntityInstance

reason ​

string

Returns ​

void

report()? ​

optional report(message, entity): void

Defined in: entities/src/entityInstance.ts:191

Receives everything the runtime met and did not carry out.

Parameters ​
message ​

string

entity ​

EntityInstance

Returns ​

void

route()? ​

optional route(trigger, entity): void

Defined in: entities/src/entityInstance.ts:183

Delivers an event an entity triggered on another entity.

Parameters ​
trigger ​

OutgoingTrigger

entity ​

EntityInstance

Returns ​

void

spawnEntity()? ​

optional spawnEntity(entity, request): boolean

Defined in: entities/src/entityInstance.ts:189

Creates an entity or item requested by a data component.

Parameters ​
entity ​

EntityInstance

request ​

EntitySpawnRequest

Returns ​

boolean

targetProximity()? ​

optional targetProximity(entity): EntityTargetProximity | undefined

Defined in: entities/src/entityInstance.ts:158

The current target's range and visibility, for minecraft:target_nearby_sensor.

Parameters ​
entity ​

EntityInstance

Returns ​

EntityTargetProximity | undefined

transform()? ​

optional transform(entity, request): void

Defined in: entities/src/entityInstance.ts:187

Replaces the entity with another type, for minecraft:transformation.

Parameters ​
entity ​

EntityInstance

request ​

TransformRequest

Returns ​

void


EntityFile ​

Defined in: entities/src/entityTypes.ts:25

One entity file to load.

Extends ​

Properties ​

data ​

data: unknown

Defined in: entities/src/entityTypes.ts:27

The already-parsed JSON of the file.

pack ​

pack: string

Defined in: entities/src/definition.ts:90

The pack the file came from.

Inherited from ​

DefinitionSource.pack

path? ​

optional path?: string

Defined in: entities/src/definition.ts:92

The pack-relative path of the file.

Inherited from ​

DefinitionSource.path


EntityHooks ​

Defined in: entities/src/hooks.ts:315

The hooks an entity component may implement.

onInitialize and onRemove are what make component groups a state machine: adding a group initializes its components, re-adding an active group initializes them again, and removing a group removes them whole rather than restoring what they replaced.

Properties ​

onAttack ​

onAttack: (entity, target) => void

Defined in: entities/src/hooks.ts:329

Runs when the entity attacks another entity.

Parameters ​
entity ​

EntityInstance

target ​

FilterEntityView

Returns ​

void

onAttackTargetKilled ​

onAttackTargetKilled: (entity, killer) => void

Defined in: entities/src/hooks.ts:331

Runs when the entity's current attack target is killed.

Parameters ​
entity ​

EntityInstance

killer ​

FilterEntityView

Returns ​

void

onBlockBroken ​

onBlockBroken: (entity, event) => void

Defined in: entities/src/hooks.ts:325

Runs when a block breaks near the entity.

Parameters ​
entity ​

EntityInstance

event ​

EntityBlockBreakEvent

Returns ​

void

onDamage ​

onDamage: (entity, damage) => DamageOutcome | undefined

Defined in: entities/src/hooks.ts:333

Decides what one damage event does; the first handler that answers wins.

Parameters ​
entity ​

EntityInstance

damage ​

DamageEvent

Returns ​

DamageOutcome | undefined

onDamageProcessed ​

onDamageProcessed: (entity, damage, result) => void

Defined in: entities/src/hooks.ts:335

Observes the result after sensors, immunities, and health changes without altering it.

Parameters ​
entity ​

EntityInstance

damage ​

DamageEvent

result ​

DamageResult

Returns ​

void

onEquipmentChanged ​

onEquipmentChanged: (entity, slot, equipped) => void

Defined in: entities/src/hooks.ts:327

Runs when an item is placed into or removed from a default equipment slot.

Parameters ​
entity ​

EntityInstance

slot ​

EntityEquipmentSlot

equipped ​

boolean

Returns ​

void

onFriendlyAnger ​

onFriendlyAnger: (entity) => void

Defined in: entities/src/hooks.ts:323

Runs when a nearby entity with the same type broadcasts anger.

Parameters ​
entity ​

EntityInstance

Returns ​

void

onInitialize ​

onInitialize: (entity) => void

Defined in: entities/src/hooks.ts:317

Runs when the component becomes active, and again each time its group is re-added.

Parameters ​
entity ​

EntityInstance

Returns ​

void

onInteractWithItem ​

onInteractWithItem: (entity, itemIdentifier, other?, state?) => boolean | EntityItemInteractionEffect | undefined

Defined in: entities/src/hooks.ts:339

Applies one held item; the first handler that answers wins.

Parameters ​
entity ​

EntityInstance

itemIdentifier ​

string

other? ​

FilterEntityView

state? ​

EntityItemInteractionState

Returns ​

boolean | EntityItemInteractionEffect | undefined

onProjectileHit ​

onProjectileHit: (entity, projectile) => boolean

Defined in: entities/src/hooks.ts:337

Lets the entity evade a projectile before its hit effects are applied.

Parameters ​
entity ​

EntityInstance

projectile ​

FilterEntityView

Returns ​

boolean

onRemove ​

onRemove: (entity) => void

Defined in: entities/src/hooks.ts:319

Runs when the component stops being active because its group was removed.

Parameters ​
entity ​

EntityInstance

Returns ​

void

onTick ​

onTick: (entity) => void

Defined in: entities/src/hooks.ts:321

Runs once per server tick while the component is active.

Parameters ​
entity ​

EntityInstance

Returns ​

void


EntityInstanceOptions ​

Defined in: entities/src/entityInstance.ts:204

Options for one EntityInstance.

Properties ​

environment? ​

optional environment?: EntityEnvironment

Defined in: entities/src/entityInstance.ts:207

id? ​

optional id?: string | number

Defined in: entities/src/entityInstance.ts:206

A stable identity, which the filter tests that compare two entities read.

restoring? ​

optional restoring?: boolean

Defined in: entities/src/entityInstance.ts:209

Whether this instance is being restored from saved state instead of spawned.


EntityItemInteractionEffect ​

Defined in: entities/src/hooks.ts:254

The effects requested by a data-defined item interaction.

Properties ​

addItems? ​

readonly optional addItems?: EntityAddItemsRequest

Defined in: entities/src/hooks.ts:258

Loot to add to the player's inventory when the interaction succeeds.

admire? ​

readonly optional admire?: boolean

Defined in: entities/src/hooks.ts:286

Whether the entity should admire the offered item after the interaction.

barter? ​

readonly optional barter?: boolean

Defined in: entities/src/hooks.ts:288

Whether the entity should barter for the offered item after the interaction.

breed? ​

readonly optional breed?: boolean

Defined in: entities/src/hooks.ts:280

Whether the entity should enter its love state.

consumeItem? ​

readonly optional consumeItem?: boolean

Defined in: entities/src/hooks.ts:266

Whether the live inventory should consume one item from the held stack.

dropItemSlot? ​

readonly optional dropItemSlot?: string

Defined in: entities/src/hooks.ts:300

The entity slot whose item is dropped when this interaction succeeds.

dropItemYOffset? ​

readonly optional dropItemYOffset?: number

Defined in: entities/src/hooks.ts:302

Vertical offset for an item dropped from an entity slot.

equipItemSlot? ​

readonly optional equipItemSlot?: string

Defined in: entities/src/hooks.ts:298

The inventory or equipment slot that receives the held item.

giveItem? ​

readonly optional giveItem?: boolean

Defined in: entities/src/hooks.ts:304

Whether the entity takes the held item into its main hand.

healthAmount? ​

readonly optional healthAmount?: number

Defined in: entities/src/hooks.ts:256

Health gained, or lost when negative, when the interaction succeeds.

hurtItem? ​

readonly optional hurtItem?: number

Defined in: entities/src/hooks.ts:260

Durability removed from the held item when the interaction succeeds.

particleOnStart? ​

readonly optional particleOnStart?: object

Defined in: entities/src/hooks.ts:292

The named particle effect emitted when the interaction starts.

offsetTowardsInteractor ​

readonly offsetTowardsInteractor: boolean

particleType ​

readonly particleType: string

yOffset ​

readonly yOffset: number

playSounds? ​

readonly optional playSounds?: readonly string[]

Defined in: entities/src/hooks.ts:272

Sounds the world plays when this interaction succeeds.

repairEntityItem? ​

readonly optional repairEntityItem?: EntityRepairItemRequest

Defined in: entities/src/hooks.ts:276

The entity item slot to repair and the amount of durability to restore.

resultItem? ​

readonly optional resultItem?: string

Defined in: entities/src/hooks.ts:262

The item the used stack becomes, when the interaction transforms it.

resultItemData? ​

readonly optional resultItemData?: number

Defined in: entities/src/hooks.ts:264

The transformed item's auxiliary value, such as a filled bucket's variant.

spawnItems? ​

readonly optional spawnItems?: EntitySpawnItemsRequest

Defined in: entities/src/hooks.ts:270

A Bedrock loot table and drop offset to run as part of a successful interaction.

spawnOffspring? ​

readonly optional spawnOffspring?: string

Defined in: entities/src/hooks.ts:282

The offspring type to spawn when a matching spawn egg is used on this entity.

statusEffects? ​

readonly optional statusEffects?: readonly EntityStatusEffect[]

Defined in: entities/src/hooks.ts:268

Status effects to apply when the interaction is accepted.

swing? ​

readonly optional swing?: boolean

Defined in: entities/src/hooks.ts:290

Whether the interacting player should swing, which defaults to true.

takeItem? ​

readonly optional takeItem?: boolean

Defined in: entities/src/hooks.ts:278

Whether the entity should offer its main-hand item to an empty player hand.

tame? ​

readonly optional tame?: EntityTameInteractionEffect

Defined in: entities/src/hooks.ts:284

The result of a data-defined taming attempt.

vibration? ​

readonly optional vibration?: string

Defined in: entities/src/hooks.ts:274

Game-event vibration the world emits when this interaction succeeds.


EntityItemInteractionState ​

Defined in: entities/src/hooks.ts:222

Body timers that determine whether an item can start a stateful interaction.

Properties ​

breedCooldown? ​

readonly optional breedCooldown?: number

Defined in: entities/src/hooks.ts:226

Ticks remaining before the entity may breed again.

loveTicks? ​

readonly optional loveTicks?: number

Defined in: entities/src/hooks.ts:224

Ticks remaining in the entity's current love state.

spawnEgg? ​

readonly optional spawnEgg?: object

Defined in: entities/src/hooks.ts:228

The spawn egg being used, with its resolved offspring type.

identifier ​

readonly identifier: string

offspringIdentifier ​

readonly offspringIdentifier: string


EntityPosition ​

Defined in: entities/src/hooks.ts:16

A position in the world, as the navigation seam passes one.

Properties ​

x ​

readonly x: number

Defined in: entities/src/hooks.ts:17

y ​

readonly y: number

Defined in: entities/src/hooks.ts:18

z ​

readonly z: number

Defined in: entities/src/hooks.ts:19


EntityRepairItemRequest ​

Defined in: entities/src/hooks.ts:204

Repairs the item in one of the entity's inventory or equipment slots.

Properties ​

amount ​

readonly amount: number

Defined in: entities/src/hooks.ts:206

Durability restored, which must be greater than zero.

slot? ​

readonly optional slot?: string

Defined in: entities/src/hooks.ts:208

The entity slot to repair, or undefined when the interaction names none.


EntityScripts ​

Defined in: entities/src/definition.ts:47

The description.scripts block, which names behavior animations to run.

Properties ​

animate ​

readonly animate: readonly (string | Record<string, string>)[]

Defined in: entities/src/definition.ts:49

Entries of scripts.animate: a name, or a name mapped to a Molang condition.


EntitySensorCandidate ​

Defined in: entities/src/entityInstance.ts:142

One live entity within a sensor's search range.

Properties ​

view ​

readonly view: FilterEntityView

Defined in: entities/src/entityInstance.ts:144

The facts filters can read about the sensed entity as other.


EntitySensorParams ​

Defined in: entities/src/components/sensors.ts:95

What minecraft:entity_sensor declares.

Properties ​

findPlayersOnly ​

readonly findPlayersOnly: boolean

Defined in: entities/src/components/sensors.ts:96

relativeRange ​

readonly relativeRange: boolean

Defined in: entities/src/components/sensors.ts:97

subsensors ​

readonly subsensors: readonly EntitySensorSubsensor[]

Defined in: entities/src/components/sensors.ts:98


EntitySensorQuery ​

Defined in: entities/src/entityInstance.ts:128

The spatial and entity-type limits for one minecraft:entity_sensor search.

Properties ​

findPlayersOnly ​

readonly findPlayersOnly: boolean

Defined in: entities/src/entityInstance.ts:138

Whether to search only live players.

horizontalRange ​

readonly horizontalRange: number

Defined in: entities/src/entityInstance.ts:130

Maximum horizontal distance from the sensor, in blocks.

relativeRange ​

readonly relativeRange: boolean

Defined in: entities/src/entityInstance.ts:136

Whether the sensor's dimensions extend the configured ranges.

verticalRange ​

readonly verticalRange: number

Defined in: entities/src/entityInstance.ts:132

Maximum vertical distance from the sensor, in blocks.

yOffset ​

readonly yOffset: number

Defined in: entities/src/entityInstance.ts:134

Vertical offset applied to the sensor's position before measuring range.


EntitySensorSubsensor ​

Defined in: entities/src/components/sensors.ts:75

One range and event rule within minecraft:entity_sensor.subsensors.

Properties ​

cooldown ​

readonly cooldown: number

Defined in: entities/src/components/sensors.ts:77

Additional seconds to wait after the base one-tick sensing delay.

event? ​

readonly optional event?: SensorTrigger

Defined in: entities/src/components/sensors.ts:79

Event to raise when the matching entity count is in range.

eventFilters? ​

readonly optional eventFilters?: Filter

Defined in: entities/src/components/sensors.ts:81

Filter evaluated with the sensor owner as self and each candidate as other.

maximumCount ​

readonly maximumCount: number

Defined in: entities/src/components/sensors.ts:83

Largest matching candidate count, or -1 for no upper bound.

minimumCount ​

readonly minimumCount: number

Defined in: entities/src/components/sensors.ts:85

Smallest matching candidate count required to raise the event.

range ​

readonly range: readonly [number, number]

Defined in: entities/src/components/sensors.ts:87

Horizontal and vertical search limits, in blocks.

requireAll ​

readonly requireAll: boolean

Defined in: entities/src/components/sensors.ts:89

Whether every nearby candidate must pass event_filters.

yOffset ​

readonly yOffset: number

Defined in: entities/src/components/sensors.ts:91

Vertical offset applied before testing the candidate range.


EntitySpawnItemsRequest ​

Defined in: entities/src/hooks.ts:198

Items a successful data-defined interaction asks the host to drop.

Extends ​

Properties ​

table ​

readonly table: string

Defined in: entities/src/hooks.ts:194

The pack-relative Bedrock loot-table path.

Inherited from ​

EntityAddItemsRequest.table

yOffset ​

readonly yOffset: number

Defined in: entities/src/hooks.ts:200

Vertical offset from the entity's feet, in blocks.


EntityState ​

Defined in: entities/src/entityInstance.ts:77

The per-instance state @jsprismarine/content's Instance carries for this domain.

Properties ​

activeGroups ​

readonly activeGroups: Set<string>

Defined in: entities/src/entityInstance.ts:83

The component groups active now, in the order they became active.

attributes ​

readonly attributes: Attributes

Defined in: entities/src/entityInstance.ts:78

properties ​

readonly properties: PropertyValues

Defined in: entities/src/entityInstance.ts:79

variables ​

readonly variables: Map<string, MolangValue>

Defined in: entities/src/entityInstance.ts:81

variable.* storage the entity's Molang expressions read and write.


EntityStatusEffect ​

Defined in: entities/src/hooks.ts:235

One status effect request passed across the entity runtime boundary.

Extended by ​

Properties ​

ambient? ​

readonly optional ambient?: boolean

Defined in: entities/src/hooks.ts:243

Whether the effect has the ambient visual style.

amplifier ​

readonly amplifier: number

Defined in: entities/src/hooks.ts:241

One below the displayed potency.

durationTicks ​

readonly durationTicks: number

Defined in: entities/src/hooks.ts:239

Ticks remaining, or -1 for an effect that never expires.

id ​

readonly id: string

Defined in: entities/src/hooks.ts:237

The Bedrock status effect name.

showIcon? ​

readonly optional showIcon?: boolean

Defined in: entities/src/hooks.ts:247

Whether the effect has a HUD icon.

showParticles? ​

readonly optional showParticles?: boolean

Defined in: entities/src/hooks.ts:245

Whether the effect draws particles.


EntityTameInteractionEffect ​

Defined in: entities/src/hooks.ts:212

The result of a successful or failed minecraft:tameable item attempt.

Properties ​

event? ​

readonly optional event?: string

Defined in: entities/src/hooks.ts:216

The event to raise after the host records the new owner.

succeeded ​

readonly succeeded: boolean

Defined in: entities/src/hooks.ts:214

Whether the component's probability roll tamed the entity.

target? ​

readonly optional target?: "self" | "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

Defined in: entities/src/hooks.ts:218

The target named by tame_event; omitted events do not need a target.


EntityTargetProximity ​

Defined in: entities/src/entityInstance.ts:118

The world facts minecraft:target_nearby_sensor reads about the current target.

Properties ​

distance ​

readonly distance: number

Defined in: entities/src/entityInstance.ts:122

Distance between the entity and its current target, in blocks.

id ​

readonly id: string | number

Defined in: entities/src/entityInstance.ts:120

The target identity, which lets a sensor detect target changes.

visible ​

readonly visible: boolean

Defined in: entities/src/entityInstance.ts:124

Whether the world reports the current target as visible.


EntityType ​

Defined in: entities/src/entityType.ts:45

A definition resolved into a type, with its groups and its coverage report.

Extends ​

Properties ​

behaviors ​

readonly behaviors: readonly BoundBehavior<EntityHooks>[]

Defined in: content/src/types.ts:42

The behaviors that attached, in attachment order.

Inherited from ​

Type.behaviors

components ​

readonly components: readonly BoundComponent<EntityHooks>[]

Defined in: content/src/types.ts:40

The components that bound, in declaration order; a rejected one is absent.

Inherited from ​

Type.components

declaredComponents ​

readonly declaredComponents: readonly string[]

Defined in: entities/src/entityType.ts:55

Every component name the definition uses, base and groups, in name order.

definition ​

readonly definition: Definition

Defined in: content/src/types.ts:38

The definition the type came from.

Inherited from ​

Type.definition

entity ​

readonly entity: EntityDefinition

Defined in: entities/src/entityType.ts:47

The parsed definition the type came from.

flags ​

readonly flags: Readonly<Record<F, boolean>>

Defined in: content/src/types.ts:63

The flags the domain's FlagSpec computed, one pass at load.

Inherited from ​

Type.flags

groups ​

readonly groups: ReadonlyMap<string, ResolvedComponentGroup>

Defined in: entities/src/entityType.ts:53

Group name to its bound components.

hooks ​

readonly hooks: HookTable<EntityHooks>

Defined in: content/src/types.ts:44

The dispatch table, built once here rather than per call.

Inherited from ​

Type.hooks

identifier ​

readonly identifier: string

Defined in: content/src/types.ts:36

The identifier the type is registered under.

Inherited from ​

Type.identifier

tags ​

readonly tags: readonly string[]

Defined in: entities/src/entityType.ts:49

Java datapack entity type tags that include this Bedrock entity identifier.

unimplementedComponents ​

readonly unimplementedComponents: readonly string[]

Defined in: entities/src/entityType.ts:57

The subset of EntityType.declaredComponents no factory implements.

Methods ​

hasComponent() ​

hasComponent(name): boolean

Defined in: content/src/types.ts:53

Whether the type bound a component under the name.

Parameters ​
name ​

string

Returns ​

boolean

Inherited from ​

Type.hasComponent

hasTag() ​

hasTag(tag): boolean

Defined in: entities/src/entityType.ts:51

Whether a Java datapack entity type tag includes this entity.

Parameters ​
tag ​

string

Returns ​

boolean

params() ​

params<P>(factory): P | undefined

Defined in: content/src/types.ts:51

The parsed parameters of one component, narrowed against the factory whose schema produced them.

Type Parameters ​
P ​

P

Parameters ​
factory ​

ComponentFactory<EntityHooks, P>

Returns ​

P | undefined

The parameters, or undefined when the type has no such component.

Inherited from ​

Type.params


EntityTypesOptions ​

Defined in: entities/src/entityTypes.ts:31

Options for an EntityTypes table.

Properties ​

components? ​

optional components?: EntityComponentRegistry

Defined in: entities/src/entityTypes.ts:36

The component registry to resolve against. Defaults to a fresh registry holding every component this package implements.

tagLookup? ​

optional tagLookup?: EntityTypeTagLookup

Defined in: entities/src/entityTypes.ts:38

Java datapack tags to attach to each loaded entity type.


EnvironmentSensorParams ​

Defined in: entities/src/components/sensors.ts:44

What minecraft:environment_sensor declares.

Properties ​

triggers ​

readonly triggers: readonly SensorTrigger[]

Defined in: entities/src/components/sensors.ts:45


EquipmentChangedParams ​

Defined in: entities/src/components/sensors.ts:671

What minecraft:on_equipment_changed declares.

Properties ​

slots ​

readonly slots: readonly EquipmentChangedSlot[]

Defined in: entities/src/components/sensors.ts:673

Slot rules in source order; the first matching rule decides each change.


EquipmentChangedSlot ​

Defined in: entities/src/components/sensors.ts:661

One slot watched by minecraft:on_equipment_changed.

Properties ​

onEquip? ​

readonly optional onEquip?: string

Defined in: entities/src/components/sensors.ts:665

Event raised when an item is placed into the slot.

onUnequip? ​

readonly optional onUnequip?: string

Defined in: entities/src/components/sensors.ts:667

Event raised when the slot is cleared.

slot ​

readonly slot: EntityEquipmentSlot

Defined in: entities/src/components/sensors.ts:663

The default equipment slot, using Bedrock's fully qualified name.


EquipmentParams ​

Defined in: entities/src/components/body.ts:213

What minecraft:equipment declares.

Properties ​

slotDropChance ​

readonly slotDropChance: readonly SlotDropChance[]

Defined in: entities/src/components/body.ts:216

table? ​

readonly optional table?: string

Defined in: entities/src/components/body.ts:215

The loot table the entity equips from.


EvaluateFilterOptions ​

Defined in: entities/src/filters.ts:439

Options for evaluateFilter.

Properties ​

onUnanswered? ​

optional onUnanswered?: (test, reason) => void

Defined in: entities/src/filters.ts:441

Called once per test the evaluator does not implement, or whose subject the context lacks.

Parameters ​
test ​

FilterTest

reason ​

"unknownTest" | "missingSubject" | "missingFact"

Returns ​

void


EventAction ​

Defined in: entities/src/events.ts:78

An action a node asks for, with the key the file writes and the body unchanged.

EventAction.parsed is the understood form. It is undefined for a key this package does not carry out, which is what makes an unimplemented action a reported line rather than silence.

Properties ​

name ​

readonly name: string

Defined in: entities/src/events.ts:80

The action key as the file writes it, such as play_sound.

parsed? ​

readonly optional parsed?: EntityAction

Defined in: entities/src/events.ts:83

The parsed action, or undefined when this package does not carry the key out.

value ​

readonly value: unknown

Defined in: entities/src/events.ts:81


EventEffects ​

Defined in: entities/src/eventEngine.ts:82

What one event determined, before the entity applies it on its next tick.

Properties ​

actions ​

readonly actions: readonly EventAction[]

Defined in: entities/src/eventEngine.ts:93

Sounds, particles, vibrations and the other actions this package keeps raw.

addGroups ​

readonly addGroups: readonly string[]

Defined in: entities/src/eventEngine.ts:86

Component groups to add, in the order the nodes named them.

event ​

readonly event: string

Defined in: entities/src/eventEngine.ts:84

The event name the effects came from.

outgoingTriggers ​

readonly outgoingTriggers: readonly OutgoingTrigger[]

Defined in: entities/src/eventEngine.ts:91

Events for other entities; a self trigger is already folded in.

propertyWrites ​

readonly propertyWrites: readonly ResolvedPropertyWrite[]

Defined in: entities/src/eventEngine.ts:89

removeGroups ​

readonly removeGroups: readonly string[]

Defined in: entities/src/eventEngine.ts:88

Component groups to remove, in the order the nodes named them.

unhandled ​

readonly unhandled: readonly string[]

Defined in: entities/src/eventEngine.ts:95

What the engine met and could not carry out, one line each.


EventNode ​

Defined in: entities/src/events.ts:93

One event node, with every branch normalized to an array.

Properties ​

actions ​

readonly actions: readonly EventAction[]

Defined in: entities/src/events.ts:109

Everything else the node asks for, kept raw.

add ​

readonly add: readonly string[]

Defined in: entities/src/events.ts:97

Component groups to add, in file order.

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/events.ts:95

Gates the whole node; absent means the node always runs.

firstValid ​

readonly firstValid: readonly EventNode[]

Defined in: entities/src/events.ts:107

Child nodes of which the first whose filters pass runs.

randomize ​

readonly randomize: readonly WeightedEventNode[]

Defined in: entities/src/events.ts:105

Child nodes of which exactly one runs, drawn against the weights.

remove ​

readonly remove: readonly string[]

Defined in: entities/src/events.ts:99

Component groups to remove, in file order.

sequence ​

readonly sequence: readonly EventNode[]

Defined in: entities/src/events.ts:103

Child nodes run in order; a later one's filters do not see an earlier one's changes.

setProperties ​

readonly setProperties: readonly PropertyWrite[]

Defined in: entities/src/events.ts:100

triggers ​

readonly triggers: readonly EventTrigger[]

Defined in: entities/src/events.ts:101


EventRuntime ​

Defined in: entities/src/eventEngine.ts:110

What determineEvent reads while it walks an event tree.

Properties ​

context ​

context: FilterContext

Defined in: entities/src/eventEngine.ts:114

The entity's filter context, read as it was before the event's changes.

properties ​

properties: PropertyValues

Defined in: entities/src/eventEngine.ts:116

The entity's properties, which set_property writes and reads.

random ​

random: RandomSource

Defined in: entities/src/eventEngine.ts:118

Draws the randomize weights.

Methods ​

evaluate()? ​

optional evaluate(source): PropertyValue | undefined

Defined in: entities/src/eventEngine.ts:124

Evaluates a Molang expression for a set_property value.

Parameters ​
source ​

string

Returns ​

PropertyValue | undefined

The value, or undefined when the expression does not evaluate.

event() ​

event(name): EventNode | undefined

Defined in: entities/src/eventEngine.ts:112

The named event of the entity's type, or undefined when it declares none.

Parameters ​
name ​

string

Returns ​

EventNode | undefined


EventTrigger ​

Defined in: entities/src/events.ts:34

One trigger entry: an event name, whom to fire it on, and an optional gate.

Properties ​

event ​

readonly event: string

Defined in: entities/src/events.ts:35

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/events.ts:37

target ​

readonly target: "self" | "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

Defined in: entities/src/events.ts:36


ExperienceRewardParams ​

Defined in: entities/src/components/body.ts:87

What minecraft:experience_reward declares; both fields are Molang expressions.

Properties ​

onBred? ​

readonly optional onBred?: string

Defined in: entities/src/components/body.ts:89

onDeath? ​

readonly optional onDeath?: string

Defined in: entities/src/components/body.ts:88


FilterBlockView ​

Defined in: entities/src/filterContext.ts:138

One block, as is_block and is_waterlogged read it.

Methods ​

identifier() ​

identifier(): string

Defined in: entities/src/filterContext.ts:139

Returns ​

string

tags()? ​

optional tags(): readonly string[]

Defined in: entities/src/filterContext.ts:141

Returns ​

readonly string[]

waterlogged()? ​

optional waterlogged(): boolean

Defined in: entities/src/filterContext.ts:140

Returns ​

boolean


FilterContext ​

Defined in: entities/src/filterContext.ts:227

Everything one filter evaluation can see. self is the only required subject, because it is the default a test with no subject key reads.

Properties ​

baby? ​

readonly optional baby?: FilterEntityView

Defined in: entities/src/filterContext.ts:233

block? ​

readonly optional block?: FilterBlockView

Defined in: entities/src/filterContext.ts:237

damager? ​

readonly optional damager?: FilterEntityView

Defined in: entities/src/filterContext.ts:234

holder? ​

readonly optional holder?: FilterEntityView

Defined in: entities/src/filterContext.ts:235

item? ​

readonly optional item?: FilterItemView

Defined in: entities/src/filterContext.ts:236

other? ​

readonly optional other?: FilterEntityView

Defined in: entities/src/filterContext.ts:229

parent? ​

readonly optional parent?: FilterEntityView

Defined in: entities/src/filterContext.ts:232

player? ​

readonly optional player?: FilterEntityView

Defined in: entities/src/filterContext.ts:230

random? ​

readonly optional random?: RandomSource

Defined in: entities/src/filterContext.ts:239

self ​

readonly self: FilterEntityView

Defined in: entities/src/filterContext.ts:228

target? ​

readonly optional target?: FilterEntityView

Defined in: entities/src/filterContext.ts:231

world? ​

readonly optional world?: FilterWorldView

Defined in: entities/src/filterContext.ts:238


FilterEntityView ​

Defined in: entities/src/filterContext.ts:161

One entity a filter test can read, whether it is the subject or a related entity the context reaches through FilterEntityView.vehicle and its siblings.

The position-dependent tests (light_level, is_biome, is_underground and the rest) are answered here because the engine evaluates them at the subject's position.

Methods ​

attackTarget()? ​

optional attackTarget(): FilterEntityView | undefined

Defined in: entities/src/filterContext.ts:187

This entity's current attack target, for is_target.

Returns ​

FilterEntityView | undefined

carries()? ​

optional carries(matches): boolean | undefined

Defined in: entities/src/filterContext.ts:181

Whether the entity carries any item answering the predicate, for the item tests.

Parameters ​
matches ​

(item) => boolean

Returns ​

boolean | undefined

equipment()? ​

optional equipment(slot, index): FilterItemView | undefined

Defined in: entities/src/filterContext.ts:177

The item in one slot of a container, or undefined when the slot is empty.

Parameters ​
slot ​

"any" | "head" | "inventory" | "armor" | "feet" | "hand" | "leg" | "main_hand" | "off_hand" | "torso"

index ​

number

Returns ​

FilterItemView | undefined

flag()? ​

optional flag(name): boolean | undefined

Defined in: entities/src/filterContext.ts:165

A boolean fact, named by the filter test that reads it.

Parameters ​
name ​

"is_baby" | "has_container_open" | "has_nametag" | "has_ranged_weapon" | "has_silk_touch" | "has_target" | "has_trade_supply" | "in_caravan" | "in_clouds" | "in_contact_with_water" | "in_lava" | "in_water" | "in_water_or_rain" | "is_avoiding_mobs" | "is_bound_to_creaking_heart" | "is_climbing" | "is_humid" | "is_immobile" | "is_in_village" | "is_leashed" | "is_missing_health" | "is_moving" | "is_navigating" | "is_panicking" | "is_persistent" | "is_raider" | "is_riding" | "is_sitting" | "is_sleeping" | "is_sneak_held" | "is_sneaking" | "is_snow_covered" | "is_sprinting" | "is_tamed" | "is_underground" | "is_underwater" | "is_visible" | "on_fire" | "on_ground" | "on_hot_block" | "on_ladder" | "surface_mob" | "taking_fire_damage"

Returns ​

boolean | undefined

hasComponent()? ​

optional hasComponent(name): boolean

Defined in: entities/src/filterContext.ts:175

Whether the named component is active on the entity now.

Parameters ​
name ​

string

Returns ​

boolean

hasProperty()? ​

optional hasProperty(name): boolean

Defined in: entities/src/filterContext.ts:173

Whether the entity declares the named property at all.

Parameters ​
name ​

string

Returns ​

boolean

id()? ​

optional id(): string | number

Defined in: entities/src/filterContext.ts:163

A stable identity, so the tests that compare two subjects can tell them apart.

Returns ​

string | number

leashHolder()? ​

optional leashHolder(): FilterEntityView | undefined

Defined in: entities/src/filterContext.ts:189

The entity holding this one's leash, for is_leashed_to.

Returns ​

FilterEntityView | undefined

measure()? ​

optional measure(name): number | undefined

Defined in: entities/src/filterContext.ts:167

A numeric fact, named by the filter test that reads it.

Parameters ​
name ​

"actor_health" | "distance_to_nearest_player" | "home_distance" | "inactivity_timer" | "is_altitude" | "is_brightness" | "is_mark_variant" | "is_skin_id" | "is_temperature_value" | "is_variant" | "light_level" | "owner_distance" | "redstone_strength_at_position" | "rider_count" | "target_distance" | "y_rotation"

Returns ​

number | undefined

names()? ​

optional names(name): readonly string[] | undefined

Defined in: entities/src/filterContext.ts:169

A set of names, such as the type families is_family compares against.

Parameters ​
name ​

"is_family" | "has_biome_tag" | "has_ability" | "has_damage" | "has_mob_effect" | "has_tag" | "in_block" | "is_biome" | "is_color" | "is_controlling_passenger_family" | "is_temperature_type" | "was_last_hurt_by" | "weather_at_position"

Returns ​

readonly string[] | undefined

owner()? ​

optional owner(): FilterEntityView | undefined

Defined in: entities/src/filterContext.ts:185

The entity that owns this one, for is_owner.

Returns ​

FilterEntityView | undefined

property()? ​

optional property(name): PropertyValue | undefined

Defined in: entities/src/filterContext.ts:171

The current value of one entity property.

Parameters ​
name ​

string

Returns ​

PropertyValue | undefined

slotFill()? ​

optional slotFill(slot): SlotFill | undefined

Defined in: entities/src/filterContext.ts:179

How full a container is, for all_slots_empty and any_slot_empty.

Parameters ​
slot ​

"any" | "head" | "inventory" | "armor" | "feet" | "hand" | "leg" | "main_hand" | "off_hand" | "torso"

Returns ​

SlotFill | undefined

trusts()? ​

optional trusts(other): boolean | undefined

Defined in: entities/src/filterContext.ts:191

Whether this entity trusts the other one.

Parameters ​
other ​

FilterEntityView

Returns ​

boolean | undefined

vehicle()? ​

optional vehicle(): FilterEntityView | undefined

Defined in: entities/src/filterContext.ts:183

The entity this one is riding.

Returns ​

FilterEntityView | undefined


FilterItemView ​

Defined in: entities/src/filterContext.ts:123

One item stack, as the equipment and item tests read it.

Methods ​

damaged()? ​

optional damaged(): boolean

Defined in: entities/src/filterContext.ts:134

Whether the stack has lost durability.

Returns ​

boolean

data()? ​

optional data(): number

Defined in: entities/src/filterContext.ts:127

The auxiliary value has_equipment compares after the : in its value.

Returns ​

number

enchantment()? ​

optional enchantment(name): number

Defined in: entities/src/filterContext.ts:130

The level of the named enchantment, or 0 when the item does not carry it.

Parameters ​
name ​

string

Returns ​

number

hasComponent()? ​

optional hasComponent(name): boolean

Defined in: entities/src/filterContext.ts:132

Whether the stack carries the named item component.

Parameters ​
name ​

string

Returns ​

boolean

identifier() ​

identifier(): string

Defined in: entities/src/filterContext.ts:125

The item identifier, such as minecraft:bucket.

Returns ​

string

tags()? ​

optional tags(): readonly string[]

Defined in: entities/src/filterContext.ts:128

Returns ​

readonly string[]


FilterWorldView ​

Defined in: entities/src/filterContext.ts:195

The world facts the time, weather, difficulty and game rule tests read.

Methods ​

difficulty()? ​

optional difficulty(): string

Defined in: entities/src/filterContext.ts:199

The difficulty name, one of peaceful, easy, normal or hard.

Returns ​

string

dimension()? ​

optional dimension(): string

Defined in: entities/src/filterContext.ts:201

The dimension identifier, for in_nether and in_overworld.

Returns ​

string

gameRule()? ​

optional gameRule(name): number | boolean | undefined

Defined in: entities/src/filterContext.ts:203

A game rule's value, for is_game_rule.

Parameters ​
name ​

string

Returns ​

number | boolean | undefined

moonIntensity()? ​

optional moonIntensity(): number

Defined in: entities/src/filterContext.ts:207

The moon's brightness, in [0, 1].

Returns ​

number

moonPhase()? ​

optional moonPhase(): number

Defined in: entities/src/filterContext.ts:205

The moon phase, 0 to 7.

Returns ​

number

timeOfDay()? ​

optional timeOfDay(): number

Defined in: entities/src/filterContext.ts:197

Time of day in ticks, in [0, 24000).

Returns ​

number

weather()? ​

optional weather(): string

Defined in: entities/src/filterContext.ts:209

The current weather name, one of clear, precipitation, rain or thunder.

Returns ​

string


FloatParams ​

Defined in: entities/src/goals/reference.ts:18

What minecraft:behavior.float declares.

Properties ​

chancePerTickToFloat ​

readonly chancePerTickToFloat: number

Defined in: entities/src/goals/reference.ts:20

The chance per tick of swimming up while in a liquid, in [0, 1].


Goal ​

Defined in: entities/src/goals.ts:32

One goal running on one entity.

The scheduler calls canStart on a goal that is not running and canContinue on one that is, so a goal that stops under the same condition it starts under implements only canStart.

Methods ​

canContinue()? ​

optional canContinue(): boolean

Defined in: entities/src/goals.ts:36

Whether a running goal keeps its control flags; defaults to Goal.canStart.

Returns ​

boolean

canStart() ​

canStart(): boolean

Defined in: entities/src/goals.ts:34

Whether the goal is ready to take its control flags.

Returns ​

boolean

requiresUpdateEveryTick()? ​

optional requiresUpdateEveryTick(): boolean

Defined in: entities/src/goals.ts:44

Whether Java ticks this goal on selector gaps as well as selector ticks.

Returns ​

boolean

start()? ​

optional start(): void

Defined in: entities/src/goals.ts:38

Runs once when the goal takes its control flags.

Returns ​

void

stop()? ​

optional stop(): void

Defined in: entities/src/goals.ts:40

Runs once when the goal gives its control flags up, whether it finished or was preempted.

Returns ​

void

tick()? ​

optional tick(): void

Defined in: entities/src/goals.ts:42

Runs once per tick while the goal holds its control flags.

Returns ​

void


GoalFactory ​

Defined in: entities/src/goals.ts:64

One goal implementation, which is what a later agent writes per minecraft:behavior.* name.

Type Parameters ​

P ​

P

Properties ​

controlFlags ​

readonly controlFlags: readonly ("move" | "look" | "jump")[]

Defined in: entities/src/goals.ts:68

The control flags the goal holds when the definition names none.

name ​

readonly name: string

Defined in: entities/src/goals.ts:66

The component name, such as minecraft:behavior.random_stroll.

schema ​

readonly schema: ComponentSchema<P>

Defined in: entities/src/goals.ts:70

Parses the goal's own parameters; priority and control_flags are handled here.

Methods ​

create() ​

create(params, entity): Goal

Defined in: entities/src/goals.ts:75

Builds the goal for one entity. It runs when the component initializes, so a re-added component group builds a fresh goal with fresh state.

Parameters ​
params ​

P

entity ​

EntityInstance

Returns ​

Goal


GoalParams ​

Defined in: entities/src/goals.ts:56

A goal component's parsed value: the shared settings plus the goal's own parameters.

Extends ​

Type Parameters ​

P ​

P

Properties ​

controlFlags ​

readonly controlFlags: readonly ("move" | "look" | "jump")[]

Defined in: entities/src/goals.ts:52

The control flags the goal holds while it runs.

Inherited from ​

GoalSettings.controlFlags

params ​

readonly params: P

Defined in: entities/src/goals.ts:57

priority ​

readonly priority: number

Defined in: entities/src/goals.ts:50

0 is the highest priority; a lower number preempts a higher one.

Inherited from ​

GoalSettings.priority


GoalSettings ​

Defined in: entities/src/goals.ts:48

The two fields every minecraft:behavior.* component carries.

Extended by ​

Properties ​

controlFlags ​

readonly controlFlags: readonly ("move" | "look" | "jump")[]

Defined in: entities/src/goals.ts:52

The control flags the goal holds while it runs.

priority ​

readonly priority: number

Defined in: entities/src/goals.ts:50

0 is the highest priority; a lower number preempts a higher one.


HealableEffectParams ​

Defined in: entities/src/components/interactions.ts:580

One status effect a minecraft:healable item may apply.

Properties ​

amplifier ​

readonly amplifier: number

Defined in: entities/src/components/interactions.ts:586

One below the displayed potency.

chance ​

readonly chance: number

Defined in: entities/src/components/interactions.ts:588

The chance in [0, 1] that this effect is applied.

duration ​

readonly duration: number | "infinite"

Defined in: entities/src/components/interactions.ts:584

Duration in seconds, or infinite for an effect that never expires.

name ​

readonly name: string

Defined in: entities/src/components/interactions.ts:582

The Bedrock status effect name.


HealableItemParams ​

Defined in: entities/src/components/interactions.ts:592

One item minecraft:healable accepts.

Properties ​

effects ​

readonly effects: readonly HealableEffectParams[]

Defined in: entities/src/components/interactions.ts:600

Status effects applied when the item is accepted.

healAmount ​

readonly healAmount: number

Defined in: entities/src/components/interactions.ts:596

Health restored when the entity accepts the item.

item ​

readonly item: string

Defined in: entities/src/components/interactions.ts:594

The item identifier, normalized to the default Minecraft namespace.

resultItem? ​

readonly optional resultItem?: string

Defined in: entities/src/components/interactions.ts:598

Item replacing the consumed item, if the definition names one.


HealableParams ​

Defined in: entities/src/components/interactions.ts:604

What minecraft:healable declares.

Properties ​

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/components/interactions.ts:608

Conditions required before a matching item can be used.

forceUse ​

readonly forceUse: boolean

Defined in: entities/src/components/interactions.ts:610

Whether a matching item is accepted at full health.

items ​

readonly items: readonly HealableItemParams[]

Defined in: entities/src/components/interactions.ts:606

Items that can be used to heal the entity.


HurtOnConditionParams ​

Defined in: entities/src/components/hazards.ts:34

What minecraft:hurt_on_condition declares.

Properties ​

conditions ​

readonly conditions: readonly DamageCondition[]

Defined in: entities/src/components/hazards.ts:35


IgnoreCannotBeAttackedParams ​

Defined in: entities/src/components/combat.ts:232

What minecraft:ignore_cannot_be_attacked declares.

Properties ​

filters ​

readonly filters: Filter | undefined

Defined in: entities/src/components/combat.ts:234

Targets this entity may attack despite their minecraft:cannot_be_attacked component.


InsideBlockNotifierEntry ​

Defined in: entities/src/components/sensors.ts:332

One block state and its enter and exit events in minecraft:inside_block_notifier.

Properties ​

blockName ​

readonly blockName: string

Defined in: entities/src/components/sensors.ts:334

The block identifier to watch.

enteredBlockEvent? ​

readonly optional enteredBlockEvent?: SensorTrigger

Defined in: entities/src/components/sensors.ts:338

Event raised when the entity enters a matching block.

exitedBlockEvent? ​

readonly optional exitedBlockEvent?: SensorTrigger

Defined in: entities/src/components/sensors.ts:340

Event raised when the entity leaves a matching block.

states ​

readonly states: Readonly<Record<string, boolean>>

Defined in: entities/src/components/sensors.ts:336

Boolean block states that must match; omitted states accept every state.


InsideBlockNotifierParams ​

Defined in: entities/src/components/sensors.ts:344

What minecraft:inside_block_notifier declares.

Properties ​

blockList ​

readonly blockList: readonly InsideBlockNotifierEntry[]

Defined in: entities/src/components/sensors.ts:345


InteractParams ​

Defined in: entities/src/components/interactions.ts:114

What minecraft:interact declares.

Properties ​

interactions ​

readonly interactions: readonly InteractEntry[]

Defined in: entities/src/components/interactions.ts:116

Ordered interactions; the first matching entry with a supported effect wins.


InventoryParams ​

Defined in: entities/src/components/body.ts:146

What minecraft:inventory declares.

Properties ​

additionalSlotsPerStrength ​

readonly additionalSlotsPerStrength: number

Defined in: entities/src/components/body.ts:151

canBeSiphonedFrom ​

readonly canBeSiphonedFrom: boolean

Defined in: entities/src/components/body.ts:152

containerType ​

readonly containerType: string

Defined in: entities/src/components/body.ts:147

inventorySize ​

readonly inventorySize: number

Defined in: entities/src/components/body.ts:148

isPrivate ​

readonly isPrivate: boolean

Defined in: entities/src/components/body.ts:149

restrictToOwner ​

readonly restrictToOwner: boolean

Defined in: entities/src/components/body.ts:150


JavaEntityNavigation ​

Defined in: entities/src/javaNavigation.ts:4

Java's navigation, path costs, and pushability, read after the entity registers its goals.

Properties ​

canFloat ​

readonly canFloat: boolean

Defined in: entities/src/javaNavigation.ts:8

Whether Java's goal registrations enabled floating through liquid.

canNavigateGround ​

readonly canNavigateGround: boolean

Defined in: entities/src/javaNavigation.ts:10

Whether the navigator can follow paths on solid ground.

readonly navigationClass: string

Defined in: entities/src/javaNavigation.ts:6

The Java class that owns the entity's path navigation.

pathfindingMalus ​

readonly pathfindingMalus: Readonly<Record<string, number>>

Defined in: entities/src/javaNavigation.ts:14

Java's per-path-type cost, with negative values marking blocked terrain.

pushable ​

readonly pushable: boolean

Defined in: entities/src/javaNavigation.ts:12

Whether Java lets this living entity push and be pushed by other entities.


JavaEntityStats ​

Defined in: entities/src/javaStats.ts:211

One Java entity type's hitbox and the attributes its class declares.

Properties ​

attributes ​

readonly attributes: Readonly<Record<string, number>>

Defined in: entities/src/javaStats.ts:217

Java attribute id to its base value, such as minecraft:max_health.

height ​

readonly height: number

Defined in: entities/src/javaStats.ts:215

The hitbox height in blocks.

width ​

readonly width: number

Defined in: entities/src/javaStats.ts:213

The hitbox width in blocks.


JavaStatException ​

Defined in: entities/src/javaStats.ts:106

One entity and stat that keeps Bedrock's value inside a Java-decided stat.

Properties ​

identifier ​

readonly identifier: string

Defined in: entities/src/javaStats.ts:108

The entity identifier, such as minecraft:wither.

reason ​

readonly reason: string

Defined in: entities/src/javaStats.ts:111

Why Java's dumped number is not Java's behavior for this entity.

stat ​

readonly stat: SharedStat

Defined in: entities/src/javaStats.ts:109


JumpParams ​

Defined in: entities/src/components/movement.ts:95

What minecraft:jump.static declares.

Properties ​

jumpPower ​

readonly jumpPower: number

Defined in: entities/src/components/movement.ts:96


LookAtPlayerParams ​

Defined in: entities/src/goals/reference.ts:101

What minecraft:behavior.look_at_player declares.

Properties ​

lookDistance ​

readonly lookDistance: number

Defined in: entities/src/goals/reference.ts:103

How far the entity notices a player, in blocks.

lookTime ​

readonly lookTime: readonly [number, number]

Defined in: entities/src/goals/reference.ts:107

How long one look lasts, in seconds, as a [min, max] pair.

probability ​

readonly probability: number

Defined in: entities/src/goals/reference.ts:105

The chance per tick of starting to look, in [0, 1].


LootParams ​

Defined in: entities/src/components/body.ts:72

What minecraft:loot declares.

Properties ​

table? ​

readonly optional table?: string

Defined in: entities/src/components/body.ts:74

The pack-relative path of the loot table, such as loot_tables/entities/zombie.json.


MobEffectParams ​

Defined in: entities/src/components/effects.ts:15

What minecraft:mob_effect declares.

Properties ​

ambient ​

readonly ambient: boolean

Defined in: entities/src/components/effects.ts:27

Whether the applied effect uses the ambient visual style.

cooldownTicks ​

readonly cooldownTicks: number

Defined in: entities/src/components/effects.ts:23

Ticks to wait between applications after one or more targets accept it.

durationTicks ​

readonly durationTicks: number

Defined in: entities/src/components/effects.ts:19

The effect duration, or -1 when it never expires.

effect ​

readonly effect: string

Defined in: entities/src/components/effects.ts:17

The effect applied to matching entities.

effectRange ​

readonly effectRange: number

Defined in: entities/src/components/effects.ts:21

Distance to search in the horizontal and vertical axes.

entityFilter? ​

readonly optional entityFilter?: Filter

Defined in: entities/src/components/effects.ts:25

Optional filter evaluated with the source as self and each candidate as other.


MovementModeParams ​

Defined in: entities/src/components/movement.ts:73

What a minecraft:movement.* component declares.

Properties ​

kind ​

readonly kind: string

Defined in: entities/src/components/movement.ts:75

The movement flavor, such as basic or sway.

maxTurn ​

readonly maxTurn: number

Defined in: entities/src/components/movement.ts:77

The most degrees the entity turns per tick.


NameableParams ​

Defined in: entities/src/components/nameable.ts:21

What minecraft:nameable declares.

Properties ​

allowNameTagRenaming ​

readonly allowNameTagRenaming: boolean

Defined in: entities/src/components/nameable.ts:23

Whether a name tag may change the custom name; defaults to true.

alwaysShow ​

readonly alwaysShow: boolean

Defined in: entities/src/components/nameable.ts:25

Whether the client always displays the custom name; defaults to false.

defaultTrigger? ​

readonly optional defaultTrigger?: NameableTrigger

Defined in: entities/src/components/nameable.ts:27

The event raised whenever a name tag names the entity.

nameActions ​

readonly nameActions: readonly object[]

Defined in: entities/src/components/nameable.ts:29

Name-specific events raised when the assigned name matches.


NameableTrigger ​

Defined in: entities/src/components/nameable.ts:11

One event a nameable entity raises when a name tag assigns a matching name.

Properties ​

event ​

readonly event: string

Defined in: entities/src/components/nameable.ts:13

The event name.

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/components/nameable.ts:17

The filter that must pass before the event is raised.

target ​

readonly target: "self" | "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

Defined in: entities/src/components/nameable.ts:15

The entity subject that receives the event.


Defined in: entities/src/components/movement.ts:9

What minecraft:navigation.* declares; every field is a capability of the path finder.

Properties ​

avoidDamageBlocks ​

readonly avoidDamageBlocks: boolean

Defined in: entities/src/components/movement.ts:31

avoidPortals ​

readonly avoidPortals: boolean

Defined in: entities/src/components/movement.ts:30

avoidSun ​

readonly avoidSun: boolean

Defined in: entities/src/components/movement.ts:29

avoidWater ​

readonly avoidWater: boolean

Defined in: entities/src/components/movement.ts:28

blocksToAvoid ​

readonly blocksToAvoid: readonly unknown[]

Defined in: entities/src/components/movement.ts:34

Block names and tags the path finder treats as impassable.

canBreach ​

readonly canBreach: boolean

Defined in: entities/src/components/movement.ts:21

canBreakDoors ​

readonly canBreakDoors: boolean

Defined in: entities/src/components/movement.ts:26

canFloat ​

readonly canFloat: boolean

Defined in: entities/src/components/movement.ts:15

canFly ​

readonly canFly: boolean

Defined in: entities/src/components/movement.ts:20

canJump ​

readonly canJump: boolean

Defined in: entities/src/components/movement.ts:22

canOpenDoors ​

readonly canOpenDoors: boolean

Defined in: entities/src/components/movement.ts:23

canOpenIronDoors ​

readonly canOpenIronDoors: boolean

Defined in: entities/src/components/movement.ts:24

canPassDoors ​

readonly canPassDoors: boolean

Defined in: entities/src/components/movement.ts:25

canPathFromAir ​

readonly canPathFromAir: boolean

Defined in: entities/src/components/movement.ts:14

canPathOverLava ​

readonly canPathOverLava: boolean

Defined in: entities/src/components/movement.ts:13

canPathOverWater ​

readonly canPathOverWater: boolean

Defined in: entities/src/components/movement.ts:12

canSink ​

readonly canSink: boolean

Defined in: entities/src/components/movement.ts:16

canSwim ​

readonly canSwim: boolean

Defined in: entities/src/components/movement.ts:17

canWalk ​

readonly canWalk: boolean

Defined in: entities/src/components/movement.ts:18

canWalkInLava ​

readonly canWalkInLava: boolean

Defined in: entities/src/components/movement.ts:19

isAmphibious ​

readonly isAmphibious: boolean

Defined in: entities/src/components/movement.ts:32

kind ​

readonly kind: string

Defined in: entities/src/components/movement.ts:11

The navigation flavor, such as walk or generic.

usingDoorAnnotation ​

readonly usingDoorAnnotation: boolean

Defined in: entities/src/components/movement.ts:27


OutgoingTrigger ​

Defined in: entities/src/eventEngine.ts:76

One event to fire on another entity, which the caller routes.

Properties ​

event ​

readonly event: string

Defined in: entities/src/eventEngine.ts:77

target ​

readonly target: "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

Defined in: entities/src/eventEngine.ts:78


ParseEntityResult ​

Defined in: entities/src/definition.ts:96

What parseEntityDefinition returns.

Properties ​

definition? ​

optional definition?: EntityDefinition

Defined in: entities/src/definition.ts:98

The parsed definition, or undefined when the file has no usable entity body.

diagnostics ​

diagnostics: readonly Diagnostic[]

Defined in: entities/src/definition.ts:99


PhysicsParams ​

Defined in: entities/src/components/body.ts:104

What minecraft:physics declares.

Properties ​

hasCollision ​

readonly hasCollision: boolean

Defined in: entities/src/components/body.ts:106

hasGravity ​

readonly hasGravity: boolean

Defined in: entities/src/components/body.ts:105

pushTowardsClosestSpace ​

readonly pushTowardsClosestSpace: boolean

Defined in: entities/src/components/body.ts:107


PropertyDefinition ​

Defined in: entities/src/properties.ts:28

One declared property, after its type, range or value list is validated.

Properties ​

clientSync ​

readonly clientSync: boolean

Defined in: entities/src/properties.ts:33

Sent to clients for render and animation controllers when true.

default ​

readonly default: PropertyDefault

Defined in: entities/src/properties.ts:31

name ​

readonly name: string

Defined in: entities/src/properties.ts:29

range? ​

readonly optional range?: readonly [number, number]

Defined in: entities/src/properties.ts:35

The inclusive bounds of an int or float property; writes clamp into it.

type ​

readonly type: "int" | "float" | "bool" | "enum"

Defined in: entities/src/properties.ts:30

values? ​

readonly optional values?: readonly string[]

Defined in: entities/src/properties.ts:37

The members of an enum property, in declaration order.


PropertyWrite ​

Defined in: entities/src/events.ts:28

One set_property write.

Properties ​

name ​

readonly name: string

Defined in: entities/src/events.ts:29

value ​

readonly value: EventValue

Defined in: entities/src/events.ts:30


PushableParams ​

Defined in: entities/src/components/body.ts:126

What minecraft:pushable declares.

Properties ​

isPushable ​

readonly isPushable: boolean

Defined in: entities/src/components/body.ts:127

isPushableByPiston ​

readonly isPushableByPiston: boolean

Defined in: entities/src/components/body.ts:128


RandomSource ​

Defined in: entities/src/filterContext.ts:213

Draws the random numbers random_chance and the event engine's randomize need.

Methods ​

next() ​

next(): number

Defined in: entities/src/filterContext.ts:215

The next value in [0, 1).

Returns ​

number

nextInt()? ​

optional nextInt(bound): number

Defined in: entities/src/filterContext.ts:217

The next integer in [0, bound), when the source can draw it directly.

Parameters ​
bound ​

number

Returns ​

number


RandomStrollParams ​

Defined in: entities/src/goals/reference.ts:48

What minecraft:behavior.random_stroll declares.

Properties ​

interval ​

readonly interval: number

Defined in: entities/src/goals/reference.ts:53

One in this many ticks, the goal looks for somewhere to walk.

speedMultiplier ​

readonly speedMultiplier: number

Defined in: entities/src/goals/reference.ts:49

xzDistance ​

readonly xzDistance: number

Defined in: entities/src/goals/reference.ts:50

yDistance ​

readonly yDistance: number

Defined in: entities/src/goals/reference.ts:51


RandomTeleportCube ​

Defined in: entities/src/components/teleport.ts:12

The half-widths of the area from which a teleport destination is drawn.

Properties ​

x ​

readonly x: number

Defined in: entities/src/components/teleport.ts:13

y ​

readonly y: number

Defined in: entities/src/components/teleport.ts:14

z ​

readonly z: number

Defined in: entities/src/components/teleport.ts:15


ResolveEntityOptions ​

Defined in: entities/src/entityType.ts:70

Options for resolveEntityTypes.

Properties ​

behaviors? ​

optional behaviors?: BehaviorRegistry<EntityHooks>

Defined in: entities/src/entityType.ts:74

Behaviors the server and its plugins attach by identifier.

components ​

components: EntityComponentRegistry

Defined in: entities/src/entityType.ts:72

The component names this domain implements.

strict? ​

optional strict?: boolean

Defined in: entities/src/entityType.ts:78

Fail the resolve when any diagnostic is reported.

tagLookup? ​

optional tagLookup?: EntityTypeTagLookup

Defined in: entities/src/entityType.ts:76

Java datapack tags, mapped to the Bedrock identifier for each type.


ResolveEntityResult ​

Defined in: entities/src/entityType.ts:82

What resolveEntityTypes returns.

Properties ​

diagnostics ​

diagnostics: readonly Diagnostic[]

Defined in: entities/src/entityType.ts:85

types ​

types: ReadonlyMap<string, EntityType>

Defined in: entities/src/entityType.ts:84

Identifier to type, in input order, ready for Registry.rebuild.


ResolvedComponentGroup ​

Defined in: entities/src/entityType.ts:38

One component group, bound once at load.

Properties ​

components ​

readonly components: readonly BoundComponent<EntityHooks>[]

Defined in: entities/src/entityType.ts:41

The components that bound, in declaration order; a rejected one is absent.

name ​

readonly name: string

Defined in: entities/src/entityType.ts:39


ResolvedPropertyWrite ​

Defined in: entities/src/eventEngine.ts:70

One property write an event determined, with its value already resolved.

Properties ​

name ​

readonly name: string

Defined in: entities/src/eventEngine.ts:71

value ​

readonly value: PropertyValue

Defined in: entities/src/eventEngine.ts:72


RideableParams ​

Defined in: entities/src/riding.ts:24

What minecraft:rideable declares.

Properties ​

crouchingSkipInteract ​

readonly crouchingSkipInteract: boolean

Defined in: entities/src/riding.ts:32

familyTypes ​

readonly familyTypes: readonly string[]

Defined in: entities/src/riding.ts:30

The type families allowed to ride; empty means any.

interactText? ​

readonly optional interactText?: string

Defined in: entities/src/riding.ts:31

onRiderEnterEvent? ​

readonly optional onRiderEnterEvent?: string

Defined in: entities/src/riding.ts:35

Fired on the vehicle when a rider takes a seat.

onRiderExitEvent? ​

readonly optional onRiderExitEvent?: string

Defined in: entities/src/riding.ts:37

Fired on the vehicle when a rider leaves.

pullInEntities ​

readonly pullInEntities: boolean

Defined in: entities/src/riding.ts:33

seatCount ​

readonly seatCount: number

Defined in: entities/src/riding.ts:26

How many riders fit, which is what caps the seats.

seats ​

readonly seats: readonly RideableSeat[]

Defined in: entities/src/riding.ts:28

Written as one object in 50 vanilla instances and an array in 17.


RideableSeat ​

Defined in: entities/src/riding.ts:11

One seat of minecraft:rideable.

Properties ​

lockRiderRotation ​

readonly lockRiderRotation: number

Defined in: entities/src/riding.ts:18

How far the rider may turn from the seat's facing, in degrees.

maxRiderCount ​

readonly maxRiderCount: number

Defined in: entities/src/riding.ts:16

minRiderCount ​

readonly minRiderCount: number

Defined in: entities/src/riding.ts:15

The rider count at which this seat starts being used.

position ​

readonly position: readonly [number, number, number]

Defined in: entities/src/riding.ts:13

Where the rider sits, relative to the vehicle, in blocks.

rotateRiderBy? ​

readonly optional rotateRiderBy?: string | number

Defined in: entities/src/riding.ts:20

A literal angle or a Molang expression, which the boat writes.


ScheduledGoal ​

Defined in: entities/src/goals.ts:116

One goal registered with a scheduler.

Extends ​

Properties ​

controlFlags ​

readonly controlFlags: readonly ("move" | "look" | "jump")[]

Defined in: entities/src/goals.ts:52

The control flags the goal holds while it runs.

Inherited from ​

GoalSettings.controlFlags

goal ​

readonly goal: Goal

Defined in: entities/src/goals.ts:119

name ​

readonly name: string

Defined in: entities/src/goals.ts:118

The component name the goal was declared under.

priority ​

readonly priority: number

Defined in: entities/src/goals.ts:50

0 is the highest priority; a lower number preempts a higher one.

Inherited from ​

GoalSettings.priority


SensorTrigger ​

Defined in: entities/src/components/shared.ts:29

One {filters, event, target} trigger, which five component bodies share.

Properties ​

event? ​

readonly optional event?: string

Defined in: entities/src/components/shared.ts:31

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/components/shared.ts:30

target ​

readonly target: "self" | "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

Defined in: entities/src/components/shared.ts:32


ShareableItemParams ​

Defined in: entities/src/components/shareables.ts:8

One item name or tag and the pickup and sharing rules attached to it.

Properties ​

admire ​

readonly admire: boolean

Defined in: entities/src/components/shareables.ts:21

barter ​

readonly barter: boolean

Defined in: entities/src/components/shareables.ts:22

consumeItem ​

readonly consumeItem: boolean

Defined in: entities/src/components/shareables.ts:23

craftInto ​

readonly craftInto: string | undefined

Defined in: entities/src/components/shareables.ts:26

items ​

readonly items: readonly string[]

Defined in: entities/src/components/shareables.ts:10

Names or Bedrock item tags that match this rule.

maxAmount ​

readonly maxAmount: number

Defined in: entities/src/components/shareables.ts:14

Maximum matching items the entity keeps, or -1 for no limit.

pickupLimit ​

readonly pickupLimit: number

Defined in: entities/src/components/shareables.ts:16

Maximum matching items taken in one pickup.

pickupOnly ​

readonly pickupOnly: boolean

Defined in: entities/src/components/shareables.ts:24

priority ​

readonly priority: number

Defined in: entities/src/components/shareables.ts:12

Lower values win when the entity chooses among dropped items.

storedInInventory ​

readonly storedInInventory: boolean

Defined in: entities/src/components/shareables.ts:25

surplusAmount ​

readonly surplusAmount: number

Defined in: entities/src/components/shareables.ts:18

The amount considered surplus when the entity shares items.

wantAmount ​

readonly wantAmount: number

Defined in: entities/src/components/shareables.ts:20

The amount the entity wants when sharing items.


ShareablesParams ​

Defined in: entities/src/components/shareables.ts:30

The item rules and fallback settings declared by minecraft:shareables.

Properties ​

allItems ​

readonly allItems: boolean

Defined in: entities/src/components/shareables.ts:32

Whether unmatched items are accepted as the lowest priority group.

allItemsMaxAmount ​

readonly allItemsMaxAmount: number

Defined in: entities/src/components/shareables.ts:33

allItemsSurplusAmount ​

readonly allItemsSurplusAmount: number

Defined in: entities/src/components/shareables.ts:34

allItemsWantAmount ​

readonly allItemsWantAmount: number

Defined in: entities/src/components/shareables.ts:35

items ​

readonly items: readonly ShareableItemParams[]

Defined in: entities/src/components/shareables.ts:37

Rules in source order; the first matching rule shadows later matches.

singularPickup ​

readonly singularPickup: boolean

Defined in: entities/src/components/shareables.ts:39

Whether the entity may pick up another stack of an item it already holds.


SlotDropChance ​

Defined in: entities/src/components/body.ts:207

One entry of minecraft:equipment.slot_drop_chance.

Properties ​

dropChance ​

readonly dropChance: number

Defined in: entities/src/components/body.ts:209

slot ​

readonly slot: string

Defined in: entities/src/components/body.ts:208


SlotFill ​

Defined in: entities/src/filterContext.ts:145

How full one equipment container is.

Properties ​

capacity ​

readonly capacity: number

Defined in: entities/src/filterContext.ts:149

How many slots the container has.

filled ​

readonly filled: number

Defined in: entities/src/filterContext.ts:147

How many slots of the container hold an item.


SpawnEntityParams ​

Defined in: entities/src/components/lifecycle.ts:186

What minecraft:spawn_entity declares.

Properties ​

entries ​

readonly entries: readonly SpawnEntityEntry[]

Defined in: entities/src/components/lifecycle.ts:187


SpellEffectParams ​

Defined in: entities/src/components/effects.ts:31

The accepted status-effect request produced by minecraft:spell_effects.

Extends ​

Properties ​

ambient? ​

readonly optional ambient?: boolean

Defined in: entities/src/hooks.ts:243

Whether the effect has the ambient visual style.

Inherited from ​

EntityStatusEffect.ambient

amplifier ​

readonly amplifier: number

Defined in: entities/src/hooks.ts:241

One below the displayed potency.

Inherited from ​

EntityStatusEffect.amplifier

durationTicks ​

readonly durationTicks: number

Defined in: entities/src/hooks.ts:239

Ticks remaining, or -1 for an effect that never expires.

Inherited from ​

EntityStatusEffect.durationTicks

id ​

readonly id: string

Defined in: entities/src/hooks.ts:237

The Bedrock status effect name.

Inherited from ​

EntityStatusEffect.id

showIcon? ​

readonly optional showIcon?: boolean

Defined in: entities/src/hooks.ts:247

Whether the effect has a HUD icon.

Inherited from ​

EntityStatusEffect.showIcon

showParticles? ​

readonly optional showParticles?: boolean

Defined in: entities/src/hooks.ts:245

Whether the effect draws particles.

Inherited from ​

EntityStatusEffect.showParticles

visible ​

readonly visible: boolean

Defined in: entities/src/components/effects.ts:33

Whether the target displays the effect's particles and HUD icon.


SpellEffectsParams ​

Defined in: entities/src/components/effects.ts:37

What minecraft:spell_effects declares.

Properties ​

addEffects ​

readonly addEffects: readonly SpellEffectParams[]

Defined in: entities/src/components/effects.ts:38

removeEffects ​

readonly removeEffects: readonly string[]

Defined in: entities/src/components/effects.ts:39


StatAuthority ​

Defined in: entities/src/javaStats.ts:31

Which edition decides one shared stat.

Properties ​

attribute? ​

readonly optional attribute?: "absorption" | "attack_damage" | "flying_speed" | "follow_range" | "health" | "jump_strength" | "knockback_resistance" | "lava_movement" | "luck" | "movement" | "underwater_movement"

Defined in: entities/src/javaStats.ts:35

The attribute the stat lands on, absent for the two hitbox stats.

decidedBy ​

readonly decidedBy: "bedrock" | "java"

Defined in: entities/src/javaStats.ts:33

The edition whose value the server runs with.

javaAttribute? ​

readonly optional javaAttribute?: string

Defined in: entities/src/javaStats.ts:37

The key the Java attribute dump holds it under, absent for the two hitbox stats.

reason ​

readonly reason: string

Defined in: entities/src/javaStats.ts:39

Why that edition decides it.


StatRuling ​

Defined in: entities/src/javaStats.ts:178

What the decision says about one entity's value for one shared stat.

Properties ​

kind ​

readonly kind: "bedrock" | "java" | "exception"

Defined in: entities/src/javaStats.ts:184

java when the server replaces the pack's value with Java's, bedrock when the stat is one Bedrock decides, and exception when a reviewed row keeps Bedrock's value inside a stat Java otherwise decides.

reason ​

readonly reason: string

Defined in: entities/src/javaStats.ts:186

Why, taken from SHARED_STATS or from the matching JAVA_STAT_EXCEPTIONS row.


StrengthParams ​

Defined in: entities/src/components/body.ts:174

What minecraft:strength declares.

Properties ​

max ​

readonly max: number

Defined in: entities/src/components/body.ts:178

The maximum strength value this entity can reach.

value ​

readonly value: number

Defined in: entities/src/components/body.ts:176

The current strength value, which increases an entity's inventory capacity.


TameableItemParams ​

Defined in: entities/src/components/interactions.ts:813

One item minecraft:tameable accepts.

Properties ​

item ​

readonly item: string

Defined in: entities/src/components/interactions.ts:815

The item identifier, normalized to the default Minecraft namespace.

resultItem? ​

readonly optional resultItem?: string

Defined in: entities/src/components/interactions.ts:817

Item replacing the consumed item after a successful tame, if declared.


TameableParams ​

Defined in: entities/src/components/interactions.ts:821

What minecraft:tameable declares.

Properties ​

items ​

readonly items: readonly TameableItemParams[]

Defined in: entities/src/components/interactions.ts:823

Items that can tame the entity.

probability ​

readonly probability: number

Defined in: entities/src/components/interactions.ts:825

Probability of taming on each matching item interaction.

tameEvent? ​

readonly optional tameEvent?: SensorTrigger

Defined in: entities/src/components/interactions.ts:827

Event raised after a successful tame.


TargetNearbySensorParams ​

Defined in: entities/src/components/sensors.ts:464

What minecraft:target_nearby_sensor declares.

Properties ​

insideRange ​

readonly insideRange: number

Defined in: entities/src/components/sensors.ts:465

mustSee ​

readonly mustSee: boolean

Defined in: entities/src/components/sensors.ts:467

onInsideRange? ​

readonly optional onInsideRange?: SensorTrigger

Defined in: entities/src/components/sensors.ts:468

onOutsideRange? ​

readonly optional onOutsideRange?: SensorTrigger

Defined in: entities/src/components/sensors.ts:469

onVisionLostInsideRange? ​

readonly optional onVisionLostInsideRange?: SensorTrigger

Defined in: entities/src/components/sensors.ts:470

outsideRange ​

readonly outsideRange: number

Defined in: entities/src/components/sensors.ts:466


TeleportParams ​

Defined in: entities/src/components/teleport.ts:19

Parameters for minecraft:teleport.

Properties ​

darkTeleportChance ​

readonly darkTeleportChance: number

Defined in: entities/src/components/teleport.ts:20

lightTeleportChance ​

readonly lightTeleportChance: number

Defined in: entities/src/components/teleport.ts:21

maxRandomTeleportTime ​

readonly maxRandomTeleportTime: number

Defined in: entities/src/components/teleport.ts:22

minRandomTeleportTime ​

readonly minRandomTeleportTime: number

Defined in: entities/src/components/teleport.ts:23

projectileFilter ​

readonly projectileFilter: Filter | undefined

Defined in: entities/src/components/teleport.ts:24

randomTeleportCube ​

readonly randomTeleportCube: RandomTeleportCube

Defined in: entities/src/components/teleport.ts:25

randomTeleports ​

readonly randomTeleports: boolean

Defined in: entities/src/components/teleport.ts:26

targetDistance ​

readonly targetDistance: number

Defined in: entities/src/components/teleport.ts:27

targetTeleportChance ​

readonly targetTeleportChance: number

Defined in: entities/src/components/teleport.ts:28

teleportsOnProjectileHit ​

readonly teleportsOnProjectileHit: boolean

Defined in: entities/src/components/teleport.ts:29


TimerChoice ​

Defined in: entities/src/components/lifecycle.ts:91

One weighted entry of minecraft:timer.random_time_choices.

Properties ​

value ​

readonly value: number

Defined in: entities/src/components/lifecycle.ts:93

weight ​

readonly weight: number

Defined in: entities/src/components/lifecycle.ts:92


TimerParams ​

Defined in: entities/src/components/lifecycle.ts:97

What minecraft:timer declares.

Properties ​

choices ​

readonly choices: readonly TimerChoice[]

Defined in: entities/src/components/lifecycle.ts:103

Weighted durations the timer draws from instead of time.

down? ​

readonly optional down?: SensorTrigger

Defined in: entities/src/components/lifecycle.ts:105

The event the timer fires when it runs out, with whom it fires on.

looping ​

readonly looping: boolean

Defined in: entities/src/components/lifecycle.ts:100

randomInterval ​

readonly randomInterval: boolean

Defined in: entities/src/components/lifecycle.ts:101

time ​

readonly time: readonly [number, number]

Defined in: entities/src/components/lifecycle.ts:99

How long the timer runs, in seconds, as a fixed value or a [min, max] pair.


TransformRequest ​

Defined in: entities/src/entityInstance.ts:103

What minecraft:transformation asks the world to do.

Properties ​

addGroups ​

readonly addGroups: readonly string[]

Defined in: entities/src/entityInstance.ts:109

Component groups to add to the new entity.

dropEquipment ​

readonly dropEquipment: boolean

Defined in: entities/src/entityInstance.ts:113

dropInventory ​

readonly dropInventory: boolean

Defined in: entities/src/entityInstance.ts:114

event? ​

readonly optional event?: string

Defined in: entities/src/entityInstance.ts:107

The event to run on the new entity, from the identifier<event> form.

identifier ​

readonly identifier: string

Defined in: entities/src/entityInstance.ts:105

The entity type to become.

keepLevel ​

readonly keepLevel: boolean

Defined in: entities/src/entityInstance.ts:110

keepOwner ​

readonly keepOwner: boolean

Defined in: entities/src/entityInstance.ts:111

preserveEquipment ​

readonly preserveEquipment: boolean

Defined in: entities/src/entityInstance.ts:112


TransformationParams ​

Defined in: entities/src/components/lifecycle.ts:539

What minecraft:transformation declares.

Properties ​

addGroups ​

readonly addGroups: readonly string[]

Defined in: entities/src/components/lifecycle.ts:544

delay ​

readonly delay: number

Defined in: entities/src/components/lifecycle.ts:543

How long the change takes, in seconds.

dropEquipment ​

readonly dropEquipment: boolean

Defined in: entities/src/components/lifecycle.ts:548

dropInventory ​

readonly dropInventory: boolean

Defined in: entities/src/components/lifecycle.ts:549

into ​

readonly into: string

Defined in: entities/src/components/lifecycle.ts:541

The entity to become, in the identifier<event> form when it names an event.

keepLevel ​

readonly keepLevel: boolean

Defined in: entities/src/components/lifecycle.ts:545

keepOwner ​

readonly keepOwner: boolean

Defined in: entities/src/components/lifecycle.ts:546

preserveEquipment ​

readonly preserveEquipment: boolean

Defined in: entities/src/components/lifecycle.ts:547


TriggerComponentParams ​

Defined in: entities/src/triggers.ts:70

What an event-shaped minecraft:on_* component declares.

Properties ​

event? ​

readonly optional event?: string

Defined in: entities/src/triggers.ts:72

The event to fire; a body with none fires nothing, which four vanilla bodies do.

filters? ​

readonly optional filters?: Filter

Defined in: entities/src/triggers.ts:76

Gates the whole trigger, evaluated when the engine reaches the fixed point.

target ​

readonly target: "self" | "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

Defined in: entities/src/triggers.ts:74

Whom the event fires on, self when the body names none.


TypeFamilyParams ​

Defined in: entities/src/components/body.ts:54

What minecraft:type_family declares.

Properties ​

family ​

readonly family: readonly string[]

Defined in: entities/src/components/body.ts:56

The families is_family matches against.


WeightedEventNode ​

Defined in: entities/src/events.ts:87

One node of randomize, with the weight the engine draws against.

Properties ​

node ​

readonly node: EventNode

Defined in: entities/src/events.ts:89

weight ​

readonly weight: number

Defined in: entities/src/events.ts:88

Type Aliases ​

AttributeName ​

AttributeName = typeof ATTRIBUTES[number]

Defined in: entities/src/attributes.ts:26

One of ATTRIBUTES.


BuiltInSpawnEvent ​

BuiltInSpawnEvent = typeof BUILT_IN_SPAWN_EVENTS[number]

Defined in: entities/src/eventEngine.ts:26

One of BUILT_IN_SPAWN_EVENTS.


BurnsInDaylightProtectionSlot ​

BurnsInDaylightProtectionSlot = typeof BURNS_IN_DAYLIGHT_PROTECTION_SLOTS[number]

Defined in: entities/src/components/hazards.ts:106

A Bedrock protection slot accepted by minecraft:burns_in_daylight.


ComponentMap ​

ComponentMap = ReadonlyMap<string, unknown>

Defined in: entities/src/definition.ts:44

A component map as the file writes it: component name to raw JSON value.


ComponentRecord ​

ComponentRecord = Record<string, unknown>

Defined in: entities/src/components/schemas.ts:20

A JSON object, which is what nearly every component value is.


ControlFlag ​

ControlFlag = typeof CONTROL_FLAGS[number]

Defined in: entities/src/goals.ts:23

One of CONTROL_FLAGS.


DealsDamage ​

DealsDamage = typeof DEALS_DAMAGE[number]

Defined in: entities/src/components/sensors.ts:562

One of DEALS_DAMAGE.


DiagnosticSeverity ​

DiagnosticSeverity = "error" | "warning"

Defined in: entities/src/diagnostics.ts:8

How much a finding matters. An error drops content; a warning loads it with something unhandled.


EntityAction ​

EntityAction = { name: "play_sound"; sound: string; } | { name: "emit_particle"; particle: string; } | { name: "emit_vibration"; vibration: VibrationKind; } | { commands: readonly string[]; name: "queue_command"; target: EventTarget; } | { name: "set_home_position"; } | { event: string; name: "execute_event_on_home_block"; } | { name: "drop_item"; slot: string; } | { horizontal: boolean; name: "stop_movement"; vertical: boolean; } | { name: "reset_target"; }

Defined in: entities/src/events.ts:57

One event action, parsed into the shape EntityInstance.perform carries out.

The nine members are every action the composed vanilla pack writes plus queue_command, which the documentation describes and no vanilla entity uses. Measured over the 129 files of Bedrock Dedicated Server 1.26.51.1: play_sound 23 uses, set_home_position 17, emit_vibration 9, drop_item 2, execute_event_on_home_block 2, and one each of emit_particle, reset_target and stop_movement.

Union Members ​

Type Literal ​

{ name: "play_sound"; sound: string; }


Type Literal ​

{ name: "emit_particle"; particle: string; }


Type Literal ​

{ name: "emit_vibration"; vibration: VibrationKind; }


Type Literal ​

{ commands: readonly string[]; name: "queue_command"; target: EventTarget; }

Vanilla writes one command string; the engine also accepts a list.


Type Literal ​

{ name: "set_home_position"; }


Type Literal ​

{ event: string; name: "execute_event_on_home_block"; }


Type Literal ​

{ name: "drop_item"; slot: string; }

The slot name, such as slot.weapon.mainhand.


Type Literal ​

{ horizontal: boolean; name: "stop_movement"; vertical: boolean; }


Type Literal ​

{ name: "reset_target"; }


EntityComponentRegistry ​

EntityComponentRegistry = ComponentRegistry<EntityHooks>

Defined in: entities/src/entityType.ts:29

The registry an entity domain fills with component factories.


EntityEquipmentSlot ​

EntityEquipmentSlot = "slot.armor.body" | "slot.armor.chest" | "slot.armor.feet" | "slot.armor.head" | "slot.armor.legs" | "slot.weapon.mainhand" | "slot.weapon.offhand"

Defined in: entities/src/hooks.ts:53

A Bedrock equipment slot watched by minecraft:on_equipment_changed.


EntityFlag ​

EntityFlag = typeof ENTITY_FLAGS[number]

Defined in: entities/src/filterContext.ts:60

One of ENTITY_FLAGS.


EntityItemStatusEffect ​

EntityItemStatusEffect = EntityStatusEffect

Defined in: entities/src/hooks.ts:251

A status effect an accepted data-driven item interaction applies to its target.


EntityMeasure ​

EntityMeasure = typeof ENTITY_MEASURES[number]

Defined in: entities/src/filterContext.ts:83

One of ENTITY_MEASURES.


EntityNameSet ​

EntityNameSet = typeof ENTITY_NAME_SETS[number]

Defined in: entities/src/filterContext.ts:103

One of ENTITY_NAME_SETS.


EntitySpawnRequest ​

EntitySpawnRequest = { cause: "born" | "spawned"; count: number; event?: string; identifier: string; kind: "entity"; shouldLeash: boolean; sound?: string; } | { count: number; identifier: string; itemEvent?: { event: string; target: EventTarget; }; kind: "item"; sound?: string; }

Defined in: entities/src/hooks.ts:121

One entity or item a data component asks the world to create.


EntityTypeFlag ​

EntityTypeFlag = "spawnable" | "summonable" | "experimental"

Defined in: entities/src/entityType.ts:35

The load-time flags an entity type carries.


EntityTypeTagLookup ​

EntityTypeTagLookup = (identifier) => readonly string[]

Defined in: entities/src/entityType.ts:32

Looks up Java datapack tags for the Bedrock identifier of an entity type.

Parameters ​

identifier ​

string

Returns ​

readonly string[]


EquipmentSlot ​

EquipmentSlot = typeof EQUIPMENT_SLOTS[number]

Defined in: entities/src/filterContext.ts:120

One of EQUIPMENT_SLOTS; any when a test's domain names none.


EventReport ​

EventReport = (code, message) => void

Defined in: entities/src/events.ts:138

How the parser reports a finding about one node.

Parameters ​

code ​

string

message ​

string

Returns ​

void


EventTarget ​

EventTarget = typeof EVENT_TARGETS[number]

Defined in: entities/src/events.ts:16

One of EVENT_TARGETS; self when the file writes none.


EventValue ​

EventValue = { kind: "literal"; value: number | boolean; } | { kind: "text"; text: string; }

Defined in: entities/src/events.ts:24

A value an event writes. A number or a boolean is a literal. A string is ambiguous in the file, because the engine reads a set_property string as Molang and vanilla also writes enum members bare, so the parser keeps the text and the engine resolves it against the property it is writing.


FilterSubjects ​

FilterSubjects = Omit<FilterContext, "self" | "random">

Defined in: entities/src/filterContext.ts:246

The subjects of a context other than self, which an entity always answers for itself. A fixed point such as a damage event supplies the ones it knows.


JavaNavigationSource ​

JavaNavigationSource = Readonly<Record<string, JavaEntityNavigation>>

Defined in: entities/src/javaNavigation.ts:18

Java mob navigation data keyed by the Java entity identifier.


JavaStatSource ​

JavaStatSource = Readonly<Record<string, JavaEntityStats>>

Defined in: entities/src/javaStats.ts:228

Java's entity stats by identifier.

@jsprismarine/bedrock-data exports the vanilla table as java_entity_attributes. This package takes it as data so that the entity runtime does not depend on the goldens, and so a test can pass a table of its own.


PropertyDefault ​

PropertyDefault = { kind: "literal"; value: PropertyValue; } | { kind: "molang"; source: string; }

Defined in: entities/src/properties.ts:24

A declared default. The engine accepts a literal or a Molang expression, and a default expression may only call query.had_component_group.


PropertyType ​

PropertyType = typeof PROPERTY_TYPES[number]

Defined in: entities/src/properties.ts:15

One of PROPERTY_TYPES.


PropertyValue ​

PropertyValue = number | boolean | string

Defined in: entities/src/properties.ts:18

A property value at run time; an enum property holds the member's name.


SharedStat ​

SharedStat = "attack_damage" | "flying_speed" | "follow_range" | "height" | "jump_strength" | "knockback_resistance" | "max_health" | "movement_speed" | "width"

Defined in: entities/src/javaStats.ts:19

A stat both editions publish for the same entity.


SpawnCause ​

SpawnCause = "spawned" | "born" | "transformed" | "primed"

Defined in: entities/src/eventEngine.ts:29

Why an entity is being created, which picks its spawn event.


TriggerComponentName ​

TriggerComponentName = typeof EVENT_TRIGGER_COMPONENTS[number]

Defined in: entities/src/triggers.ts:46

One of EVENT_TRIGGER_COMPONENTS, which can be fired directly.


VibrationKind ​

VibrationKind = typeof VIBRATION_KINDS[number]

Defined in: entities/src/events.ts:44

One of VIBRATION_KINDS.

Variables ​

ATTRIBUTES ​

const ATTRIBUTES: readonly ["absorption", "attack_damage", "flying_speed", "follow_range", "health", "jump_strength", "knockback_resistance", "lava_movement", "luck", "movement", "underwater_movement"]

Defined in: entities/src/attributes.ts:11

The attribute names the implemented components write.


BUILT_IN_SPAWN_EVENTS ​

const BUILT_IN_SPAWN_EVENTS: readonly ["minecraft:entity_spawned", "minecraft:entity_born", "minecraft:entity_transformed", "minecraft:on_prime"]

Defined in: entities/src/eventEngine.ts:18

The four events the engine itself runs on a new entity.


BURNS_IN_DAYLIGHT_PROTECTION_SLOTS ​

const BURNS_IN_DAYLIGHT_PROTECTION_SLOTS: readonly ["slot.armor.body", "slot.armor.chest", "slot.armor.feet", "slot.armor.head", "slot.armor.legs", "slot.weapon.mainhand", "slot.weapon.offhand"]

Defined in: entities/src/components/hazards.ts:95

Equipment slots accepted for minecraft:burns_in_daylight protection.


CONTROL_FLAGS ​

const CONTROL_FLAGS: readonly ["move", "look", "jump"]

Defined in: entities/src/goals.ts:20

The parts of an entity a goal takes over while it runs.


DATA_COMPONENTS ​

const DATA_COMPONENTS: readonly string[]

Defined in: entities/src/components/index.ts:107

The component names this package parses and exposes without running behavior of its own.

Dedicated factories validate and normalize their values. Generic factories preserve the raw object. Both make the component available through EntityInstance.componentParams, which is all a flag like minecraft:can_climb or a table reference like minecraft:shareables is.

The list covers every canonical non-goal key after type resolution normalizes the legacy minecraft:offspring name to minecraft:offspring_data. Components with dedicated factories are registered separately; these factories preserve the remaining component bodies for systems that need their data, without claiming to run their behavior.


DEALS_DAMAGE ​

const DEALS_DAMAGE: readonly ["yes", "no", "no_but_side_effects_apply", "no_but_entity_effects_apply"]

Defined in: entities/src/components/sensors.ts:559

How a minecraft:damage_sensor trigger changes the damage it sees.


DEFAULT_UNDERWATER_MOVEMENT ​

const DEFAULT_UNDERWATER_MOVEMENT: 0.02 = 0.02

Defined in: entities/src/components/body.ts:11

The component default used when an entity has no underwater movement component.


ENTITY_FLAGS ​

const ENTITY_FLAGS: readonly ["has_container_open", "has_nametag", "has_ranged_weapon", "has_silk_touch", "has_target", "has_trade_supply", "in_caravan", "in_clouds", "in_contact_with_water", "in_lava", "in_water", "in_water_or_rain", "is_avoiding_mobs", "is_baby", "is_bound_to_creaking_heart", "is_climbing", "is_humid", "is_immobile", "is_in_village", "is_leashed", "is_missing_health", "is_moving", "is_navigating", "is_panicking", "is_persistent", "is_raider", "is_riding", "is_sitting", "is_sleeping", "is_sneak_held", "is_sneaking", "is_snow_covered", "is_sprinting", "is_tamed", "is_underground", "is_underwater", "is_visible", "on_fire", "on_ground", "on_hot_block", "on_ladder", "surface_mob", "taking_fire_damage"]

Defined in: entities/src/filterContext.ts:13

The boolean facts about an entity, each named by the filter test that reads it.


ENTITY_MEASURES ​

const ENTITY_MEASURES: readonly ["actor_health", "distance_to_nearest_player", "home_distance", "inactivity_timer", "is_altitude", "is_brightness", "is_mark_variant", "is_skin_id", "is_temperature_value", "is_variant", "light_level", "owner_distance", "redstone_strength_at_position", "rider_count", "target_distance", "y_rotation"]

Defined in: entities/src/filterContext.ts:63

The numeric facts about an entity, each named by the filter test that reads it.


ENTITY_NAME_SETS ​

const ENTITY_NAME_SETS: readonly ["has_ability", "has_biome_tag", "has_damage", "has_mob_effect", "has_tag", "in_block", "is_biome", "is_color", "is_controlling_passenger_family", "is_family", "is_temperature_type", "was_last_hurt_by", "weather_at_position"]

Defined in: entities/src/filterContext.ts:86

The name-set facts about an entity, each named by the filter test that reads it.


ENTITY_ROOT_KEY ​

const ENTITY_ROOT_KEY: "minecraft:entity" = 'minecraft:entity'

Defined in: entities/src/definition.ts:24

The key the entity body sits under in an entity file.


EQUIPMENT_SLOTS ​

const EQUIPMENT_SLOTS: readonly ["any", "armor", "feet", "hand", "head", "inventory", "leg", "main_hand", "off_hand", "torso"]

Defined in: entities/src/filterContext.ts:106

The equipment containers a filter domain names.


EVENT_ACTION_VERSIONS ​

const EVENT_ACTION_VERSIONS: ReadonlyMap<string, readonly [number, number, number]>

Defined in: entities/src/events.ts:117

The action keys EventActions.md documents, with the format_version each needs. An action used below its version loads anyway and is reported, which is the lenient reading format_version dispatch calls for.


EVENT_TARGETS ​

const EVENT_TARGETS: readonly ["self", "other", "player", "target", "baby", "parent", "holder", "block"]

Defined in: entities/src/events.ts:13

Whom a trigger entry fires its event on.


EVENT_TRIGGER_COMPONENTS ​

const EVENT_TRIGGER_COMPONENTS: readonly ["minecraft:on_death", "minecraft:on_friendly_anger", "minecraft:on_hurt", "minecraft:on_hurt_by_player", "minecraft:on_ignite", "minecraft:on_start_landing", "minecraft:on_start_takeoff", "minecraft:on_target_acquired", "minecraft:on_target_escape", "minecraft:on_wake_with_owner"]

Defined in: entities/src/triggers.ts:17

The ten event-shaped minecraft:on_* components.


FIRE_DAMAGE_CAUSES ​

const FIRE_DAMAGE_CAUSES: readonly string[]

Defined in: entities/src/hooks.ts:167

The causes minecraft:fire_immune turns aside.

Bedrock writes the component as an empty marker, so the cause list is the whole of what it means. magma is the block's own cause and is listed separately from fire, which is why both are here.


FREEZING_DAMAGE_CAUSES ​

const FREEZING_DAMAGE_CAUSES: readonly string[]

Defined in: entities/src/hooks.ts:177

The causes minecraft:freezing_immune turns aside.


HURT_INTERVAL_TICKS ​

const HURT_INTERVAL_TICKS: 10 = 10

Defined in: entities/src/components/hazards.ts:22

How many ticks apart an environmental hurt lands.

Both editions give an entity half a second of invulnerability after environmental damage, which is what makes minecraft:hurt_on_condition's damage_per_tick: 4 in lava the four damage per half second a player sees rather than eighty a second.


IMPLEMENTED_FILTER_TESTS ​

const IMPLEMENTED_FILTER_TESTS: readonly string[]

Defined in: entities/src/filters.ts:359

Every filter test this package evaluates, in name order.


JAVA_STAT_EXCEPTIONS ​

const JAVA_STAT_EXCEPTIONS: readonly JavaStatException[]

Defined in: entities/src/javaStats.ts:121

The rows that keep Bedrock's value inside a stat Java decides.

Each one is a case where Java's attribute supplier publishes a number that Java Edition itself never runs with, because the class overwrites it at spawn or expresses the behavior in code instead.


MAX_BLOCK_SENSOR_RADIUS ​

const MAX_BLOCK_SENSOR_RADIUS: 32 = 32

Defined in: entities/src/components/sensors.ts:249

The largest radius a minecraft:block_sensor can search.


MAX_ENUM_VALUES ​

const MAX_ENUM_VALUES: 16 = 16

Defined in: entities/src/properties.ts:44

At most 16 members per enum property, per the entity properties documentation.


MAX_PROPERTIES_PER_ENTITY ​

const MAX_PROPERTIES_PER_ENTITY: 32 = 32

Defined in: entities/src/properties.ts:41

At most 32 properties per entity type, per the entity properties documentation.


PROPERTY_TYPES ​

const PROPERTY_TYPES: readonly ["int", "float", "bool", "enum"]

Defined in: entities/src/properties.ts:12

The four property types the engine supports.


SELF_FIRED_TRIGGERS ​

const SELF_FIRED_TRIGGERS: readonly TriggerComponentName[]

Defined in: entities/src/triggers.ts:56

Event-shaped trigger components fired at fixed points the entity runtime owns.

EntityInstance.damage fires the hurt and death triggers, EntityInstance.setAttackTarget fires the target triggers, and the entity runtime fires friendly anger, ignition, landing, and takeoff. The pet sleep goal fires the owner-wake trigger.


SHARED_STATS ​

const SHARED_STATS: Readonly<Record<SharedStat, StatAuthority>>

Defined in: entities/src/javaStats.ts:52

The edition that decides each shared stat.

Java decides the four a Bedrock client never simulates: it draws hearts from the health attribute, computes no damage of its own, and runs no mob AI. Bedrock decides the five that reach the client's own simulation. ClientMovementPredictionSyncPacket enumerates what the client predicts an actor with, and the bounding box, the movement speeds and the jump strength are all on that list.


SUFFOCATION_DAMAGE ​

const SUFFOCATION_DAMAGE: 2 = 2

Defined in: entities/src/components/hazards.ts:195

How much health one suffocation hurt takes, which both editions put at one heart.


TICKS_PER_SECOND ​

const TICKS_PER_SECOND: 20 = 20

Defined in: entities/src/hooks.ts:13

How many server ticks there are in one second, which is how component bodies write durations.


TRIGGER_COMPONENTS ​

const TRIGGER_COMPONENTS: readonly ["minecraft:on_death", "minecraft:on_equipment_changed", "minecraft:on_friendly_anger", "minecraft:on_hurt", "minecraft:on_hurt_by_player", "minecraft:on_ignite", "minecraft:on_start_landing", "minecraft:on_start_takeoff", "minecraft:on_target_acquired", "minecraft:on_target_escape", "minecraft:on_wake_with_owner"]

Defined in: entities/src/triggers.ts:31

The eleven minecraft:on_* components vanilla declares.


VIBRATION_KINDS ​

const VIBRATION_KINDS: readonly ["entity_interact", "entity_act", "entity_die"]

Defined in: entities/src/events.ts:41

The three vibration names emit_vibration accepts.


admireItem ​

const admireItem: ComponentFactory<EntityHooks, AdmireItemParams>

Defined in: entities/src/components/interactions.ts:128

The Bedrock admiration component, consumed by the data-driven entity runtime.


ageable ​

const ageable: ComponentFactory<EntityHooks, AgeableParams>

Defined in: entities/src/components/lifecycle.ts:359

minecraft:ageable, carried by the baby group of 35 vanilla entities.

The countdown runs while the component is active and fires grow_up when it runs out, which is the event that swaps the baby group for the adult one. Feeding, pausing, and resetting are routed through the active component, so their item, event, timer, and filter data stay attached to the behavior that owns the timer.


airDragModifier ​

const airDragModifier: ComponentFactory<EntityHooks, number>

Defined in: entities/src/components/body.ts:292

minecraft:air_drag_modifier, the multiplier on air resistance.


ambientSoundInterval ​

const ambientSoundInterval: ComponentFactory<EntityHooks, AmbientSoundIntervalParams>

Defined in: entities/src/components/lifecycle.ts:486

minecraft:ambient_sound_interval, carried by 32 vanilla entities.

The component waits value seconds plus up to range more, plays its sound through the world, and draws the next wait. A body whose value and range are both zero, which the bee writes, names no interval and plays nothing.

event_names entries win over event_name, in file order, and their condition goes to the entity's Molang evaluator. An entry whose condition does not evaluate is skipped rather than taken.


angry ​

const angry: ComponentFactory<EntityHooks, AngryParams>

Defined in: entities/src/components/combat.ts:314

minecraft:angry, carried by 20 vanilla entities.

The component counts the anger down and fires calm_event when it runs out, which is what takes the angry group back off. broadcast_anger asks the world to notify nearby matching entities when anger starts, the mob attacks, it is attacked, or it dies. Its filters exclude targets and its angry sound repeats on the configured interval.

The bee and the dolphin write the pre-rename broadcastAnger and broadcastRange, so both spellings read.


areaAttack ​

const areaAttack: ComponentFactory<EntityHooks, AreaAttackParams>

Defined in: entities/src/components/combat.ts:63

minecraft:area_attack, whose range damage is applied by the dimension runtime.


attack ​

const attack: ComponentFactory<EntityHooks, AttackParams>

Defined in: entities/src/components/combat.ts:155

minecraft:attack, the melee damage an entity deals. It also declares the attack_damage attribute, so a group that swaps the component changes the stat.


attributeComponents ​

const attributeComponents: readonly ComponentFactory<EntityHooks, { max: number; value: number; }>[]

Defined in: entities/src/components/body.ts:14

The attribute components, each one number the server reads off the entity.


barter ​

const barter: ComponentFactory<EntityHooks, BarterParams>

Defined in: entities/src/components/interactions.ts:154

The Bedrock barter component, consumed by the data-driven entity runtime.


blockSensor ​

const blockSensor: ComponentFactory<EntityHooks, BlockSensorParams>

Defined in: entities/src/components/sensors.ts:290

minecraft:block_sensor, which raises events for matching nearby block breaks.


bounciness ​

const bounciness: ComponentFactory<EntityHooks, number>

Defined in: entities/src/components/body.ts:298

minecraft:bounciness, the fraction of impact velocity restored on a collision.


breathable ​

const breathable: ComponentFactory<EntityHooks, BreathableParams>

Defined in: entities/src/components/hazards.ts:219

minecraft:breathable, carried by 84 vanilla entities.

The component holds the air supply and spends it. An entity in a medium it cannot breathe loses a tick of supply per tick; one back in a medium it can breathe refills to full, over inhale_time when the body names one. An entity out of supply suffocates every suffocate_time seconds, or every half second when the body writes the vanilla 0.

Which medium the entity is in comes from the in_water and in_lava filter facts, so an environment that answers neither leaves the entity breathing.

Two vanilla files still write the pre-rename totalSupply and suffocateTime, so both spellings read.


breedable ​

const breedable: ComponentFactory<EntityHooks, BreedableParams>

Defined in: entities/src/components/interactions.ts:632

minecraft:breedable, which owns feeding eligibility and item replacement.


burnsInDaylight ​

const burnsInDaylight: ComponentFactory<EntityHooks, BurnsInDaylightParams>

Defined in: entities/src/components/hazards.ts:124

minecraft:burns_in_daylight, whose direct-sun test and fire state belong to the world runtime.

The component package validates the Bedrock equipment slot. The dimension runtime owns sky exposure, rain, fire ticks, damage, and the minecraft:on_ignite fixed point.


collisionBox ​

const collisionBox: ComponentFactory<EntityHooks, CollisionBoxParams>

Defined in: entities/src/components/body.ts:43

minecraft:collision_box, the entity's hitbox.


combatRegeneration ​

const combatRegeneration: ComponentFactory<EntityHooks, CombatRegenerationParams>

Defined in: entities/src/components/combat.ts:188

minecraft:combat_regeneration, which rewards the killer of the entity's current attack target with Regeneration I and removes Mining Fatigue.


damageOverTime ​

const damageOverTime: ComponentFactory<EntityHooks, DamageOverTimeParams>

Defined in: entities/src/components/hazards.ts:152

minecraft:damage_over_time, which hurts the entity while it is active.

The axolotl, the dolphin and the vex are the three vanilla users, and two of them write time_between_hurt: 0, which the engine floors at HURT_INTERVAL_TICKS rather than hurting every tick.


damageSensor ​

const damageSensor: ComponentFactory<EntityHooks, DamageSensorParams>

Defined in: entities/src/components/sensors.ts:592

minecraft:damage_sensor, which decides what one damage cause does and fires an event when it lands.

The first trigger whose cause and filters match answers, which is why the hook returns a value: dispatchFirst stops there.


defaultRandom ​

const defaultRandom: RandomSource

Defined in: entities/src/filterContext.ts:221

A random source backed by Math.random.


despawn ​

const despawn: ComponentFactory<EntityHooks, DespawnParams>

Defined in: entities/src/components/lifecycle.ts:38

minecraft:despawn, carried by 76 vanilla entities and written as the empty default by 67 of them.

With filters, the entity despawns as soon as they pass. Without them, the standard rules apply: anything past max_distance goes at once, and anything past min_distance rolls min_range_random_chance each tick.


dyeable ​

const dyeable: ComponentFactory<EntityHooks, DyeableParams>

Defined in: entities/src/components/dyeable.ts:23

minecraft:is_dyeable, including its optional touch-screen prompt.


entitySensor ​

const entitySensor: ComponentFactory<EntityHooks, EntitySensorParams>

Defined in: entities/src/components/sensors.ts:177

minecraft:entity_sensor, which emits events when nearby entity filters and count bounds pass.


environmentSensor ​

const environmentSensor: ComponentFactory<EntityHooks, EnvironmentSensorParams>

Defined in: entities/src/components/sensors.ts:53

minecraft:environment_sensor, which tests the world each tick and fires an event when its filters pass. The zombie's is_underwater trigger is what starts the conversion to a drowned.


equipment ​

const equipment: ComponentFactory<EntityHooks, EquipmentParams>

Defined in: entities/src/components/body.ts:220

minecraft:equipment, the loot table a mob wears.


equipmentChanged ​

const equipmentChanged: ComponentFactory<EntityHooks, EquipmentChangedParams>

Defined in: entities/src/components/sensors.ts:687

minecraft:on_equipment_changed, with a distinct event for equip and unequip per slot.


experienceReward ​

const experienceReward: ComponentFactory<EntityHooks, ExperienceRewardParams>

Defined in: entities/src/components/body.ts:93

minecraft:experience_reward, the experience an entity drops.


float ​

const float: GoalFactory<FloatParams>

Defined in: entities/src/goals/reference.ts:27

minecraft:behavior.float, which keeps an entity at the surface of water or lava. 49 vanilla entities carry it, 40 of them at priority 0.


frictionModifier ​

const frictionModifier: ComponentFactory<EntityHooks, number>

Defined in: entities/src/components/body.ts:295

minecraft:friction_modifier, the multiplier on ground friction.


healable ​

const healable: ComponentFactory<EntityHooks, HealableParams>

Defined in: entities/src/components/interactions.ts:695

minecraft:healable, which owns the entity's item-based healing interaction.


home ​

const home: ComponentFactory<EntityHooks, ComponentRecord>

Defined in: entities/src/components/home.ts:8

minecraft:home, which records the entity's spawning position for home-based behavior.


hurtOnCondition ​

const hurtOnCondition: ComponentFactory<EntityHooks, HurtOnConditionParams>

Defined in: entities/src/components/hazards.ts:46

minecraft:hurt_on_condition, carried by 87 vanilla entities and in all but a few of them the lava rule.

Every condition whose filters pass hurts, on the HURT_INTERVAL_TICKS cadence, so the damage reaches the sensors, the immunities and the hurt triggers through EntityInstance.damage like any other.


ignoreCannotBeAttacked ​

const ignoreCannotBeAttacked: ComponentFactory<EntityHooks, IgnoreCannotBeAttackedParams>

Defined in: entities/src/components/combat.ts:242

minecraft:ignore_cannot_be_attacked, with its exception filter scoped to the active component.


insideBlockNotifier ​

const insideBlockNotifier: ComponentFactory<EntityHooks, InsideBlockNotifierParams>

Defined in: entities/src/components/sensors.ts:395

minecraft:inside_block_notifier, which raises events on block-state transitions.


instantDespawn ​

const instantDespawn: ComponentFactory<EntityHooks, ComponentRecord>

Defined in: entities/src/components/lifecycle.ts:81

minecraft:instant_despawn, which removes the entity the moment it becomes active.


integerStateComponents ​

const integerStateComponents: readonly ComponentFactory<EntityHooks, number>[]

Defined in: entities/src/components/body.ts:282

The integer state components filters and the wire both read.


interact ​

const interact: ComponentFactory<EntityHooks, InteractParams>

Defined in: entities/src/components/interactions.ts:192

The held-item behavior currently implemented for minecraft:interact.

It evaluates each entry's on_interact.filters, enforces cooldowns, queues its event, plays play_sounds, emits its vibration game event, rolls spawn_items or adds add_items to the interacting player's inventory, creates spawn_entities, equips or drops an entity slot, and applies transform_to_item, give_item, and use_item to the live held stack. It emits a named particle_on_start.particle_type with its vertical and interactor offsets, and its swing setting relays the player's arm animation after a successful interaction. admire and barter start the piglin's corresponding item behavior when its active components and brain support them. Other interaction fields remain visible as a one-time runtime report so incomplete behavior is not silently treated as vanilla.


inventory ​

const inventory: ComponentFactory<EntityHooks, InventoryParams>

Defined in: entities/src/components/body.ts:156

minecraft:inventory, the container a mob carries.


jumpStatic ​

const jumpStatic: ComponentFactory<EntityHooks, JumpParams>

Defined in: entities/src/components/movement.ts:100

minecraft:jump.static, the fixed jump height 79 entities use.


lookAtPlayer ​

const lookAtPlayer: GoalFactory<LookAtPlayerParams>

Defined in: entities/src/goals/reference.ts:115

minecraft:behavior.look_at_player, the most used goal in the vanilla pack: 69 of the 129 entities carry it, usually at priority 7 to 9 with a probability of 0.02.


loot ​

const loot: ComponentFactory<EntityHooks, LootParams>

Defined in: entities/src/components/body.ts:78

minecraft:loot, the table a later agent rolls on death.


mobEffect ​

const mobEffect: ComponentFactory<EntityHooks, MobEffectParams>

Defined in: entities/src/components/effects.ts:96

minecraft:mob_effect, which applies an effect to matching nearby entities and players.


nameable ​

const nameable: ComponentFactory<EntityHooks, NameableParams>

Defined in: entities/src/components/nameable.ts:68

minecraft:nameable, including the event raised when a name tag is used.


parseEntityFilter ​

const parseEntityFilter: (value) => Filter = parseFilter

Defined in: entities/src/filters.ts:356

Parses a filter out of an entity definition. @jsprismarine/packs owns the grammar and reads every shape the vanilla files write, including the two this package used to rewrite first, so this is its parser under the name the entity side calls it by.

Parses a filter from its JSON form into the normalized shape: aliases resolve to their canonical combinator, integer subjects and operators resolve to their names, and the self and == defaults are filled in.

Parameters ​

value ​

unknown

Returns ​

Filter

Throws ​

When the value does not follow the grammar.

Throws ​

When the value does not follow the grammar.


physics ​

const physics: ComponentFactory<EntityHooks, PhysicsParams>

Defined in: entities/src/components/body.ts:111

minecraft:physics, carried by 126 of the 129 vanilla entities.


pushable ​

const pushable: ComponentFactory<EntityHooks, PushableParams>

Defined in: entities/src/components/body.ts:132

minecraft:pushable, which the 1.26.50 component schema omits but 27 entities use.


randomStroll ​

const randomStroll: GoalFactory<RandomStrollParams>

Defined in: entities/src/goals/reference.ts:63

minecraft:behavior.random_stroll, the wander 64 vanilla entities carry. It takes the move flag for one walk and gives it back when the walk ends.


recordSchema ​

const recordSchema: ComponentSchema<ComponentRecord>

Defined in: entities/src/components/schemas.ts:27

Accepts an object and nothing else, which is the shape of every component body.


referenceGoals ​

const referenceGoals: readonly [GoalFactory<FloatParams>, GoalFactory<RandomStrollParams>, GoalFactory<LookAtPlayerParams>]

Defined in: entities/src/goals/reference.ts:154

The goals this package ships. A later agent adds the other 167.


rideable ​

const rideable: ComponentFactory<EntityHooks, RideableParams>

Defined in: entities/src/components/body.ts:244

minecraft:rideable, carried by 36 vanilla entities.

The seats themselves are state the vehicle holds, so mounting goes through EntityInstance.mount and the component's part is the seat count, the families allowed in and the two events. Taking the component off empties the seats, which is what a group swap that removes a saddle does.


shareables ​

const shareables: ComponentFactory<EntityHooks, ShareablesParams>

Defined in: entities/src/components/shareables.ts:122

minecraft:shareables, which describes the items an entity picks up or shares.


spawnEggInteraction ​

const spawnEggInteraction: ComponentFactory<EntityHooks, ComponentRecord>

Defined in: entities/src/components/interactions.ts:26

minecraft:spawn_egg_interaction, which creates the entity's offspring from its matching egg.


spawnEntity ​

const spawnEntity: ComponentFactory<EntityHooks, SpawnEntityParams>

Defined in: entities/src/components/lifecycle.ts:205

minecraft:spawn_entity, which periodically creates the configured item or entity.

Its schedule belongs to the active component instance: removing its group clears the clock, and adding it again starts a new one.


spellEffects ​

const spellEffects: ComponentFactory<EntityHooks, SpellEffectsParams>

Defined in: entities/src/components/effects.ts:197

minecraft:spell_effects, the one-time effect operation performed when the component is added.


strength ​

const strength: ComponentFactory<EntityHooks, StrengthParams>

Defined in: entities/src/components/body.ts:182

minecraft:strength, which contributes slots to an entity's inventory.


tameable ​

const tameable: ComponentFactory<EntityHooks, TameableParams>

Defined in: entities/src/components/interactions.ts:831

minecraft:tameable, which owns item matching and its probability roll.


targetNearbySensor ​

const targetNearbySensor: ComponentFactory<EntityHooks, TargetNearbySensorParams>

Defined in: entities/src/components/sensors.ts:488

minecraft:target_nearby_sensor, which changes behavior as the current target enters or leaves its hysteresis range, or loses visibility inside.


teleport ​

const teleport: ComponentFactory<EntityHooks, TeleportParams>

Defined in: entities/src/components/teleport.ts:39

minecraft:teleport, which handles timed, target-driven, and projectile evasion teleports.


timer ​

const timer: ComponentFactory<EntityHooks, TimerParams>

Defined in: entities/src/components/lifecycle.ts:119

minecraft:timer, which fires an event after a delay.

Timing restarts on initialize, which is exactly the documented behavior of re-adding a group: "an already-added minecraft:timer that is added again will start its timing logic over".


transformation ​

const transformation: ComponentFactory<EntityHooks, TransformationParams>

Defined in: entities/src/components/lifecycle.ts:560

minecraft:transformation, which replaces the entity with another type after a delay and runs minecraft:entity_transformed on the new one.


typeFamily ​

const typeFamily: ComponentFactory<EntityHooks, TypeFamilyParams>

Defined in: entities/src/components/body.ts:60

minecraft:type_family, the families the most used filter test reads.

Functions ​

asList() ​

asList(value): readonly unknown[]

Defined in: entities/src/components/schemas.ts:43

Normalizes a value vanilla writes as either one object or an array of them.

Parameters ​

value ​

unknown

Returns ​

readonly unknown[]


attributeComponent() ​

attributeComponent(name, attribute, fallback): ComponentFactory<EntityHooks, { max: number; value: number; }>

Defined in: entities/src/components/schemas.ts:93

A component that declares one attribute, such as minecraft:health or minecraft:movement.

Writing the attribute on initialize is what makes a re-added component group reset the stat: the zombie's baby group carries its own minecraft:movement, and adding it again puts the speed back.

Parameters ​

name ​

string

attribute ​

"absorption" | "attack_damage" | "flying_speed" | "follow_range" | "health" | "jump_strength" | "knockback_resistance" | "lava_movement" | "luck" | "movement" | "underwater_movement"

fallback ​

number

Returns ​

ComponentFactory<EntityHooks, { max: number; value: number; }>


booleanAt() ​

booleanAt(body, key, fallback): boolean

Defined in: entities/src/components/schemas.ts:35

Reads a boolean from a component body, falling back when the key is absent.

Parameters ​

body ​

ComponentRecord

key ​

string

fallback ​

boolean

Returns ​

boolean


canEntityAttack() ​

canEntityAttack(attacker, target): boolean

Defined in: entities/src/components/combat.ts:272

Whether the attacker may damage the entity under the active attack filters.

Parameters ​

attacker ​

EntityInstance

target ​

EntityInstance

Returns ​

boolean


canEntityAttackView() ​

canEntityAttackView(attacker, target): boolean

Defined in: entities/src/components/combat.ts:258

Whether the attacker may damage a target view under the active attack filters.

Parameters ​

attacker ​

EntityInstance

target ​

FilterEntityView

Returns ​

boolean


coerce() ​

coerce(definition, value): PropertyValue | undefined

Defined in: entities/src/properties.ts:159

Brings a value into a property's domain: an int rounds and clamps, a float clamps, a bool accepts a boolean or Molang's 0 and 1, and an enum accepts one of its declared members.

Clamping is silent, which is what the engine documents for int and float.

Parameters ​

definition ​

PropertyDefinition

value ​

PropertyValue

Returns ​

PropertyValue | undefined

The stored value, or undefined when the value has no place in the domain.


createEntityComponentRegistry() ​

createEntityComponentRegistry(): EntityComponentRegistry

Defined in: entities/src/components/index.ts:305

Builds a registry holding every component and reference goal this package implements.

Returns ​

EntityComponentRegistry


damagerSubjects() ​

damagerSubjects(damager): FilterSubjects

Defined in: entities/src/filterContext.ts:253

The subjects a damage event supplies. Whoever dealt the damage answers both damager and other, which is the subject a vanilla minecraft:damage_sensor filter names.

Parameters ​

damager ​

FilterEntityView | undefined

Returns ​

FilterSubjects


dataComponent() ​

dataComponent(name): ComponentFactory<EntityHooks, ComponentRecord>

Defined in: entities/src/components/schemas.ts:63

A component that carries no parameters, such as minecraft:physics or minecraft:can_climb. The body still parses, so a typo in it is reported.

Parameters ​

name ​

string

Returns ​

ComponentFactory<EntityHooks, ComponentRecord>


determineEvent() ​

determineEvent(runtime, event): EventEffects

Defined in: entities/src/eventEngine.ts:149

Runs one event and returns what it decided, without changing the entity.

A node's own filters gate the whole node. Within a node the engine applies add, remove, set_property, the raw actions and trigger, then walks sequence in order, then draws one branch of randomize, then takes the first passing branch of first_valid. A trigger on self is folded into the same result, so one tick applies the whole chain; a trigger on another target is left for the caller to route.

Parameters ​

runtime ​

EventRuntime

event ​

string

Returns ​

EventEffects


evaluateFilter() ​

evaluateFilter(filter, context, options?): boolean

Defined in: entities/src/filters.ts:451

Evaluates one parsed filter.

An unknown test, a subject the context does not hold, and a fact no view answers all evaluate to false and report through EvaluateFilterOptions.onUnanswered, so a filter never stops a tick.

Parameters ​

filter ​

Filter

context ​

FilterContext

options? ​

EvaluateFilterOptions = {}

Returns ​

boolean


eventActionNames() ​

eventActionNames(node): readonly string[]

Defined in: entities/src/events.ts:409

Every action key a node tree asks for, which is what the version gate checks.

Parameters ​

node ​

EventNode

Returns ​

readonly string[]


eventActions() ​

eventActions(node): readonly EventAction[]

Defined in: entities/src/events.ts:396

Every action a node tree asks for, however deeply nested, in tree order.

Parameters ​

node ​

EventNode

Returns ​

readonly EventAction[]


goalComponent() ​

goalComponent<P>(factory): ComponentFactory<EntityHooks, GoalParams<P>>

Defined in: entities/src/goals.ts:84

Wraps a goal as a component factory.

The wrapper owns priority and control_flags, registers the goal with the entity's scheduler on initialize, and takes it off again on remove.

Type Parameters ​

P ​

P

Parameters ​

factory ​

GoalFactory<P>

Returns ​

ComponentFactory<EntityHooks, GoalParams<P>>


hasFilterTest() ​

hasFilterTest(name): boolean

Defined in: entities/src/filters.ts:362

Whether the evaluator knows the named test.

Parameters ​

name ​

string

Returns ​

boolean


isAreaAttackParams() ​

isAreaAttackParams(value): value is AreaAttackParams

Defined in: entities/src/components/combat.ts:133

Checks the parsed component parameters before the runtime reads them.

Parameters ​

value ​

unknown

Returns ​

value is AreaAttackParams


isDyeableParams() ​

isDyeableParams(value): value is DyeableParams

Defined in: entities/src/components/dyeable.ts:19

Whether a parsed value has the shape exposed by minecraft:is_dyeable.

Parameters ​

value ​

unknown

The parsed component parameters.

Returns ​

value is DyeableParams

Whether the value is a dyeable component body.


isEmptyEventNode() ​

isEmptyEventNode(node): boolean

Defined in: entities/src/events.ts:385

Whether a node asks for nothing at all, which is how vanilla writes a "do nothing" branch.

Parameters ​

node ​

EventNode

Returns ​

boolean


isJavaStatException() ​

isJavaStatException(identifier, stat): boolean

Defined in: entities/src/javaStats.ts:174

Whether a reviewed row keeps Bedrock's value for a stat Java otherwise decides.

Parameters ​

identifier ​

string

stat ​

SharedStat

Returns ​

boolean


isNameableParams() ​

isNameableParams(value): value is NameableParams

Defined in: entities/src/components/nameable.ts:38

Whether a parsed component value has the shape minecraft:nameable exposes to its host.

Parameters ​

value ​

unknown

Returns ​

value is NameableParams


isPlayerView() ​

isPlayerView(view): boolean

Defined in: entities/src/filterContext.ts:257

Whether a view belongs to the player type family.

Parameters ​

view ​

FilterEntityView | undefined

Returns ​

boolean


isRecord() ​

isRecord(value): value is ComponentRecord

Defined in: entities/src/components/schemas.ts:23

Whether a value is a plain JSON object.

Parameters ​

value ​

unknown

Returns ​

value is ComponentRecord


isRideableParams() ​

isRideableParams(value): value is RideableParams

Defined in: entities/src/riding.ts:41

Whether a value is the parsed body of minecraft:rideable.

Parameters ​

value ​

unknown

Returns ​

value is RideableParams


isShareablesParams() ​

isShareablesParams(value): value is ShareablesParams

Defined in: entities/src/components/shareables.ts:163

Whether a parsed minecraft:shareables value has its normalized shape.

Parameters ​

value ​

unknown

Returns ​

value is ShareablesParams


isStrengthParams() ​

isStrengthParams(value): value is StrengthParams

Defined in: entities/src/components/body.ts:197

Whether a value has the normalized shape produced by minecraft:strength.

Parameters ​

value ​

unknown

Returns ​

value is StrengthParams


isTriggerParams() ​

isTriggerParams(value): value is TriggerComponentParams

Defined in: entities/src/triggers.ts:80

Whether a value is the parsed body of an event-shaped trigger component.

Parameters ​

value ​

unknown

Returns ​

value is TriggerComponentParams


javaAttributeBases() ​

javaAttributeBases(identifier, source): ReadonlyMap<"absorption" | "attack_damage" | "flying_speed" | "follow_range" | "health" | "jump_strength" | "knockback_resistance" | "lava_movement" | "luck" | "movement" | "underwater_movement", number>

Defined in: entities/src/javaStats.ts:303

The attribute base values Java Edition decides for one entity type.

A component that declares one of these attributes gets Java's number instead of the one the Bedrock pack wrote, with the reviewed exceptions left alone. Attributes Java does not publish for the type are absent, so the pack's value stands.

The identifier is the one the entity spawns under, which for five types is Bedrock's legacy spelling rather than Java's, so the row is found through javaEntityStats rather than by a direct read.

Parameters ​

identifier ​

string

The Bedrock entity identifier, such as minecraft:wither.

source ​

Readonly<Record<string, JavaEntityStats>> | undefined

Java's stat table, or undefined to run on the pack's values alone.

Returns ​

ReadonlyMap<"absorption" | "attack_damage" | "flying_speed" | "follow_range" | "health" | "jump_strength" | "knockback_resistance" | "lava_movement" | "luck" | "movement" | "underwater_movement", number>

Attribute name to the base value, empty when nothing is overridden.


javaEntityNavigation() ​

javaEntityNavigation(identifier, source): JavaEntityNavigation | undefined

Defined in: entities/src/javaNavigation.ts:46

Java's navigation for the entity a Bedrock identifier spawns, when the dump has that type.

Parameters ​

identifier ​

string

source ​

Readonly<Record<string, JavaEntityNavigation>> | undefined

Returns ​

JavaEntityNavigation | undefined


javaEntityStats() ​

javaEntityStats(identifier, source): JavaEntityStats | undefined

Defined in: entities/src/javaStats.ts:278

Java's stats for the entity a Bedrock identifier spawns, by that identifier.

Most of the dump is keyed by a name both editions spell the same way, so the direct read answers first and the rename index is only consulted for the rest.

Parameters ​

identifier ​

string

source ​

Readonly<Record<string, JavaEntityStats>> | undefined

Returns ​

JavaEntityStats | undefined


movementComponent() ​

movementComponent(kind, defaultMaxTurn?): ComponentFactory<EntityHooks, MovementModeParams>

Defined in: entities/src/components/movement.ts:81

Builds one minecraft:movement.<kind> component.

Parameters ​

kind ​

string

defaultMaxTurn? ​

number = 30

Returns ​

ComponentFactory<EntityHooks, MovementModeParams>


navigationComponent(kind): ComponentFactory<EntityHooks, NavigationParams>

Defined in: entities/src/components/movement.ts:38

Builds one minecraft:navigation.<kind> component.

Parameters ​

kind ​

string

Returns ​

ComponentFactory<EntityHooks, NavigationParams>


noEffects() ​

noEffects(event): EventEffects

Defined in: entities/src/eventEngine.ts:99

An EventEffects with nothing in it, which is what an absent event determines.

Parameters ​

event ​

string

Returns ​

EventEffects


numberAt() ​

numberAt(body, key, fallback): number

Defined in: entities/src/components/schemas.ts:31

Reads a number from a component body, falling back when the key is absent.

Parameters ​

body ​

ComponentRecord

key ​

string

fallback ​

number

Returns ​

number


numberComponent() ​

numberComponent(name, key, fallback): ComponentFactory<EntityHooks, number>

Defined in: entities/src/components/schemas.ts:74

A component whose whole meaning is one number under a key, such as minecraft:scale or minecraft:variant.

Parameters ​

name ​

string

key ​

string

fallback ​

number

Returns ​

ComponentFactory<EntityHooks, number>


parseEntityAction() ​

parseEntityAction(key, body, report): EntityAction | undefined

Defined in: entities/src/events.ts:225

Parses one event action body into the form the entity carries out.

An action the package implements whose body is unusable, such as a play_sound with no sound, is reported and left unparsed, so it reaches the same report as an action the package does not implement at all.

Parameters ​

key ​

string

body ​

unknown

report ​

EventReport

Returns ​

EntityAction | undefined

The parsed action, or undefined when the key is not one of the nine EntityAction covers or its body cannot be read.


parseEntityDefinition() ​

parseEntityDefinition(data, source): ParseEntityResult

Defined in: entities/src/definition.ts:118

Parses one entity file into an EntityDefinition.

Validation is structural. A key the parser does not know loads the file anyway and reports entity.unknownKey, because Mojang's schema types only the top level and a pack written against a newer game must still load.

Parameters ​

data ​

unknown

The already-parsed JSON of one entity file.

source ​

DefinitionSource

The pack and path diagnostics name.

Returns ​

ParseEntityResult


parseEventNode() ​

parseEventNode(value, report): EventNode

Defined in: entities/src/events.ts:146

Parses one event node, including every nested node.

Nothing throws: an unusable branch reports and is left out, because an entity whose one broken event is dropped still runs.

Parameters ​

value ​

unknown

report ​

EventReport

Returns ​

EventNode


parseEventTarget() ​

parseEventTarget(value, report): "self" | "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

Defined in: entities/src/events.ts:357

Reads a target key, which every shape that names one spells the same way.

Parameters ​

value ​

unknown

report ​

EventReport

Returns ​

"self" | "other" | "player" | "target" | "parent" | "baby" | "block" | "holder"

The named target, or self when the key is absent or unknown.


parseFilterValue() ​

parseFilterValue(value, label): ParseResult<Filter>

Defined in: entities/src/components/schemas.ts:50

Parses a filter, turning a grammar error into a schema rejection so the component reports through the same report as everything else.

Parameters ​

value ​

unknown

label ​

string

Returns ​

ParseResult<Filter>


parseProperties() ​

parseProperties(value, identifier, pack, collector): ReadonlyMap<string, PropertyDefinition>

Defined in: entities/src/properties.ts:257

Parses a whole description.properties map, reporting the documented limit of 32 properties per entity type rather than refusing the extras.

Parameters ​

value ​

unknown

identifier ​

string

pack ​

string

collector ​

DiagnosticCollector

Returns ​

ReadonlyMap<string, PropertyDefinition>


parsePropertyDefinition() ​

parsePropertyDefinition(name, value, report): PropertyDefinition | undefined

Defined in: entities/src/properties.ts:57

Parses one description.properties entry.

A malformed entry reports and yields undefined rather than throwing, so one bad property does not cost the whole entity.

Parameters ​

name ​

string

value ​

unknown

report ​

(code, message) => void

Where to send findings; each names the property.

Returns ​

PropertyDefinition | undefined

The parsed property, or undefined when the entry is unusable.


registerEntityComponents() ​

registerEntityComponents(registry): EntityComponentRegistry

Defined in: entities/src/components/index.ts:231

Fills a registry with every component this package implements.

Parameters ​

registry ​

EntityComponentRegistry

A fresh registry, or one a server has already put its own components in; registering a name twice is an error, so a caller that overrides a vanilla component registers it before calling this.

Returns ​

EntityComponentRegistry


resolveEntityTypes() ​

resolveEntityTypes(inputs, options): ResolveEntityResult

Defined in: entities/src/entityType.ts:102

Resolves parsed entity definitions into entity types.

A component name no factory implements resolves the type anyway and is reported once per pack, so "component not implemented" is a line in the load report rather than a missing entity.

Parameters ​

inputs ​

Iterable<EntityDefinitionInput>

options ​

ResolveEntityOptions

Returns ​

ResolveEntityResult

Throws ​

In strict mode, when any diagnostic is reported; the error comes from resolveTypes and carries the whole report.


spawnEventFor() ​

spawnEventFor(cause, named?): string

Defined in: entities/src/eventEngine.ts:56

Picks the one event that runs when an entity is created.

Exactly one runs. A caller that names an event, which is what /summon, a spawn rule's initial_event, minecraft:spawn_entity.spawn_event and the type<event> form in transformation.into all do, replaces the built-in one rather than adding to it.

Parameters ​

cause ​

SpawnCause

named? ​

string

The event the caller asked for, if any.

Returns ​

string


splitSpawnReference() ​

splitSpawnReference(reference): object

Defined in: entities/src/eventEngine.ts:63

Splits the identifier<event> form vanilla writes in transformation.into and permute_type.entity_type, such as minecraft:drowned<minecraft:as_adult>.

Parameters ​

reference ​

string

Returns ​

object

event? ​

readonly optional event?: string

identifier ​

readonly identifier: string


statRuling() ​

statRuling(identifier, stat): StatRuling

Defined in: entities/src/javaStats.ts:200

How one entity's value for one shared stat resolves.

A caller that has measured a disagreement between the two editions turns it into a reviewed row with this, rather than keeping a second copy of the decision. A bedrock or exception ruling is an accepted divergence with its reason; a java ruling means the resolved value should already be Java's, so a disagreement that still reports one is a defect.

Parameters ​

identifier ​

string

The Bedrock entity identifier, such as minecraft:wither.

stat ​

SharedStat

Returns ​

StatRuling


stringAt() ​

stringAt(body, key): string | undefined

Defined in: entities/src/components/schemas.ts:39

Reads a string from a component body, or undefined when the key is absent.

Parameters ​

body ​

ComponentRecord

key ​

string

Returns ​

string | undefined


triggerComponent() ​

triggerComponent(name): ComponentFactory<EntityHooks, TriggerComponentParams>

Defined in: entities/src/components/sensors.ts:643

Builds one of the ten event-shaped minecraft:on_* components.

The component carries no hooks because it runs at a fixed point rather than on a schedule of its own. EntityInstance.trigger reads the parsed body back and fires it, which is what makes the component do something: minecraft:damage_sensor and EntityInstance.damage reach the hurt and death ones, and EntityInstance.setAttackTarget reaches the two target ones.

Parameters ​

name ​

string

Returns ​

ComponentFactory<EntityHooks, TriggerComponentParams>