Cuberite Forum
MCServer is open source! - Printable Version

+- Cuberite Forum (
+-- Forum: Cuberite (
+--- Forum: News (
+--- Thread: MCServer is open source! (/thread-183.html)

Pages: 1 2 3 4 5 6 7

RE: MCServer is open source! - Lapayo - 12-25-2011

Hey, thanks for the patch Smile
I already applied it but can´t test it right nowConfused
(Something was missing in the last commit so I have to wait for that fileBig Grin)

But as soon as I tested it, I will commit it with refering to your post Wink

And already a big thanks from me for helping Smile

RE: MCServer is open source! - FakeTruth - 12-25-2011

Ye sorry about that xD you can revert to an older revision though, so you can test his changes

RE: MCServer is open source! - mtilden - 12-25-2011

Sorry for PMing you fake, just realized what you both were talking about was the missing cpp and h files for the chunk generator.

OK super fans, got yet another patch for you that comes AFTER my last patch: - patch file - mersenne twister header

This patch fixes the ServerID for 1.0.0 so you can turn Authenticate=1 for safety. You'll have to stick the mersenne.h file with the second paste in the source folder and include it in the project. The new "ServerID" is simply a 16 digit hex string that's passed to the client and the client and server both use to verify the incoming client. I've tested this on 2 different minecraft accounts and it works so feel free to try it for yourself before including.

EDIT: Here is a patch that fixes the held inventory not dropping:

RE: MCServer is open source! - FakeTruth - 12-25-2011

I uploaded the missing file now Smile

RE: MCServer is open source! - mtilden - 12-25-2011


Just an update, I've created the c9 PlayerListItem packet and added code in a few places to make the scoreboard functional as far as displaying players on enter/leave but there's a couple issues like a player crashing or losing connection won't get removed from the scoreboard to others (and can't seem to find a catch-all solution for every kind of disconnect) and i don't see anything existing function that calculates latency so I have it set to 0.

I've also commented on some bugs on the bug tracker namely this one:

RE: MCServer is open source! - Lapayo - 12-25-2011

Hey, thanks for your patches. I applied them (For some reason tortoise svn always removes the last line which is mentioned in the patch fileBig Grin) and commited them.

How ever the Mersenne Header says, that the copyright must be mentioned in the documentation. (I think faketruth has to do thisBig Grin)

Quote:2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

RE: MCServer is open source! - FakeTruth - 12-26-2011

Why are we using a Mersenne Twister anyways? I know it gives "better" random results, but do we really need it?

RE: MCServer is open source! - Lapayo - 12-26-2011

I don´t know. He used itBig Grin

@mtilden: Also applied your held item patch now and improved it with also dropping items in the crafting slotBig Grin

And btw. Faketruth: The threaded generator is very cool Smile

RE: MCServer is open source! - FakeTruth - 12-26-2011

Please see my comments on the bottom of this page:

IMO wID is not descriptive enough of what the variable represents, change it to a_WindowID or something

And I just realized it might not even be a WindowID but a window Type, so please fix this

RE: MCServer is open source! - mtilden - 12-26-2011

Yes it is a window type, I admit I rushed that part a bit with the naming of it.

It's become slightly frustrating, i must admit, to always be waiting for things to be added and have to manage patch files and not able to add new files like the cPacket_PlayerListItem I added.

To address the Mersenne, I couldn't get stable "random" numbers with rand(), using a seed of time() doesn't help any. I tried the Mersenne and instantly I had what seemed to be "random" results and helped be able to produce the serverID more dynamically.

@Lapayo: It's actually pastebin that's removing the last line because it just removes trailing whitespace