Fast Player Minecarts
当玩家乘坐矿车时,矿车的移动速度会变快。除此之外,矿车的其他属性均不会发生改变。
原版将每种矿车的速度上限都限制为每秒 8 个方块,这使得铁轨成为了一种低效的交通工具。本模组提高了你当前所乘坐矿车的速度上限,而保持其他所有矿车的速度不变,从而确保你的自动化农场和物品运输系统仍按照你预设的节奏运行。
受影响的内容
| 矿车类型 |
行为表现 |
| 载有玩家的矿车 |
速度更快,默认情况下为原版的 3 倍,即约每秒 24 个方块 |
| 空矿车 |
原版行为 |
| 载有生物的矿车 |
原版行为 |
| 箱子、漏斗、熔炉、TNT、刷怪笼和命令方块矿车 |
原版行为 |
漏斗矿车和箱子矿车永远不会被修改。该模组仅识别载有玩家作为乘客的空矿车,而其他类型的矿车属于不同的类,无法通过该项检测。
工作原理
为了避免提高速度上限导致矿车跳过轨道方块或飞出弯道,该模组会在每个游戏刻(tick)内多次计算矿车的位移。每一次计算步骤都是正常的原版逻辑,因此轨道、弯道、斜坡、探测轨道、激活轨道、摩擦力以及动力铁轨的加速效果都与原版完全一致。你现有的轨道布局和加速器间距依然有效。矿车只是以更快的速度覆盖相同的距离。
这也意味着,被加速的矿车在经过探测轨道时仍会触发信号,激活轨道也依然能将你弹出。
指令
仅限拥有操作者权限(gamemaster 级别)的玩家使用。更改立即生效,无需重启服务器或重新登录。
/fastcarts multiplier 显示当前的倍数及由此得出的最高速度。
/fastcarts multiplier <1-8> 设置倍数。设为 1 表示原版速度,即禁用加速效果。
该值会保存至 config/fastcarts/settings.json 文件中,重启后依然保留。你也可以在服务器停止运行时手动编辑该文件。
安装说明
仅服务端需要安装。将 jar 文件放入服务器的 mods 文件夹中,并附带 Fabric API。即使玩家使用纯原版客户端加入服务器,也能体验到更快的矿车,因为他们端无需任何额外内容。此模组同样适用于单人游戏和局域网世界。
注意事项
- 在较高的倍数下,由于位置更新仍以正常速率发送,而矿车在两次更新之间覆盖了更长的距离,因此对于骑手来说,矿车的运动轨迹看起来会有些许“卡顿”感。通常 3 到 4 倍的体验最佳。
- 矿车本身不会加载区块,而是由骑手加载。如果轨道穿过未生成的地形区域,在世界生成速度跟不上每秒 24 个方块的移动速度时,可能会出现延迟。
- 撞击停放的箱子或漏斗矿车时,其受到的冲击力可能比原版更大,但仅限于单个游戏刻内。它仍然无法超过原版矿车的最高速度。
- 同时支持启用了实验性“Minecart Improvements”数据包的存档。
源代码
源代码以及一个用于测量实际矿车速度的自动化测试套件位于 github.com/DeeKahy/fastcarts。本项目采用 CC0 协议发布,你可以随意使用它。
Fast Player Minecarts
Minecarts go faster while a player is riding them. Nothing else about minecarts changes.
Vanilla caps every minecart at 8 blocks per second, which makes rails a poor way to get anywhere. This mod raises that limit for the cart you are actually sitting in, and leaves every other cart alone so your farms and item transport keep the timing you built them around.
What is affected
| Cart |
Behaviour |
| Minecart with a player inside |
Faster, 3x by default, so about 24 blocks per second |
| Empty minecart |
Vanilla |
| Minecart with a mob inside |
Vanilla |
| Chest, hopper, furnace, TNT, spawner and command block minecarts |
Vanilla |
Hopper and chest carts are never touched. The mod only picks up a plain minecart that has a player as its passenger, and the other cart types are separate classes that can never match that check.
How it works
Instead of raising the speed limit, which makes carts skip rail blocks and fly off corners, the mod runs the cart's movement several times per game tick. Every one of those steps is a normal vanilla step, so rails, curves, slopes, detector rails, activator rails, friction and powered rail boosts all behave exactly as they always did. Your existing tracks and booster spacing keep working. The cart just covers the same ground faster.
That also means a boosted cart still trips detector rails it passes over, and an activator rail still ejects you.
Commands
Operators only, at gamemaster level. Changes apply immediately with no restart and no relog.
/fastcarts multiplier shows the current multiplier and the resulting top speed.
/fastcarts multiplier <1-8> sets it. 1 means vanilla, so the boost is off.
The value is saved to config/fastcarts/settings.json and survives restarts. You can also edit that file by hand while the server is stopped.
Installation
Server side only. Put the jar in your server's mods folder along with Fabric API. Players joining with a plain vanilla client get the faster carts too, since nothing is needed on their end. It also works in single player and on LAN worlds.
Things worth knowing
- At higher multipliers the cart looks a little steppier to the rider, because position updates arrive at the normal rate while the cart covers more ground between them. 3 or 4 feels best.
- Minecarts do not load chunks, the rider does. On a long track through fresh terrain, world generation may not keep up at 24 blocks per second.
- Ramming a parked chest or hopper cart can shove it a bit harder than vanilla would in a single tick. It still cannot travel faster than a vanilla cart.
- Worlds with the experimental Minecart Improvements datapack enabled are supported as well.
Source
Source code and an automated test suite that measures real cart speeds are at github.com/DeeKahy/fastcarts. Released under CC0, so do what you like with it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