If there has been an attack, then the code checks for a heartbeat from Minecraft. If so, it says something like "Minecraft responded 15 times per second" and moves on. If the heartbeat was abnormally slow, the code tries again, but gets stuck in an infinite loop. Usually, users turn off zombies that become such good detection. For a PvP defender, it's far more reliable to have the zombie delete something in the world such as an entire tree. For this server, I just put a carving (a giant block) in the center of the room so they can see where everybody is.
If we're not connected, and we reach the main loop, we check to see if we have a client connected. If so, we do nothing. Otherwise, we put the turtle in the center, and then we wait for a heartbeat. If we don't get a heartbeat after a certain time, we tell the console that we're DDoSing.
If a heartbeat is detected, it will be sent to the Minecraft server. That asks the game server for blocks at a given X and Y position, and then sends that packet to our only client. If the packet is successfully sent, we send the blocks back to Minecraft.
Upon receipt, Minecraft checks the packet and responds with an an array of integers with the blocks at the specified X and Y. These are padded with zeros if necessary, so that our code that parses the array of coordinates will not crash. We multiple the array by 4 to account for the fact that our coordinates are four integers, and then feed that to one of our dictionaries that map between Minecraft coordinates and turtle coordinates. For each set of coordinates, we make sure that the corresponding coordinate we got from Minecraft is inside the bounds of the map, and if not, add a block there. The only exception is with orthogonal input, where the block is added at (0,0).
Encrypted files are broken into parts. The parts are then encrypted again, then divided again, and so on until the file is complete again. Unzip your file to end up with a complete copy of the file without any errors. d2c66b5586