Minecarts Load Chunks Mod
一款 Fabric 模组,通过在矿车行进时自动加载区块,防止矿车在未加载区块边界处卡住。它适用于所有类型的矿车:普通矿车、箱子矿车、熔炉矿车和漏斗矿车,确保你的 Minecraft 世界中运输顺畅且不间断。
功能
- 自动区块加载: 在任何移动的矿车周围加载一个 3x3 的区块网格,以防止区块边界问题。
- 支持所有矿车类型: 兼容普通矿车、箱子矿车、熔炉矿车和漏斗矿车。
- 基于刻数的过期机制: 矿车离开后,区块会保持加载状态 30 秒(600 刻)。此设置可在配置文件中修改。
- 持久化区块数据: 加载的区块数据按世界单独保存,并在服务器重启时恢复,即使服务器重启也不会出现被困的矿车。
工作原理
- 模组在每个服务器刻扫描所有矿车(普通矿车、箱子矿车、熔炉矿车和漏斗矿车)。
- 当检测到具有非零速度的矿车时,它会记录时间刻并强制加载矿车位置周围 3x3 网格内的区块。
- 这些区块将保持加载状态 30 秒(600 刻)。
- 持久化存储: 区块数据保存到每个世界的存档目录中,并在世界重新加载时恢复,从而防止矿车被困。
配置
该模组使用 JSON 配置文件 (config/minecartsloadchunks.json) 来允许你自定义其行为。你可以根据需要修改设置。以下是每个配置选项的作用说明:
常规设置
区块加载持续时间
矿车类型设置
这些设置决定哪些矿车类型可以加载区块。设置为 true 以启用特定矿车类型的区块加载:
loadMinecarts – 标准矿车(默认值: true)
loadFurnaceMinecarts – 熔炉矿车(默认值: true)
loadChestMinecarts – 箱子矿车(默认值: true)
loadHopperMinecarts – 漏斗矿车(默认值: true)
loadTntMinecarts – TNT 矿车(默认值: false)
loadCommandBlockMinecarts – 命令方块矿车(默认值: false,为防止意外行为而禁用)
贡献
欢迎通过以下方式为本项目做出贡献:
- 报告问题
- 提交拉取请求 (Pull Requests)
- 请求新功能
许可证
本模组遵循 MIT 许可证 发布。
致谢
- 开发者:Dylan
- 特别感谢 Minecraft 和 Fabric 社区,让模组开发成为一件乐事。
- Github
Minecarts Load Chunks Mod
A Fabric mod that prevents minecarts from getting stuck at unloaded chunk borders by automatically loading chunks as the minecarts travel. It works with all minecart types: regular, chest, furnace, and hopper carts, ensuring smooth and uninterrupted transportation across your Minecraft world.
Features
- Automatic Chunk Loading: Loads a 3x3 grid of chunks around any moving minecart to prevent chunk border issues.
- Supports All Minecart Types: Works with regular minecarts, chest minecarts, furnace minecarts, and hopper minecarts.
- Tick-Based Expiry: Chunks remain loaded for 30 seconds (600 ticks) after the minecart leaves. This can be changed in the configuration file.
- Persistent Chunk Data: Loaded chunks are saved on a per-world basis and restored when the server restarts, preventing stranded minecarts even through server reboots.
How It Works
- The mod scans for all minecarts (regular, chest, furnace, and hopper carts) every server tick.
- When a minecart is detected with nonzero velocity, it records the tick and forces a 3x3 grid of chunks around the minecart’s position to be loaded.
- The chunks remain loaded for 30 seconds (600 ticks).
- Persistent storage: The chunk data is saved to each world’s save directory and restored when the world is reloaded, preventing stranded minecarts.
Configuration
The mod uses a JSON configuration file (config/minecartsloadchunks.json) to allow you to customize its behavior. You can modify the settings to suit your needs. Here’s what each configuration option does:
General Settings
-
loadChunks - Enables or disables the mod entirely. Set this to false to disable the mod without removing it. (Default: true)
-
spamConsole - Enables detailed logging in the console every second for debugging purposes. (Default: false)
Chunk Loading Durations
-
cartLoadDuration - Specifies how long (in seconds) each chunk remains loaded after a minecart passes through. (Default: 30)
-
movementDuration - Defines how long (in seconds) a chunk stays loaded after a minecart stops moving. (Default: 10)
Minecart Type Settings
These settings determine which minecart types can load chunks. Set to true to enable chunk loading for specific minecart types:
loadMinecarts – Standard minecarts (Default: true)
loadFurnaceMinecarts – Furnace minecarts (Default: true)
loadChestMinecarts – Chest minecarts (Default: true)
loadHopperMinecarts – Hopper minecarts (Default: true)
loadTntMinecarts – TNT minecarts (Default: false)
loadCommandBlockMinecarts – Command block minecarts (Default: false, disabled to prevent unintended behavior)
Contributing
Feel free to contribute to this project by:
- Reporting issues
- Submitting pull requests
- Requesting new features
License
This mod is available under the MIT License.
Credits
- Developed by Dylan
- Special thanks to the Minecraft and Fabric communities for making modding such a joy.
- Github
评论 0
登录后参与评分
还没有评论,来抢沙发吧