Cuberite Forum
Minecraft 1.4.4 - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Minecraft 1.4.4 (/thread-623.html)

Pages: 1 2


Minecraft 1.4.4 - Setimes - 11-15-2012

This diff allows you to compile MCServer from svn to work with MC protocol 49.
Code:
Index: Protocol/ProtocolRecognizer.cpp
===================================================================
--- Protocol/ProtocolRecognizer.cpp    (revision 1040)
+++ Protocol/ProtocolRecognizer.cpp    (working copy)
@@ -573,6 +573,11 @@
        m_Protocol = new cProtocol142(m_Client);
        return true;
    }
+    if (ch == PROTO_VERSION_1_4_4)
+    {
+        m_Protocol = new cProtocol142(m_Client);
+        return true;
+    }
    m_Protocol = new cProtocol125(m_Client);
    return true;
}
@@ -599,7 +604,6 @@
            );
            break;
        }
-        
        case PROTO_VERSION_1_4_2:
        {
            // The server list ping now has 1 more byte of "magic". Mojang just loves to complicate stuff.
@@ -612,7 +616,7 @@
                m_Buffer.ReadByte(val);
                ASSERT(val == 0x01);
            }
-            
+
            // http://wiki.vg/wiki/index.php?title=Server_List_Ping&oldid=3100
            AString NumPlayers;
            Printf(NumPlayers, "%d", cRoot::Get()->GetDefaultWorld()->GetNumPlayers());
@@ -634,6 +638,36 @@
            Reply.append(MaxPlayers);
            break;
        }
+        case PROTO_VERSION_1_4_4:
+        {
+            if (m_Buffer.CanReadBytes(1))
+            {
+                byte val;
+                m_Buffer.ReadByte(val);
+                ASSERT(val == 0x01);
+            }
+
+            // http://wiki.vg/wiki/index.php?title=Server_List_Ping&oldid=3100
+            AString NumPlayers;
+            Printf(NumPlayers, "%d", cRoot::Get()->GetDefaultWorld()->GetNumPlayers());
+            AString MaxPlayers;
+            Printf(MaxPlayers, "%d", cRoot::Get()->GetDefaultWorld()->GetMaxPlayers());
+
+            // Cannot use Printf() because of in-string NUL bytes.
+            Reply = cChatColor::Delimiter;
+            Reply.append("1");
+            Reply.push_back(0);
+            Reply.append("49");
+            Reply.push_back(0);
+            Reply.append("1.4.4");
+            Reply.push_back(0);
+            Reply.append(cRoot::Get()->GetDefaultWorld()->GetDescription());
+            Reply.push_back(0);
+            Reply.append(NumPlayers);
+            Reply.push_back(0);
+            Reply.append(MaxPlayers);
+            break;
+        }
    }  // switch (m_PrimaryServerVersion)
    m_Client->Kick(Reply);
}
Index: Protocol/ProtocolRecognizer.h
===================================================================
--- Protocol/ProtocolRecognizer.h    (revision 1040)
+++ Protocol/ProtocolRecognizer.h    (working copy)
@@ -18,8 +18,8 @@


// Adjust these if a new protocol is added or an old one is removed:
-#define MCS_CLIENT_VERSIONS "1.2.4, 1.2.5, 1.3.1, 1.3.2, 1.4.2"
-#define MCS_PROTOCOL_VERSIONS "29, 39, 47"
+#define MCS_CLIENT_VERSIONS "1.2.4, 1.2.5, 1.3.1, 1.3.2, 1.4.2, 1.4.4"
+#define MCS_PROTOCOL_VERSIONS "29, 39, 47, 49"



@@ -36,8 +36,9 @@
        PROTO_VERSION_1_2_5 = 29,
        PROTO_VERSION_1_3_2 = 39,
        PROTO_VERSION_1_4_2 = 47,
+        PROTO_VERSION_1_4_4 = 49,
        
-        PROTO_VERSION_LATEST = PROTO_VERSION_1_4_2,  // Keep this up to date, this serves as the default for PrimaryServerVersion
+        PROTO_VERSION_LATEST = PROTO_VERSION_1_4_4,  // Keep this up to date, this serves as the default for PrimaryServerVersion
    } ;

    cProtocolRecognizer(cClientHandle * a_Client);



RE: Minecraft 1.4.4 - xoft - 11-15-2012

