Skip to main content

Strategies

Every extension JAR provides a strategy class listed in its manifest. Strategies implement block or item behavior and receive a shared IgnisStrategyContext.

Class contract

Blocks extend AbstractIgnisBlockStrategy:

public class Strategy extends AbstractIgnisBlockStrategy {
public Strategy(IgnisStrategyContext context) {
super(context);
}
}

Items extend AbstractIgnisItemStrategy instead.

IgnisStrategyContext

The context exposes:

ServicePurpose
SchedulerAsync and sync tasks
NBT serviceRead/write NBT on items and entities
Protocol servicePacket-level hooks when available
Effect serviceParticles and sounds
ExtensionSupportInventories, drop collectors, world bridge

Strategy profiles

YAML behavior sections merge into the strategy profile at runtime. The core routes standard click actions before calling strategy overrides.

Override onPlacedClick (blocks) or onItemUse (items) only when you need logic beyond declared behavior tokens.

Registry

Manifest id values register in IgnisStrategyRegistry. Config id values map to in-game types via BlockManager and ItemManager.