ddevault / Craft.Net

(Unmaintained, see TrueCraft) Minecraft server, client, and etc for .NET
MIT License
228 stars 64 forks source link

Downgrading to older protocols #150

Closed AlexanderArvidsson closed 11 years ago

AlexanderArvidsson commented 11 years ago

Is there an easy way of downgrading to older protocols and minecraft versions? I want to use this for a 1.4.7 server (Craft.Net.Client, Craft.Net & Craft.Net.Data). To be exact, I want to use your SMProxy for a 1.4.7 server.

ddevault commented 11 years ago

If you want 1.4.7, just go here and grab the binary. If you want other versions, examine the commit log until you find the right version, and do git checkout <commit hash> for that one, then rebuild SMProxy against that. You might not be able to get every version, but you could get something close and fiddle with it yourself if the exact version you want isn't there.

SMProxy only goes back to 1.4.7, but you can probably get it working on older versions with some effort. Craft.Net goes back to 12w26a, but SMProxy won't be directly compatible with it that far back. You can also hack something up with the older versions of SMProxy and LibMinecraft if you can find them.

AlexanderArvidsson commented 11 years ago

Oh wow, I didn't go to your website when I saw the link because I thought it would redirect to this github page. Turns out it didn't! Thanks!

AlexanderArvidsson commented 11 years ago

Is it just me or doesn't forge work with this? I've downloaded the 1.4.7 binary and tried to connect, but it just crashes when I try to connect. I'm using the Direwol20 pack in Feed the Beast Here's the error in the client and the server

Client: http://pastebin.com/1F1L6Ezt Server: http://pastebin.com/49JUYSLC

Edit: As in client I mean the actual minecraft client, not the proxy :P

ddevault commented 11 years ago

The 1.4.7 build is buggy on Linux - if you want to use 1.4.7 on Linux/Mac, build the latest from source against the 1.4.7 Craft.Net. Maybe that's your problem?

If your mods add any packets or change the protocol, SMProxy will fail on it. 3rd party protocol changes are not supported by SMProxy.

AlexanderArvidsson commented 11 years ago

I am using Windows, and I am building Craft.Net, SMProxy and fNBT from source. But I think the problem is that some of the mods might add packets (Wireless redstone maybe?). I'll look into it further. Thanks for your help.

Edit: Looks like forge has their own PacketHandler for the mods to use, so it's most likely that some mods in my pack uses it to add packets. Is there any way you can make it support custom packets?

ddevault commented 11 years ago

The only way you can add extra packets without breaking SMProxy is to wrap them in plugin messages.

AlexanderArvidsson commented 11 years ago

Do you have any examples about that?

ddevault commented 11 years ago

Well, that's dependent on the mods. It's just a packet built into the vanilla protocol that allows for 3rd party data to be exchanged without breaking the connection.

You could also write an SMProxy plugin to handle the 3rd party packets, but that'd require you to know their structure and such. Easy if the plugins are open source, not easy otherwise.

AlexanderArvidsson commented 11 years ago

I see. I don't think any of the mods are open source, and there's too many anyways. That sucks, I really wanted to use this :/