Beta
Private
constructorStatic
Readonly
DefaultThis property can't be read in early-execution mode.
The category settings used to create the new category.
The created category handle.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
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());
The preset settings used to create the new preset.
The created preset handle.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
An array of all available category objects.
This function can't be called in early-execution mode.
The category object if it exists, otherwise returns undefined.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
The Id of the preset to retrieve. Must have a namespace.
The preset object if it exists, otherwise returns undefined.
This function can't be called in read-only mode.
This function can't be called in early-execution mode.
An array of all available preset objects.
This function can't be called in early-execution mode.
A container for APIs related to the world's aim-assist settings.