Beta
Private
constructorStatic
Readonly
DefaultThe category settings used to create the new category.
The created category handle.
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.
An array of all available category objects.
The category object if it exists, otherwise returns undefined.
The Id of the preset to retrieve. Must have a namespace.
The preset object if it exists, otherwise returns undefined.
An array of all available preset objects.
A container for APIs related to the world's aim-assist settings.