Please inform us in this thread once you got something showable. I'm pretty keen if you'll manage it :)
Ok, can do.
@User1
How is the packet file structured? Is each line a packet? Also I'm guessing your just saving the raw tcp packets right? So I should just be able to decode them pretty easily? Sorry if I sound like a noob, but I just want to ask every question I can so I don't end up wasting hours trying to figure something out on my own.
The .tmcpr file can be read using a DataInputStream in Java.
The following pattern repeats until EOF:
1) an Integer which represents the packet's timestamp (in milliseconds from Replay start)
2) an Integer which tells you how many bytes the packet consists of
3) a byte array which represents the packet
This is an example how a single packet is saved:
Link to raw code
private static void writePacket(DataOutputStream os, long time, Packet packet) throws IOException {
ByteBuf buf = PooledByteBufAllocator.DEFAULT.buffer();
NetUtils.writeVarInt(buf, REVERSE_PACKET_MAP.get(packet.getClass()));
packet.write(buf);
int length = buf.readableBytes();
os.writeInt((int) time);
os.writeInt(length);
buf.readBytes(os, length);
buf.release();
}
Code from
@User10 's Sponge Recording Plugin
Your biggest hurdle will be converting the byte array back to a Packet Object that you can work with. I suggest
MCProtocolLib by Steveice10, an open source Java library.