Skip to main content

Mechanics Overview

BTCMobs utilizes a high-performance Atomic Mechanic System. This architecture ensures that skills are executed with minimal overhead while providing deep customization through parameters.

Anatomy of a Mechanic

A mechanic is a single action executed by a caster on one or more targets. It follows this syntax:
mechanic{parameter=value;parameter=value} @targeter ~trigger

Components

Mechanic Name

The internal ID of the action (e.g., damage, particle, message).

Parameters

Values enclosed in {} that modify the behavior (e.g., amount=10).

Targeter

Specified with @, defines WHO or WHERE the action happens.

Trigger

Specified with ~, defines WHEN the skill executes.

Universal Attributes

Every mechanic supports these core attributes:
AttributeAliasDescriptionDefault
cooldowncdDelay in seconds before reuse0
delaydDelay in ticks before execution0
chancecexecution success probability (0.0 to 1.0)1.0
repeatrNumber of times to repeat the action0
repeatIntervalriTicks between repetitions0

Atomic Efficiency

Unlike traditional systems, BTCMobs mechanics are compiled into optimized bytecode sequences. This allows for:
  • Zero-allocation target resolution where possible.
  • Async-first processing for visual effects.
  • Folia-native execution, automatically handling regional threading.
Always prefer specific mechanics over generic ones for maximum performance. For example, use particleline instead of a loop of particle calls.