I'm not sure that is the only thing - you also need to change the PROTO_VERSION_LATEST to 49. I'll do this fix, thanks for the patch.


RE: Minecraft 1.4.4 - xoft - 11-15-2012

Added as rev 1042.


RE: Minecraft 1.4.4 - Taugeshtu - 11-16-2012

On a related note: could I suggest sorting things out whenever minecraft 1.5.9.0.8.whatever came out tomorrow or not?
My idea is: we update every sub-system ("part of a gameplay") we already have to 1.4.4, and then we just need to watch changelogs and gradually build parts of gameplay we don't have.

I'm willing to participate. STR would be probably too (items.txt, crafting.txt, I remember him being good with crafting recipies).
I could handle BlocksID.cpp thing again (or which file was that, xoft?) and pretty much any other boring stuff.
I'd like some source maintainers to update wiki on .ini files (yes, xoft, I'm willing to know how to set up Floody and Lava sim)
And then I'll probably make one more attempt on filling wiki's API pages.

So, how's that idea to you?


RE: Minecraft 1.4.4 - NiLSPACE - 11-16-2012

i'd like to work on the crafting again Smile but not today Sad should be in bed by now :S


RE: Minecraft 1.4.4 - xoft - 11-16-2012

I'm not quite following you here. What exactly are you suggesting? I think we're already working in this mode - we upgrade protocol versions as needed and in the meantime we get other things straightened out. When anyone helps, with anything, it's added soon enough to the main codebase.


RE: Minecraft 1.4.4 - Taugeshtu - 11-16-2012

I'm talking about no more protocol updates and new crafts until we hit 1.4.4 in what we already have in terms of gameplay. Shouldn't be long enough for new version of minecraft to came out, but still...
I'm suggesting some kind of milestone. 1.4.4 looks good enough to be one.
We don't have all the recepies and items.txt is outdated, and I'm asking about what else should be done and could be done by non-programmers.


RE: Minecraft 1.4.4 - xoft - 11-16-2012

Current gameplay in MCServer is nigh-non-existent, so matching 1.4.4 is too much of a milestone. We don't even have a proper basic survival gameplay - hunger's missing, feeding's unknown (it seems implemented, but untested - without hunger); weapons and armor are not working; hell, even monsters don't cause damage as they should. I'm swamped in such "trivial" areas such as waking up physics simulators on chunk load (so that water will start flowing when the terrain is generated).

And we definitely can't just freeze the protocol and do no updates - if we're behind, we lose potential users and the rare potential programmers who come and test the server from time to time. I don't think I would have joined the project if it were two protocol versions behind the current vanilla release.

As for the non-programmers, there's only very little they could do. Filling up the block and item type IDs, recipes etc. is one thing. Preparing some structures which the generator will be later able to include is another (this project on b-paradise.eu server is underway, not too many contributors, though), although it is still too far in the future.
I was pretty impressed with your ability to produce working plugins even under the constantly changing API; we could really use this kind of help - the API is incomplete, sometimes doesn't work as intended, full of obsolete stuff and under-documented, a few suggestions or a cleanup there would be great. But that needs someone who actually writes plugins.


RE: Minecraft 1.4.4 - Taugeshtu - 11-16-2012

Okay, I got your point, let's carry on as usual then Smile
Still, I'd like to see at least short list of things that might help up catching up. Am I right there, xoft:
  1. Damage, based on what tool/material you're hitting Pawn with (I think it could be done via plugin, will try it);
  2. Update BlockID.h and BlockID.cpp;
  3. Update items.txt (whoever will do this, I beg you - follow minecraft wiki on items naming!);
  4. Update crafting.txt.

As for API: I already got "Lua hooks needed" thread, and if I discover anything that need changes or addition (in my opinion) I'll post there...


RE: Minecraft 1.4.4 - Setimes - 11-17-2012

(11-15-2012, 07:58 PM)xoft Wrote: I'm not sure that is the only thing - you also need to change the PROTO_VERSION_LATEST to 49. I'll do this fix, thanks for the patch.

Code:
+        PROTO_VERSION_LATEST = PROTO_VERSION_1_4_4,  // Keep this up to date, this serves as the default for PrimaryServerVersion
^ way ahead of you.
I've taken a bit of an interest in this project, so I might be helping out with fixing survival.