Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts
    Entity components

    EntityRidingComponent

    Class in @minecraft/server

    Extends EntityComponent

    What an entity, a player as well, rides.

    import { EntityRidingComponent } from '@minecraft/server';
    import { world, type EntityRidingComponent } from '@minecraft/server';
    for (const player of world.getAllPlayers()) {
    const component: EntityRidingComponent | undefined = player.getComponent('minecraft:riding');
    if (component) {
    console.log(player.name, component.entityRidingOn.typeId);
    }
    }
    import { world } from '@minecraft/server';
    for (const player of world.getAllPlayers()) {
    const component = player.getComponent('minecraft:riding');
    if (component) {
    console.log(player.name, component.entityRidingOn.typeId);
    }
    }

    static read-only

    static readonly componentId: "minecraft:riding";

    read-only

    readonly typeId: "minecraft:riding";

    read-only

    readonly entity: Entity;
    Types

    read-only

    readonly isValid: boolean;

    False once it’s off.

    read-only

    readonly entityRidingOn: Entity;
    Types

    EntityComponentTypeMap.minecraft:riding, EntityComponentTypeMap.riding