BlockTrackerApi
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.
介绍
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.
常见问题
BlockTrackerApi 支持哪些 Minecraft 版本?
BlockTrackerApi 支持 Minecraft Java 版 1.16.5–1.21.1,共 5 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
BlockTrackerApi 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
_nArUTo_ 的其他作品
查看全部 →Redirector [Modern]
重定向代码中 Enum#values() 的内存分配,提升游戏性能。
Dimensional Sync Fixes
修复玩家切换维度时药水/经验同步问题。
Sparse Structures Reforged
让所有结构分布得更分散(本质上就是让它们更稀有),使探索更具挑战性、减少重复感。
DespawnTweaker
更好的 Let Me Despawn 优化 | 不允许刷怪笼生成的生物消失
评论
登录后评论和评分