Skip to content
BlockTrackerApi

Quick rating

Community listing page, reviews may not be monitored by the author.

BlockTrackerApi

No reviews yet

This API provides a comprehensive block tracking system for Minecraft mods, enabling efficient monitoring, storage, and querying of specific block positions across dimensions with configurable world-generation and conditional rules.

Mod Loaders
Minecraft

About

Description

BlockTracker

BlockTracker is a powerful Minecraft lib that provides a comprehensive API for tracking and monitoring specific blocks across your world. Designed primarily for mod developers, it offers efficient block position storage, retrieval, and event handling with minimal performance impact.

Key Features

  • Multi-Dimensional Tracking - Monitor blocks across all dimensions and chunks
  • Smart Filtering - Configurable rules for world generation and conditional tracking
  • Thread-Safe Operations - Built-in protection for server thread safety
  • High Performance - Optimized data structures using FastUtil for minimal overhead
  • Persistent Storage - Automatically saves and loads tracked block data
  • Flexible Query System - Multiple methods to retrieve tracked blocks by chunk, radius, or dimension

For Mod Developers

Easy Integration

// Track blocks with custom conditions
// Recommended init place: ServerAboutToStartEvent
BlockTrackerApi.trackBlock(Blocks.BEACON, true, block -> {
    return customConditionCheck(block);
});

Multiple Query Options

// Get blocks in specific chunk
LongSet blocks = BlockTrackerApi.getTrackedBlocks(level, chunkPos, Blocks.BEACON);

// Get blocks in area around position
ObjectList<LongSet> areaBlocks = BlockTrackerApi.getTrackedBlocks(level, centerPos, 3, Blocks.BEACON);

Note: This mod is primarily intended for developers. End-users will need mods that implement BlockTracker API to see its benefits.