• check_circle Functions
  • check_circle Recipes
  • 8,519 views, 6 today
  • 784 downloads, 1 today
  • 33
  • 29
Required Resource Pack
Penguin_Spy's Avatar Penguin_Spy
Level 22 : Expert Strawberry
4

On A Rail 3.0!

It's finally here! After about a year of procrastinating the rewrite, I've completely overhauled my RailCraft 2.0 datapack to be significantly more lag-friendly (especially on servers), and added two very exciting features: Ticket routing and chunk loading!

But first, the Basics

In case you're unfamiliar with the mechanics of my RailCraft 2.0 datapack, here's a quick summary:
Furnace Minecarts have been completely overhauled, and now have an interfaced that is opened by right-clicking on them:
[​picture of furnace cart gui]
It might seem a bit daunting at first, but it's pretty simple. The 5 slots in the middle are fuel slots, and are for holding coal or charcoal which the furnace will burn to propel the minecart (technically, any item can be placed in these slots, but only coal/charcoal do anything). The Furnace Minecart cannot burn any other fuels.
The 3 slots on the right are ticket slots and can hold renamed pieces of paper. See the Tickets & Routing section below for how this is useful.
Hoppers can interact with the Furnace Minecart to automatically refill it, and function as expected: hoppers above or on the side of the rail the minecart is on can place items into it's inventory. A hopper below will not pull out any items that are in the fuel slots.

Making Trains

A train is created by placing or pushing minecarts against the back of a stationary Furnace Minecart or other minecarts that are part of a train.
The following types of minecarts can be part of a train:
  • Minecart (the kind you can ride)
  • Minecart with Chest
  • Minecart with Hopper
  • Minecart with TNT (somewhat safe, isn't programmed to explode :)
  • Minecart with Mana Pool (the one from Botania)
Minecarts can only couple while not moving, and Furnace Minecarts can't couple, so you don't have to worry about trains colliding & getting stuck together.

Stop & Go

Once you've constructed a train, you can place coal/charcoal into the Furnace Minecart's fuel slots, and it will begin chugging along (with smoke particles & everything!). To stop a Furnace Minecart automatically, use activator rails; a Furnace Minecart will stop when it travels over a powered activator rail, and will only continue when the activator rail is unpowered. The Furnace Minecart will not consume fuel while in this stationary state (although it'll smoke a bit to let you know it has fuel).
Activator rails (combined with detector rails, hoppers, and a bit of redstone) can be used to create automated stations for cargo trains or destination choosers for passenger trains. If you're familiar with the RailCraft forge mod, they act similar to Holding Rails.

Tickets & Routing

With minecart trains comes minecart rail networks, and the need to route your trains around the network. This is where Tickets come in; they're pieces of paper that have been renamed and allow you to detect for specific trains. The detecting is done with the new rail type, the Ticket Detector Rail:
[​image of the crafting recipe here]
It's crafted just like a vanilla Detector Rail, but with a piece of paper at the top. To get started, place one down & right-click it with any renamed piece of paper (don't worry, invalid items just get spat back out); you'll see the ticket name appear floating above the rail when you're near. Now this rail will output a redstone signal only when a train with a matching ticket passes over it. To remove the rail, just break the block (you may have to aim near the edge to avoid the hitbox used for putting items into it).
To give a train a ticket, place a matching renamed piece of paper in one of the 3 ticket slots of the Furnace Minecart.
[​picture/GIF of doing this]
Tickets can also be inserted into Furnace Minecarts automatically with a hopper above or to the side of it, although if the 3 ticket slots are full the tickets will spill over into the fuel section, so be careful when designing your redstone circuits! It's advisable to lock any input hoppers and only enable them when you know the slots are empty.
Tickets can also be removed with a hopper, and only tickets in ticket slots will be removed, neither fuel nor any other items in the fuel slots can be removed automatically.

Chunk Loading

Trains aren't too useful if they stop working the second they get ~160 blocks away from you, so that's why these trains can load their own chunks, allowing them to travel literally anywhere in your world unimpeded! Of course, this comes at a price, that being Ender Pearls. To load it's own chunks, a Furnace Minecart will consume any Ender Pearls in it's fuel inventory one at a time, each pearl lasting 50 real-life minutes (meaning a stack of 16 lasts 24 IRL hours).
A Furnace Minecart will consume "chunk fuel" and load itself anytime it's moving, even if it would be loaded otherwise. Additionally, when stopped on an Activator Rail a Furnace Minecart will load itself for 2 minutes, before timing out and becoming unloaded (and no longer consuming fuel), so be aware of this when designing automated stations that will operate with no players nearby.

Technical Details & Server Resource Pack

The Minecart with Furnace is actually secretly a Chest Minecart with a custom GUI built with invisible items, a custom unicode character for the texture, and a whole lot of /data modify commands to keep items where they should be.
The trains, coupling, and movement is handled with scoreboards to keep track of what carts are in which train, marker entities to realign stray minecarts, and more /data modify to apply Motion to the minecarts.
The Ticket Detector Rail is an Armor Stand, with yet more /data modify commands, this time to compare the ticket it it's hand with the tickets in the Furnace Minecart passing over it. If it should be activated, it sets its block to a detector rail, and if it shouldn't be on it sets itself to a normal rail & shows a custom model for the Ticket Detector shape.
If the resource pack is not loaded (for example: on a server if a player doesn't enable it), the datapack should be mostly usable, the GUI will simply not have a custom texture (the blocked slots will be black stained glass panes), and Ticket Detector rails will be harder to see.

This datapack is somewhat incompatible with Lithium, because there is a slight, very minor, tiny little bug that can duplicate furnace minecart inventories consistently. It has not yet been reported but I will report it soon, but be aware of this if you run a server.

If you're hosting this datapack on a server, please add the following lines to your server.properties:
server.properties
resource-pack=https://download.mc-packs.net/pack/ce3a9a3e129ea7ebceca30598bcb71c0ac92bf37.zip
resource-pack-sha1=ce3a9a3e129ea7ebceca30598bcb71c0ac92bf37

Credits

Mojang, for making such an awesome game.
RailCraft, for showing the possibilities that trains can have in Minecraft.
MCPacks, for free server resource pack hosting (very cool, don't need to use jank Dropbox links)
CompatibilityMinecraft 1.18
toMinecraft 1.19
Tags
Comments have been disabled on this content.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome