Random Chitchat 2012-2016
Not really. Wanna write one? Smile
It's quite easy, actually - compile, run (with 2 parameters - incoming port number and outgoing port number) and then connect to the incoming port with the client. ProtoProxy will connect to localhost:outgoing port, which should be a vanilla server, and it logs the entire communication to a logfile.

I regularly use ProtoProxy even with MCServer, so that I can see what our server sends to the client - did we do something wrong to the protocol etc. If the client crashes, I can point a finger at the most likely packets to have caused the crash, since the client disconnects right after that; usually it's the packet right before, sometimes a few packets before that, since it takes time for them to be delivered.
Thanks given by:
When I connect to the protoproxy port I get this in the server's console:
Quote:[19:53:22 INFO]: GameProfile{id='null', name='STR_Warrior'} (/127.0.0.1:52441) lost connection: Internal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(1) + length(1) exceeds writerIndex(1): UnpooledHeapByteBuf(ridx: 1, widx: 1, cap: 1)
Thanks given by:
Is it possible to build ProtoProxy and the other tools with cmake?
Thanks given by:
Not at the moment, but it is planned, as soon as we move the entire Windows build to cmake. Some tools will be windows-only, though - BiomeVisualiser, for example, since it uses raw WinAPI for the windowing stuff.

STR, does that happen immediately, or only after you do something out of the ordinary ("what mcserver doesn't do yet")? Also, is the server running a clean world? It might help if it did (make a copy of the server, one for playing, the other for protoproxying Smile
Also, look at the protoproxy log, it might have some useful insight. It is perfectly possible that something is not right inside protoproxy, just yesterday I found out the kick packet was sent in the wrong direction Smile
Thanks given by:
It happens when I try to connect to the server via protoproxy.
Thanks given by:
I am able to connect a client to a vanilla server through ProtoProxy alright. As your server, are you using Vanilla or MCS?
Thanks given by:
I'm using vanilla.
Thanks given by:
The following code works for me.

		cFastNBTWriter Writer("tag");
		Writer.BeginCompound("display");
			Writer.AddString("Name", "SuperDerpy!");
			Writer.BeginList("Lore", TAG_String);
				Writer.AddString("", "LoOoore!");
			Writer.EndList();
		Writer.EndCompound();
		Writer.Finish();
		AString Compressed;
		CompressStringGZIP(Writer.GetResult().data(), Writer.GetResult().size(), Compressed);
		WriteShort(Compressed.size());
		WriteBuf(Compressed.data(), Compressed.size());

I recommend to add a new class called cCustomNames that stores names and lore, which implements a function to write them all to NBT. I believe it should be basically similar to Enchantments.cpp. Add all the code into cProtocol172::WriteItem(), not forgetting to adapt some code there that only checks for enchanments, and it should be all good Smile

Do correct me if I have no idea what I'm talking aboutTongue
Thanks given by:
I'll mess with it some more.

No need to create a different class. cEnchantments has it because there can be multiple enchantments on one item (I think) so it would be more manageable, but because an item can only have one custom name I don't think it would be more usefull.

(01-15-2014, 04:55 AM)tigerw Wrote: The following code works for me.

It compiles fine or you actualy get the custom name/lore?
Thanks given by:
Does anyone have any experience with c#? I'm trying to write a program, as a test, to connect to MCServer, but I keep getting a connection refused error while MCServer is running.
Thanks given by:




Users browsing this thread: 19 Guest(s)