Commit Graph

34 Commits

Author SHA1 Message Date
3e58708130 Add some missing @throws annotations 2019-02-04 19:50:43 +00:00
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
6417cff618 Fixed resource packs with comments in manifest
MOJANG, THERE'S NO SUCH THING AS COMMENTS IN STANDARD JSON
2018-12-27 15:50:51 +00:00
45c9caa38c Fixup some formatting issues 2018-10-21 18:15:25 +01:00
1ef6f5d166 ZippedResourcePack: Make manifest parse errors less useless 2018-07-21 09:53:16 +01:00
05af87e1d4 Strip empty lines at the end of classes 2018-06-11 13:19:23 +01:00
dce8ed9dd1 Eliminate more hard dependencies on MainLogger 2018-06-04 16:52:03 +01:00
f27c6fcf70 ResourcePack: slightly better handling of bad configs 2018-05-31 18:30:21 +01:00
7864a315f6 ResourcePackManager: cleaned up pack loading error handling 2018-05-31 17:58:47 +01:00
3c4dca7fdb ZippedResourcePack: Handle json decoding errors correctly
Previously this would crash if it failed to decode the JSON (https://forums.pmmp.io/threads/texture-pack-shows-errors-not-working.4880/)
2017-12-25 19:01:02 +00:00
1896576a24 ResourcePackManager: Remove Server constructor dependency 2017-12-22 11:11:58 +00:00
8f811c29d7 ResourcePackManager: Remove redundant config property
This was only used in the constructor, there's no need to store it.
2017-12-22 11:05:47 +00:00
3a4f79629c ResourcePackManager: Add API method getPath() 2017-12-22 11:04:15 +00:00
4f8e4f0522 Add EOF newlines where missing (bulk) (#1836)
This should solve issues with people making GitHub PRs and having the web editor messing things up. GitHub Web Editor sucks :(
2017-12-20 11:56:36 +00:00
dfc2d1dfe6 Stop hardcoding src/pocketmine/resources everywhere 2017-12-11 19:52:49 +00:00
78d24b9183 Take 2: Fixed resource pack matching for uppercased UUIDs
fixed the wrong damned bug...
2017-11-21 11:29:12 +00:00
46afb7caf1 Fixed resource pack matching for uppercased UUIDs 2017-11-21 11:25:21 +00:00
a39c9e8c8e add ResourcePack->getPath(), close #1559 2017-11-20 13:24:30 +00:00
c3b8be3f60 and more typehints 2017-07-14 10:56:51 +01:00
4d874e7e78 static analysis 2017-07-13 16:45:24 +01:00
6b773dc04d Make resource-pack error messages a little clearer 2017-07-13 10:55:42 +01:00
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
f6ff03fc31 Added support for MCPACK resource packs 2017-05-30 09:43:28 +01:00
8a28021b44 Use hash_file instead of OpenSSL for resource pack hashing
Epic facepalm. I totally forgot this function existed. >_<
2017-03-18 21:47:04 +00:00
0d37d0d896 Added some documentation to resource packs namespace 2017-03-18 16:07:03 +00:00
cc0b4d888e Use a resource for reading resource packs from disk 2017-03-18 15:49:48 +00:00
91a92b4e57 Use a pre-created resource packs config with comments to explain how to use it 2017-03-11 11:40:58 +00:00
ed765a2c9b Added debug messages for resource requests with invalid pack IDs 2017-03-11 11:19:14 +00:00
d41bdfc31c Added resource packs support 2017-03-10 21:10:46 +00:00
eb13cec5d0 Added new packets 2017-03-02 11:04:51 +00:00
9004417456 Fixed file headers (#255) 2017-01-13 16:57:05 +00:00
d3c62988b0 Add unknown field to ResourcePackInfoEntry 2016-11-02 13:41:59 +00:00
ec328a8160 >_> 2016-10-27 10:55:02 +01:00
7cd7a7fbf6 Spawn working on new build. TODO: Resource packs. 2016-10-27 10:55:02 +01:00