Home - ShadowJonathan/ByteCart GitHub Wiki
Bytecart provides automatic intersections, smart pathfinding and multi-user capability to rail systems, giving the possibility to travel by cart in a secure and reliable manner accross a Minecraft world. Moreover, autonomous storage carts can travel in the network with no player interaction.
ByteCart enhances your cart system to a new level, allowing to build a service of automatic transportation of players and goods to hundreds or thousands of stations connected together. ByteCart aims to provide a reliable player-oriented transportation service.
While other plugins are centered on minecart as a vehicle, ByteCart has a global view of a railed network, where carts are managed. ByteCart applies the principles of Internet network : each part of a ByteCart system has a limited part of calculation to switch the carts to the right direction. It was made simple, cheap and scalable. Bytecart provides the ability to build a small rail system and extend it to a worldwide transportation network without transformation work, and at a very small cost of CPU and memory.
Bytecart can manage trips with no player interaction using tickets in inventory of storage carts. Moreover, ByteCart can manage trains to transport wagons full of anything.
ByteCart cart system is resilient to server crash, trip interruption or whatever trip incident (unfortunately, some trains may be broken after a server crash and loose wagons). There is no database ! All pathfinding data are embedded in game, and pathfinding algorithm is distributed among the nodes of the network. Trips do not depend on a path computed and stored in memory at start. Players are free to interrupt their trip forever or for a while, and continue later.
ByteCart provides collision-avoidance embedded features. The collision management layer is in charge of collision prevention in every sensitive location. Trips may be longer, but delivery is guaranteed.
ByteCart is really helpful if you plan to offer to your players a real and reliable transportation system for them and their material, with easy extension up to 1 billion stations, and low resource consumption.
Bytecart provide some tools to automatically setup the configuration of the network, so that players don't have to learn network skills.
There is a little cost to pay before using ByteCart : building the network and the devices described in this wiki, at intersections and stations. Building a small network without anti-collision feature is very easy : a tutorial is available. Some IT skills in LAN design are welcome if you plan to build a huge network or make weird things.
- Routing layer that enables pathfinding and automatic intersection switching
- Anticollision layer that guarantees secure transportation of players and goods in a multi-user world
- Address layer to attach an address to each station
- Ticket distribution system
- Utility blocks to manage trains and other stuff
- Commands to configure and use the network
- Compatible with TrainCart, Vehicles (No resourcepacks needed!) and PermissionEx
ByteCart provides:
- signs to build devices of the network (access points, intersections and routers)
- useful signs to give tickets or control trains
- instructions to build a network with routing layer only (no anti-collision)
- additional instructions to provide anti-collisions features if desired
- Player-friendly signs and commands to configure and use the network
ByteCart does not provide:
- material to play with carts (except start/stop). Please use any minecartmania clone for this.
- material to build you network automatically (you must build everything on your own following instructions)
- commands to have control on the network (except setup and update administration commands)
- real train features (ByteCart trains are virtual, use TrainCarts to have real trains)
This step-by-step tutorial will guide you through the creation of your first ByteCart network.
Step 1 : A simple circular line
Step 2 : Connect rings together
Check the command page.
See a page giving full details about signs available in ByteCart: Signs
Here are a few definitions you should know before creating a network.
ByteCart allow other plugins to hook its code through an event API and change its behaviour or add functionnalities.
ByteCart use maven. To import ByteCart API as a dependency, put this in your pom.xml:
<repositories>
...
<repository>
<id>repobcapi-rel</id>
<name>bytecart.catageek.info API Releases</name>
<url>http://bytecart.catageek.info/mavenAPI/repositories/releases/</url>
</repository>
...
</repositories>
<properties>
...
<bytecartapi.version>put the version number here</bytecartapi.version>
...
</properties>
<dependencies>
...
<dependency>
<groupId>com.github.catageek</groupId>
<artifactId>ByteCartAPI</artifactId>
<version>${bytecartapi.version}</version>
</dependency>
...
</dependencies>
Don't forget to set the variable bytecartapi.version to the current API version.
ByteCart events are just like Bukkit events and use the same event system. To listen an event, just put your methods in a class implementing Listener and register your Listener in Bukkit like any other Bukkit Listener:
public final class BCEventListener implements Listener {
@EventHandler
public void onVehiclePreRoute(SignPreRouteEvent event) {
your code here...
}
To register the listener in your plugin:
getServer().getPluginManager().registerEvents(BCEventListener, this);
The documentation of the API is here.
Please note that all events are synchronous and are executed in the main thread. Plugins must not keep the thread too much time or server lag can occur.
This howto will guide you to build a 5-cart train station: Build a 5-cart train station