CC 区块加载器
一款适用于 ComputerCraft 海龟的动态区块加载模组,超越了传统的始终开启/关闭式区块加载器。
为什么选择此模组?
我对 ComputerCraft 设置中现有的区块加载选项并不满意。标准的区块加载器要么始终处于活动状态,要么完全关闭——对于动态、智能的区块管理来说,缺乏中间地带。
CC Chunk Loader 通过赋予海龟根据实际执行的任务动态调整区块加载范围的能力来解决这一问题,并支持对分布式自动化系统进行远程管理。
核心功能
? 动态区块加载
- 海龟可以通过代码调整其区块加载半径(默认为 0 到 2.5 个区块)
- 非常适合需要在不同时间覆盖不同区域范围的任务
- 燃料耗尽时自动关机,防止留下无人看管的区块加载器
? 基于燃料的平衡机制
- 由海龟燃料驱动,加载距离越远,成本呈指数级增长
- 支持随机刻(random ticking),适用于农场(燃料消耗翻倍)
- 采用分数燃料债务系统以实现精确的成本计算
- 所有成本均可完全配置
? 远程管理
- 即使在海龟所在的区块未加载的情况下,也能通过 ID 唤醒休眠的海龟
- 通过管理器方块远程控制任何海龟的区块加载
- 非常适合在不保持所有内容加载的情况下管理分布式自动化系统
⚙️ 智能持久化
- 跨服务器重启/世界重载的完整状态保存
- 关键海龟的世界加载唤醒选项
API 参考
区块加载器外围设备 (Peripheral)
local chunkloader = peripheral.find("chunkloader")
-- 核心区块加载控制
chunkloader.setRadius(radius) -- 设置加载半径(0-2.5,0 = 禁用)
chunkloader.getRadius() -- 获取当前半径
chunkloader.getFuelRate() -- 获取每刻的燃料消耗量
-- 唤醒控制
chunkloader.setWakeOnWorldLoad(boolean) -- 在服务器重启时自动恢复
chunkloader.getWakeOnWorldLoad() -- 检查唤醒设置
-- 随机刻控制(用于农场)
chunkloader.setRandomTick(boolean) -- 启用随机刻(燃料消耗翻倍)
chunkloader.getRandomTick() -- 检查随机刻状态
-- 海龟标识
chunkloader.getTurtleIdString() -- 获取用于远程管理的唯一海龟 ID
区块加载器管理器方块
local manager = peripheral.find("chunkloader_manager")
-- 远程海龟管理
manager.getTurtleInfo(turtleId) -- 获取海龟状态/统计信息
manager.setTurtleRadius(turtleId, radius) -- 唤醒并控制休眠的海龟
manager.setTurtleWakeOnWorldLoad(turtleId, boolean) -- 远程控制唤醒设置
manager.getTurtleWakeOnWorldLoad(turtleId) -- 检查唤醒设置
manager.listTurtles() -- 列出所有活跃海龟
使用场景
? 智能农业系统
- 海龟仅在照料作物时启用区块加载和随机刻
- 仅在监控时将范围缩小至最小半径
- 通过远程激活来启动农场
? 监控网络
- 按需唤醒休眠的传感器海龟
- 在没有持续区块加载的情况下跨大区域收集数据
- 通过 chunkmanager 方块进行集中管理
亮点
- 基于 UUID 的持久化 - 海龟身份在世界重启和位置更改后得以保留
- 指数级燃料扩展 - 面积越大,维持加载所需的燃料成本呈指数级增长,以防止滥用
- 自定义方块模型 - 精致的视觉设计
- 全面的工具 - 用于故障排除的调试命令
配置
所有燃料成本和限制均可通过游戏内命令进行配置:
/ccchunkloader get <key> # 查看当前设置
/ccchunkloader set <key> <value> # 修改设置
/ccchunkloader list # 显示所有配置值
默认设置:
- 最大半径:2.5 个区块(总共覆盖约 21 个区块)
- 基础燃料消耗:每刻每区块 0.033
- 随机刻最大半径:1.4 个区块
- 距离乘数:2.0(指数级扩展)
高级功能
调试命令
/ccchunkloader debug uuids # 列出所有跟踪的 UUID
/ccchunkloader debug stats # 显示系统统计信息
/ccchunkloader debug orphans # 查找孤立的 UUID
远程引导
- 管理器方块可以唤醒未加载区块中的海龟
- 持久化状态确保在休眠期间不会丢失数据
- 针对关键自动化系统的世界加载唤醒功能
适用场景: 动态自动化系统、大规模海龟网络、智能资源管理,以及任何希望获得智能区块加载而非静态始终开启解决方案的用户。
CC Chunk Loader
A dynamic chunk loading mod for ComputerCraft turtles that goes beyond traditional always-on/always-off chunk loaders.
Why This Mod?
I wasn't happy with existing chunk loading options for ComputerCraft setups. Standard chunk loaders are either always active or completely off - there's no middle ground for dynamic, intelligent chunk management.
CC Chunk Loader solves this by giving turtles the ability to dynamically scale their chunk loading based on what they're actually doing, with remote management capabilities for distributed automation systems.
Core Features
? Dynamic Chunk Loading
- Turtles can adjust their chunk loading radius through code (0 to 2.5 chunks by default)
- Perfect for tasks that need different area coverage at different times
- Automatic shutdown when fuel runs out prevents abandoned chunk loaders
? Fuel-Based Balancing
- Powered by turtle fuel with exponential cost scaling by distance loaded
- Random ticking support for farms (doubles fuel cost)
- Fractional fuel debt system for precise cost calculation
- All costs are fully configurable
? Remote Management
- Wake up dormant turtles by ID even in unloaded chunks
- Control any turtle's chunk loading remotely through the manager block
- Perfect for managing distributed automation without keeping everything loaded
⚙️ Smart Persistence
- Complete state preservation across server restarts/world reloads
- Wake-on-world-load option for critical turtles
API Reference
Chunkloader Peripheral
local chunkloader = peripheral.find("chunkloader")
-- Core chunk loading control
chunkloader.setRadius(radius) -- Set loading radius (0-2.5, 0 = disabled)
chunkloader.getRadius() -- Get current radius
chunkloader.getFuelRate() -- Get fuel consumption per tick
-- Wake control
chunkloader.setWakeOnWorldLoad(boolean) -- Auto-resume on server restart
chunkloader.getWakeOnWorldLoad() -- Check wake setting
-- Random tick control (for farms)
chunkloader.setRandomTick(boolean) -- Enable random ticking (doubles fuel cost)
chunkloader.getRandomTick() -- Check random tick status
-- Turtle identification
chunkloader.getTurtleIdString() -- Get unique turtle ID for remote management
Chunkloader Manager Block
local manager = peripheral.find("chunkloader_manager")
-- Remote turtle management
manager.getTurtleInfo(turtleId) -- Get turtle status/stats
manager.setTurtleRadius(turtleId, radius) -- Wake & control dormant turtles
manager.setTurtleWakeOnWorldLoad(turtleId, boolean) -- Control wake settings remotely
manager.getTurtleWakeOnWorldLoad(turtleId) -- Check wake settings
manager.listTurtles() -- List all active turtles
Use Cases
? Smart Farming Systems
- Turtles enable chunk loading and random ticking only when tending crops
- Scale down to minimal radius when just monitoring
- Remote activation to start the farm remotely
? Monitoring Networks
- Wake dormant sensor turtles on-demand
- Collect data across large areas without constant chunk loading
- Centralized management through chunkmanager block
Highlights
- UUID-based persistence - Turtle identities survive world restarts and position changes
- Exponential fuel scaling - Larger areas cost exponentially more fuel to prevent abuse
- Custom block models - Polished visual design
- Comprehensive admin tools - Debug commands for troubleshooting
Configuration
All fuel costs and limits are configurable via in-game commands:
/ccchunkloader get <key> # View current settings
/ccchunkloader set <key> <value> # Modify settings
/ccchunkloader list # Show all config values
Default Settings:
- Max radius: 2.5 chunks (covers ~21 chunks total)
- Base fuel cost: 0.033 per chunk per tick
- Random tick max radius: 1.4 chunks
- Distance multiplier: 2.0 (exponential scaling)
Advanced Features
Debug Commands
/ccchunkloader debug uuids # List all tracked UUIDs
/ccchunkloader debug stats # Show system statistics
/ccchunkloader debug orphans # Find orphaned UUIDs
Remote Bootstrap
- Manager blocks can wake turtles in unloaded chunks
- Persistent state ensures no data loss during dormancy
- Wake-on-world-load for critical automation systems
Perfect for: Dynamic automation systems, large-scale turtle networks, smart resource management, and anyone who wants intelligent chunk loading instead of static always-on solutions.
评论 0
登录后参与评分
还没有评论,来抢沙发吧