hsrails
High Speed Rails
(For game versions: 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21 and newer)
A spigot/bukkit plugin to make minecarts worth building.
Place a powered rail on a boost block (redstone block
by default) to build high-speed rail. Place on any other block to get a regular powered rail.
High-speed rails are by default 4x faster than regular powered rails, ie. 32 m/s, or 115 km/h. This is as fast as rocket powered elytra flight.
The high-speed rail multiplier can be temporarily changed with the /hsrails
command, or permanently changed in the config. The boost block is also configurable. See Usage section for commands and config options.
To help cope with the higher speeds, there is also a hard brake block available (obsidian
by default). If you place an unpowered power rail on a hard brake block, the cart will decelerate faster than default. See Usage section for configuration options.
Note: please read the Design sections on how to keep your carts from derailing at high speeds.
Note: there seems to be a game limitation for speed but not momentum, and it seems to be around multiplier of 4x. Multipliers higher than 4x usually result in increased momentum, but not higher top speeds. That means the carts will coast for longer, even though they appear to have the same top speed.
Usage
Commands
Use /hsrails <multiplier>
to tweak how fast high-speed rails are. Multiplier must be between 0 and 8.
Example: set multiplier to 4
/hsrails 4
Config
This is the default HsRails/config.yml
:
speedMultiplier: 4.0
boostBlock: "minecraft:redstone_block"
hardBrakeMultiplier: 8.0
hardBrakeBlock: "minecraft:obsidian"
Allowed values are:
- speedMultiplier:
> 0
<= 8
- boostBlock:
- Namespaced block. Look up the ID name in the id list and prefix it with
minecraft:
. For example, type in"minecraft:stone"
for stone block as boost block. - If you type in
"any"
, every powered rail will be a high speed powered rail.
- Namespaced block. Look up the ID name in the id list and prefix it with
- hardBrakeMultiplier:
>= 1
- hardBrakeBlock:
- Any namespaced block (see info on
boostBlock
for details).any
is not allowed here.
- Any namespaced block (see info on
Design considerations
You must be aware of a couple of things while building high-speed tracks:
- Acceleration is not instantaneous.
- Entering turns at high speed will derail you.
- Entering/exiting slopes at high speed will derail you.
- While traveling at high speeds, a regular powered rail will slow you down.
Derailing at high speeds is a limitation of the game itself, and is probably the reason why rails are so slow in vanilla Minecraft. Thus, when designing your high-speed tracks, you will have to design them like real high-speed train tracks: long stretches with smooth turns.
Design guidelines
These are my recommendations for building efficient high-speed tracks:
- Allow room for acceleration: it takes a while to reach top speed. Place several high-speed rail sections close together at the start of your track.
- Minimize number of turns: you only need at most one turn to get to any destination. An optimal track looks like an L from above.
- Minimize number of slopes: build tunnels, bridges, etc. to stay on the same level.
- Before turns and slopes, put one (or sometimes a couple of) regular powered rails to slow down and avoid derailment.
- After turns and slopes, allow room for acceleration again.
To maintain high speeds you must of course build your tracks out of high-speed rails, because regular powered rails will slow you down. Only mix in regular powered rails in turns and slopes as mentioned above.
If you want to stop a high speed cart quickly, for example if you have stations/stops on your route, you can use hard brake blocks with unpowered powered rails.
Credits
Adapted from varesa's Minecart Speedplus.
Thanks to LordNinka for discovering the effects of speed vs. momentum at high multipliers.
Thanks to TheWallaceman105 for bringing forth the idea of hard brake blocks and helping during development by testing.
Does it work with Neoforge?
In reply to tiny_galileo85:
Hi, did you get around to test it? I haven't tested it personally
Thanks for updating this, it's the only mod around now since hardly anyone cares about minecarts. :'(
Any chance you could add furnace and chest minecart support?
(if it's not already, since i think the furnace produces its own speed)
Idk how it would affect linked carts but the aesthetic of it would be cool.
In reply to itDkota:
Minecarts are the best :)
I have checked the code, and in theory it should support all kinds of carts. Since you mentioned linked carts, are you using a mod or something for that? If you try with just a single vanilla chest or furnace cart, does it work as expected?
In reply to ergor_gg:
If you push 2 carts together into each other they merge together and works great for straight railways. Powered furnace minecarts don't accelerate beyond ~4 m/s even on powered rails. Chest Minecarts do work as expected.
Effectively if you merge a furnace cart in front of you, you can only go ~4 m/s as it's the front of the chain. If you have a powered one behind you the furnace will be left behind going its maximum speed as you zoom off over hs rails.
Honestly one of the best Rail plugins for a Vanilla Plus experience!
Hey we're using this on our SMP and it's been great so far, and we're wondering if you know many high speed rails do we need in a row for full acceleration and the maximum distance between high speed rails to maintain full speed?
In reply to UNIXrubix:
Glad to hear!
I haven't tested it, but I did some maths to my best extent. Using constant acceleration formula and assuming 1 powered rail accelerates a cart from 0 to 8 m/s (vanilla max speed), then to reach 32 m/s (this plugin's top speed), you would need 16 powered rails in succession.
That is because powered rails boosts speed per server tick, and not per rail. Which is why you need more and more rails the faster you want to accelerate. (time spent over each rail get's shorter and shorter)
That also means, at top speed of 32 m/s, (4x vanilla max), the cart will spend 1/4 of the time over each powered rail compared to vanilla.
To maintain vanilla top speed you need 1 powered rail for every 32 meters or less. (https://minecraft.fandom.com/wiki/Tutorials/Minecarts#Optimal_use)
That means, in theory, you should put 1 powered rail for every 8 or less meters to maintain top speed with high speed rails (i.e. 7 or less normal + 1 high speed powered).EDIT: The above only applies if speed loss depends purely on distance traveled. But if acceleration is per game tick, then so should deceleration be as well. In that case, the cart still spends 1/4th of the time over each powered rail gaining speed, but it also spends only 1/4th of the time over unpowered rails loosing speed. It should cancel out, and the answer should be one powered rail every 32 meters.
Made build WITHOUT STUPID BLOCK LIMITATIONS
[Google Drive]
In reply to LYNRAY_X:
Well played :)
Check out version 1.2.0
Can you allow all blocks in config?
How can i set several blocks as boost block?
Hey could you send me the config to make stonebrick to be the boost block because I changed it and only the redstoneblocks boost it
In reply to Frost_132:
Hi, currently the only allowed options for this are lapiz or redstone block. If you try with anything else, like stonebrick, it will fall back to redstone block. This is intended to promote the survival element of the plugin. But if many disagrees with this limitation, I might add more blocks to the listVersion 1.2.0 allows you to set any one block as boost block, or "any" to set every powered rail as high speed rail.
In reply to ergor_gg:
could you please allow any block as server owners would be able to make builds still look stylish it would be very useful
In reply to Frost_132:
Hi,
Version 1.2.0 is released which allows any one block to be set as boost block, or you can use "any" to set every powered rail as high speed powered rail.
In reply to ergor_gg:
I would think a good middle ground would be a config option to allow servers to have any block as a choice. Possibly call the option LimitBlockSelection: true and have that be default, and a server owner can change it to false if they want?
In reply to SaishoGaming:
Hi,
Version 1.2.0 is released which allows any one block to be set as boost block, or you can use "any" to set every powered rail as high speed powered rail.
In reply to Frost_132:
I removed this stupid limitations, and you can set any block you want as boost block!
Check new comments in this thread
I love this plugin! If I may suggest something: A toggleable feature that harms entities/players that are standing on the railway.
In reply to Forge_User_54343163:
Glad to hear!
Also, I like the idea. Adding it to the to-do list!