Script API - v1.21.100
    Preparing search index...

    Class AimAssistCategorySettingsBeta

    Settings used with AimAssistRegistry.addCategory for creation of the AimAssistCategory.

    import { world, system, AimAssistCategorySettings, AimAssistRegistry, Player } from "@minecraft/server";

    // Basic category creation and addition
    // This demonstrates how to add categories to AimAssistRegistry via world.getAimAssist()
    function createBasicAimAssistCategory() {
    console.log("=== Creating Basic Aim Assist Category ===");

    // Get the AimAssist registry from the world
    const aimAssistRegistry: AimAssistRegistry = world.getAimAssist();

    // Create a new category with custom settings
    const basicCategorySettings = new AimAssistCategorySettings("jayly:mining_priority");

    // Configure block priorities (higher values = higher priority)
    const blockPriorities: Record<string, number> = {
    "minecraft:diamond_ore": 10,
    "minecraft:gold_ore": 8,
    "minecraft:iron_ore": 6,
    "minecraft:coal_ore": 4,
    "minecraft:stone": 2,
    };

    // Set the block priorities for this category
    basicCategorySettings.setBlockPriorities(blockPriorities);

    // Add the category to the registry
    aimAssistRegistry.addCategory(basicCategorySettings);

    console.log(`Added category '${basicCategorySettings.identifier}' to AimAssist registry`);
    console.log("Block priorities set:", blockPriorities);
    }

    system.run(() => createBasicAimAssistCategory());
    Index

    Constructors

    • Parameters

      • identifier: string

      Returns AimAssistCategorySettings

      Constructor that takes a unique Id to associate with the created AimAssistCategory. Must have a namespace.

    Properties

    defaultBlockPriority: number

    Optional. Default targeting priority used for block types not provided to setBlockPriorities.

    This property can't be edited in read-only mode.

    This property can't be read in early-execution mode.

    defaultEntityPriority: number

    Optional. Default targeting priority used for entity types not provided to setEntityPriorities.

    This property can't be edited in read-only mode.

    This property can't be read in early-execution mode.

    identifier: string

    The unique Id used to register the category with. Must have a namespace.

    This property can't be read in early-execution mode.

    Methods

    • Returns Record<string, number>

      The record mapping block Ids to their priority settings. Larger numbers have greater priority.

      Gets the priority settings used for block targeting.

      This function can't be called in early-execution mode.

    • Returns Record<string, number>

      The record mapping entity Ids to their priority settings. Larger numbers have greater priority.

      Gets the priority settings used for entity targeting.

      This function can't be called in early-execution mode.

    • Parameters

      • blockPriorities: Record<string | number | symbol, number>

        A record mapping block Ids to their priority settings. Larger numbers have greater priority.

      Returns void

      Sets the priority settings used for block targeting.

      This function can't be called in read-only mode.

      This function can't be called in early-execution mode.

    • Parameters

      • entityPriorities: Record<string | number | symbol, number>

        A record mapping entity Ids to their priority settings. Larger numbers have greater priority.

      Returns void

      Sets the priority settings used for entity targeting.

      This function can't be called in read-only mode.

      This function can't be called in early-execution mode.