34 Commits

Author SHA1 Message Date
Dylan K. Taylor
8e9f787d33 Implement runtimeID table randomization, closes #2841 2019-03-29 14:35:06 +00:00
Dylan K. Taylor
b8703d5dff Protocol changes for 1.9.0 2019-02-07 21:56:42 +00:00
Drew
d7f86f0240 Hack for client side regeneration (disable natural regeneration gamerule) (#2722) 2019-01-31 18:45:25 +00:00
Dylan K. Taylor
4b9a142a5d Import global functions and constants for enhanced performance
This is better for performance because these then don't need to be reevaluated every time they are called.

When encountering an unqualified function or constant reference, PHP will first try to locate a symbol in the current namespace by that name, and then fall back to the global namespace.
This short-circuits the check, which has substantial performance effects in some cases - in particular, ord(), chr() and strlen() show ~1500x faster calls when they are fully qualified.

However, this doesn't mean that PM is getting a massive amount faster. In real world terms, this translates to about 10-15% performance improvement.
But before anyone gets excited, you should know that the CodeOptimizer in the PreProcessor repo has been applying fully-qualified symbol optimizations to Jenkins builds for years, which is one of the reasons why Jenkins builds have better performance than home-built or source installations.
We're choosing to do this for the sake of future SafePHP integration and also to be able to get rid of the buggy CodeOptimizer, so that phar and source are more consistent.
2019-01-04 20:43:15 +00:00
Dylan K. Taylor
30f5a8fac6 Protocol changes for 1.8.0 release 2018-12-11 21:05:03 +00:00
Dylan K. Taylor
5e68858ebf Merge branch 'release/3.2' into release/3.3 2018-10-21 18:16:59 +01:00
Dylan K. Taylor
45c9caa38c Fixup some formatting issues 2018-10-21 18:15:25 +01:00
Dylan K. Taylor
839d5eab7b Protocol changes for 1.7
there's also some new cases in stats, but we don't care about those anyway.
2018-10-16 17:13:52 +01:00
Dylan K. Taylor
9ca38ba868 Protocol changes for 1.6.0.8 + resource packs "fix" 2018-08-21 17:36:55 +01:00
Dylan K. Taylor
986077e03c Protocol changes for 1.6.0.1 2018-08-21 17:14:53 +01:00
Dylan K. Taylor
05af87e1d4 Strip empty lines at the end of classes 2018-06-11 13:19:23 +01:00
Dylan K. Taylor
eb28622823 Protocol changes for 1.5.0.0
this feels so strange to type... can we ditch the versioning system already?
2018-05-02 12:03:29 +01:00
Dylan K. Taylor
d384df1f2e fixed some mistakes in the protocol 2018-05-02 12:03:29 +01:00
Dylan K. Taylor
db5890fddb Rename more unknown things in the protocol 2018-04-07 11:35:35 +01:00
Dylan K. Taylor
fc795b80ae Protocol changes for 1.2.10 2018-04-04 10:58:49 +01:00
Dylan K. Taylor
e0ed877494 Protocol changes for 1.2.10 release
Looks like they reverted near enough everything they did in the beta.
2018-02-08 11:19:04 +00:00
Dylan K. Taylor
95d42b9907 Network: Remove legacy Vector3 primitive encode/decode methods 2018-01-20 10:58:39 +00:00
Dylan K. Taylor
74b074753f Bulk addition of constant visibilities
thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
2017-11-21 14:44:10 +00:00
Dylan K. Taylor
5fc50aeda5 Found an unknown field in StartGamePacket 2017-08-16 10:10:42 +01:00
Dylan K. Taylor
9be1b929a5 Added PhpDoc for packet field types and changed float x,y,z to Vector3 2017-08-13 20:02:07 +01:00
Dylan K. Taylor
9bae4d8ef6 updates for 1.2.0.11 2017-08-10 11:15:23 +01:00
Dylan K. Taylor
7886918140 Cleaned up some bad code in DataPacket, added encode/decodeHeader and made encode/decodePayload protected 2017-08-06 17:21:51 +01:00
Dylan K. Taylor
77cd8e7799 More broken mess to spawn 1.2 2017-08-06 17:21:51 +01:00
Dylan K. Taylor
2726f2a011 Solved packet encode/decode boilerplate code issue
Something as simple as forgetting the reset() when encoding would cause lots of problems which could go unnoticed. This should be fully backwards-compatible but needs more tests.
2017-07-07 13:59:09 +01:00
Dylan K. Taylor
ecfcf49984 Added basic encode/decode for gamerules data and added GameRulesChangedPacket
needed it for tests

Squashed:

oops

PhpStorm you asshole
2017-06-25 15:43:08 +01:00
Dylan K. Taylor
78c09267e5 Typehinted things in BinaryStream, sorted some methods and related bugfixes 2017-06-07 13:53:10 +01:00
Dylan K. Taylor
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
Dylan K. Taylor
846e3b6f1e New fields for StartGamePacket 2017-06-01 19:48:06 +01:00
Dylan K. Taylor
0a4d62b405 Added encode and decode methods for more packets 2017-05-15 15:56:59 +01:00
Dylan K. Taylor
a327a74ece Protocol changes for 1.1.0.3, fixed red sky, fixed crashes 2017-04-14 15:17:56 +01:00
Dylan K. Taylor
022f33b256 Fixed encoding of StartGamePacket, fixed world name not showing up in settings screen 2017-04-03 16:04:15 +01:00
Dylan K. Taylor
9311b4f248 Remove unneeded comments 2017-03-08 20:29:24 +00:00
Dylan K. Taylor
295d9bc80b Cleaned up muddled varint/varlong mess, added separate methods for entity unique and runtime ids, moved some MCPE-protocol-specific methods out of BinaryStream 2017-03-08 20:29:24 +00:00
Dylan K. Taylor
56990eb28b MCPE protocol gets its own namespace 2017-03-08 20:28:39 +00:00