This article is a work in progress.
Informations might not be complete and will be improved overtime.
Sensor Checking is a process that is called every Minecraft tick, to check for MTR Sensors blocks, and activating/performing actions when necessary, it is a part of MTR Train Simulation.
Note: All concept explained in this page may not exist within the MTR Codebase, but purely used for explanation.
- The chunk where the train's head are located must be loaded.
- The train will scan through all block within the Scan Radius, and that block has to be a known train sensor
- The train must match the filter of the Train Sensor block (If there's any)
If any of the above requirement is not met, that block will be skipped over and no action will be performed.
Scan radius is a square radius where the train will check for blocks.
For example a 2x2 scan radius means that the train will scan 2 blocks to the left/right/forward/backward.
There is no fixed size for the Scan Radius, the higher the speed is the larger the radius is.
(TODO list out reference speed table)
Note that the train will always scan 3 blocks below the train no matter what, so it is safe to put your sensor a little bit deeper without worrying about the train not triggering in for example a slope.
Train Redstone Sensor
It will simply power the redstone sensor.
No block checking will be performed if the train does not have anyone riding it.
Otherwise, it will tell the train announcer block to announce the message to the players riding the train.
It will check for all directions relative to the cargo loader/unloader and see if there's a storage container (chest/shulker etc.) next to the cargo sensor.
If found, it will start transferring 1 single item. (Note that the Sensor Checking is performed every tick, if the train is able to detect the sensor for 20 ticks/1 second, it will transfer 20 items in 1 second).