Commit Graph

25 Commits

Author SHA1 Message Date
470879c9bf Merge branch '3.6' 2019-02-13 14:53:20 +00:00
243c12de7c EffectCommand: fix bounds check, closes #2055 2019-02-13 14:37:40 +00:00
78dfcc5f2d Move Effect and EffectInstance to entity\effect namespace 2019-01-28 15:41:07 +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
d53258c943 EffectCommand: restrict range of values for duration, fixes #2055 2018-03-30 11:51:20 +01:00
773f760fff VanillaCommand: added getBoundedInt() 2018-03-30 11:48:42 +01:00
dc3bf8546e Refactored effects handling, split up concerns of effect types and instances
Removed json insanity for effects

Split up effect types and effect instances

Saturation is an instant effect
2018-03-07 12:42:31 +00:00
906d7eb176 Lang: Move TranslationContainer and TextContainer to \pocketmine\lang namespace
why the hell were they ever put in \pocketmine\event in the first place??

This change was suggested many months ago but I forgot all about it.
2018-02-04 20:03:30 +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
445a67954d Merge changes from master 2017-08-22 14:13:31 +01:00
592ce3c9e9 Adding some missed commands typehints and documentation 2017-08-21 19:02:30 +01:00
1e539c4e3b fix some 1.2 translation issues, close pmmp/PocketMine-Language#19 2017-08-09 21:40:20 +01:00
8bb0c53797 More typehints for Command stuff 2017-07-14 08:52:27 +01:00
97f6a32557 Changed usage message displaying to exceptions to reduce boilerplate code
Someday this won't need to be done by commands themselves, it'll be done by the parser.
2017-07-04 13:45:00 +01:00
51b0673b4b Bite the bullet and enable strict types on everything 2017-06-07 12:53:16 +01:00
eaef2bd169 Fixed some inspections 2017-05-04 12:19:50 +01:00
2d927db264 Implemented Instant Health and Instant Damage effects 2017-03-21 11:38:08 +00:00
10c8632417 Fixed effect amplifier overflow crash, close #147 (#191) 2016-12-27 21:30:54 +00:00
6fc435da0e Imports rearrangement 2016-10-03 00:43:46 +08:00
3e2cce3c2c use cleanup 2015-08-07 21:26:24 +02:00
e2bae92df8 Updated language files and command descriptions 2015-04-12 00:59:12 +02:00
c2138aa30c More language files 2015-04-11 12:56:38 +02:00
0c041ebca3 Added base translation system 2015-04-11 01:32:08 +02:00
76767294bf Fish items, block of redstone! 2015-04-08 15:34:50 +02:00
4383e272eb Added Effects base, /effect and methods 2015-03-15 23:15:54 +01:00