Bob is the first Replay Editor for the ReplayMod, a Minecraft mod to create videos such as timelapses or cinematics.
As Bob features it's own specialized and custom scripting language, only the sky is the limit.
So far, Bob is only available as a Lite version, as the custom scripting language hasn't been implemented yet.
This Lite version works on all Minecraft versions supported by the ReplayMod and can:
Bob started out as an experiment. I wanted to see if it was possible to change a username in a Replay.
It turned out to be possible, but I wanted to do more.
Replays are just a dump of the entire communication between the server and the client.
The ReplayMod then emulated a Minecraft server to replay the communication, so we can see what happened.
As I previously said, Replays are just a dump of the client-server communication.
What Bob edits is those network packets directly.
Let's use a real example so you know how it works, so let's change the time on a 1.18.2 Replay.
To understand how to change the time, we have to understand how the time is sent to the client.
As it turns out, the server is sending a Time Packet. Here is its format:
+-----------------------------------------+ | Packet ID: 0x59 (89 decimal) | +-------------+------+--------------------+ | Name | Type | Description | +-------------+------+--------------------+ | World Age | Long | World age in ticks | +-------------+------+--------------------+ | Time of Day | Long | The time in ticks | +-------------+------+--------------------+The time of day is exactly what we want to edit, and we know how much bytes it takes (a long is stored on 8 bytes, and it's also defined in the Data Types section of wiki.vg)
packet "time_update" { long "world_age"; long "time_of_day"; }This Packet Structure Language file (neatly called PSL) is fed into a Lexer that will generate a list of Token while doing some error checking.