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

    Class in @minecraft/server

    Extends EntityComponent

    Who may ride an entity, and who does: a minecart’s one seat. Players get on by using it, mobs it runs into are pulled in, and an activator rail with power throws them out.

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

    static read-only

    static readonly componentId: "minecraft:rideable";

    read-only

    readonly typeId: "minecraft:rideable";

    read-only

    readonly entity: Entity;
    Types

    read-only

    readonly isValid: boolean;

    read-only

    readonly controllingSeat: number;

    The seat of whoever steers it.

    read-only

    readonly crouchingSkipInteract: boolean;

    A sneaking player doesn’t get on.

    read-only

    readonly interactText: string;

    read-only

    readonly passengerMaxWidth: number;

    0 for no limit; otherwise a rider must be narrower.

    read-only

    readonly pullInEntities: boolean;

    It takes on board the mobs it runs into.

    read-only

    readonly riderCanInteract: boolean;

    read-only

    readonly seatCount: number;
    addRider(rider: Entity): boolean;

    Seats a player or a mob. False if it’s full, or the rider is on something already.

    Parameters
    rider
    Entity
    Returns
    boolean
    Types
    ejectRider(rider: Entity): void;

    Lets a rider off beside it, where BDS lands riders.

    Parameters
    rider
    Entity
    Types
    ejectRiders(): void;

    Lets everyone off, the last rider first.

    getFamilyTypes(): string[];

    The families that may ride; empty for any.

    Returns
    string[]
    getRiders(): Entity[];
    Returns
    Entity[]
    Types
    getSeats(): Seat[];
    Returns
    Seat[]
    Types

    EntityComponentTypeMap.minecraft:rideable, EntityComponentTypeMap.rideable