spicyiop.blogg.se

Traincraft wiki
Traincraft wiki





traincraft wiki traincraft wiki

Now once this is done, once a train goes over the sensor, the train sends a message to the server, telling it that it wants to start a connection. activate() - Actives the status transmitter setServerUUID(uuid) - Sets the UUID for the train when it passes over

traincraft wiki

find( "info_transmitter_mtc ") - Finds a status transmitter attached to the computer local mtcStatus = 1 - The status we want to transmit to the train local mtcType = 2 - The MTC type we want to send to the train local uuid = "e898ea81-0ad7-4926-9a5a-feddf083bd9d " - The unique ID that is the server Now we have the UUID, so let's set up the status transmitter by: Now, do peripheral.find("wirelessMTCRadio").getSelfUUID() to get your very own, radio UUID.ĭon't worry if it's too long, it's printed into your game's log so you can copy-paste it and not have to type the whole thing in. If it returns true, that means everything went well. activate(), which activates it, generating a UUID. After that in the parentheses and quotation mark ( wirelessMTCRadio) is the name of what you want, then we end it off with a quotation mark and an end parentheses at the end. peripheral.find finds a peripheral by a name, for example, disk_drive. It is, peripheral.find("wirelessMTCRadio").activate(). Now when it is placed, it does not have a UUID, so we need to make one by running a command. But first, we need to get the UUID of the radio! Place a radio somewhere you want the central control center, then type in lua. Haha, right? Anyway, to do this, we need an MTC Status Transmitter, and a W-MTC wireless radio.įirst, we set up the status transmitter by placing a computer next to it, setting the MTC Type to 2 for W-MTC, the status to 1 to turn it on, and the server UUID to know who to talk to. I mean.not really that, but without the hurt part. The first part of Wireless MTC is making the train say to the server, "Hi! I am in the W-MTC area, so give me the speed limit data or somebody gets hurt." Here is a good parser: JSON API v2.0.1 for ComputerCraft Try to connect to the server There isn't any native support for it, however, with APIs it is possible. Don't worry, it shouldn't take long.Ī way to parse JSON in ComputerCraft: For transmitting from the train to the computer, it uses JSON. This isn't very advanced but you may want to learn more about ComputerCraft before indulging. You can get the latest 1.7.10 version here.Ī little bit more time, this is a little bit more complicated than normal MTC, however, most things are similar. Wireless Minecraft Train Control is more complicated than standard MTC, but it allows for wireless data communication, self-driving trains, and fewer cables. Tutorial: Wireless MTC, transmitting MTC data







Traincraft wiki