8977 Commits

Author SHA1 Message Date
Dylan K. Taylor
f0733f6ab6 Merge branch '3.5' 2019-01-06 01:09:34 +00:00
Dylan K. Taylor
ab37df4484 Server: micro-optimization: avoid unnecessary array_shift()
it's much less expensive to just calculate the modulo of the current tick and 20, and overwrite past entries. The effect is the same. The only difference is that the arrays won't be ordered by time, but that doesn't matter anyway.
2019-01-06 01:08:56 +00:00
Dylan K. Taylor
f80eeee20f Merge branch '3.5' 2019-01-05 18:59:13 +00:00
Dylan K. Taylor
93969197f7 Enable status,gc,dumpmemory OOB
dumpmemory has been confined to console by default due to the hazards it poses to a running server.

closes #2528
2019-01-05 18:56:57 +00:00
Dylan K. Taylor
946a1036f1 Drop warn-if-enabled for asserts
I don't know why this is optional when no other debug warnings are.
2019-01-05 18:49:15 +00:00
Dylan K. Taylor
43410cdafb Server: warn on assertions !== -1, closes #2640 2019-01-05 18:47:29 +00:00
Dylan K. Taylor
cdf2f98e26 Merge branch '3.5' 2019-01-05 17:41:26 +00:00
Dylan K. Taylor
a99e15012c Backport no-ai hack to disable pre-spawn movement 2019-01-05 17:39:20 +00:00
Dylan K. Taylor
b22a2ef914 Living: Despawn in endDeathAnimation()
this removes the necessity for the player to do this.
2019-01-05 12:46:11 +00:00
Dylan K. Taylor
532def67ab Merge branch '3.5' 2019-01-05 11:12:34 +00:00
Dylan K. Taylor
f7f7be896e Server: drop misleading config values 2019-01-05 11:12:09 +00:00
Dylan K. Taylor
d83f024a1f Merge branch '3.5' 2019-01-05 09:27:16 +00:00
Dylan K. Taylor
254281cd5e Ice: don't create water for creative players, fixes #2622 2019-01-05 09:26:35 +00:00
Dylan K. Taylor
226db35cf9 Merge branch '3.5' 2019-01-04 23:56:53 +00:00
Dylan K. Taylor
5dfceeea98 Fix typo in command.op.take permission description 2019-01-04 23:56:29 +00:00
Dylan K. Taylor
d8d04aeb53 fixup some imports 2019-01-04 23:49:32 +00:00
Dylan K. Taylor
adc1069ed2 Merge branch '3.5' 2019-01-04 23:28:44 +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
0bacf51729 Fix another swathe of number_format() truncation bugs 2019-01-04 19:39:51 +00:00
Dylan K. Taylor
33f6b441d8 Fixed /gc truncating memory freed
wtf PHP?
2019-01-04 17:30:35 +00:00
Dylan K. Taylor
febf1b1801 Merge branch '3.5' 2019-01-04 11:46:12 +00:00
Dylan K. Taylor
11b59498d9 TakeItemEntityPacket: add missing decode, close #2633 2019-01-04 11:45:37 +00:00
Dylan K. Taylor
7a4e2371e6 master-specific PHPStan nits 2019-01-04 00:40:09 +00:00
Dylan K. Taylor
e1064a9e36 Merge branch '3.5' 2019-01-04 00:37:48 +00:00
Dylan K. Taylor
d71a543d10 Fixed a bunch of things PHPStan finds unpalatable
close #2614, fix a bunch of docs bugs, fix sendCreativeContents() crash on Human holders, move some inline variable declarations
2019-01-04 00:23:09 +00:00
Dylan K. Taylor
8ef15d728a HandshakeSessionHandler: fix a doc comment bug
thank you PHPStan ❤️
2019-01-03 22:36:31 +00:00
Dylan K. Taylor
c559dfccfe DataPacket: encode() and decode() are now final, encodePayload() and decodePayload() are now abstract 2019-01-03 21:14:54 +00:00
Dylan K. Taylor
60687d8d6c Merge branch '3.5' 2019-01-03 18:02:33 +00:00
Dylan K. Taylor
5e0c3333cf Player: catch more specific exceptions for transactions 2019-01-03 17:57:37 +00:00
Dylan K. Taylor
0f941410f6 Use more appropriate exceptions in the protocol layer 2019-01-03 17:57:06 +00:00
Dylan K. Taylor
9840a3c980 Merge branch '3.5' 2019-01-03 17:29:53 +00:00
Dylan K. Taylor
4d15eb3327 Cleaned up the InventoryTransactionPacket decoding clusterfuck
@shoghicp, y u do dis... I almost created a sub-packet architecture to deal with this shit :(

This mess really ought to be split into multiple packets. Perhaps the PacketPool can be extended to do that in the future.
2019-01-03 17:24:30 +00:00
Dylan K. Taylor
504cc3bf8b AddEntityPacket: fix some bugs in legacy ID conversion handling 2019-01-03 17:00:16 +00:00
Dylan T
134956ac58
Add a Support issue template
maybe this will guide people who don't read into shooting themselves in the foot automatically >:)
2019-01-03 16:37:48 +00:00
Dylan T
5806ce9205
add a Crash issue template
valid crashdumps are usually self explanatory and include all required information like OS/version/etc, so there's no need to force reporters to rewrite a bunch of extra information that should already be in the crashdump.
2019-01-03 16:32:21 +00:00
Dylan K. Taylor
7853076d80 Merge branch 'master' of https://github.com/pmmp/pocketmine-mp 2019-01-03 15:45:33 +00:00
Dylan K. Taylor
19fa6f5e8f Merge branch '3.5' 2019-01-03 15:44:48 +00:00
Dylan K. Taylor
6bd1491b8b AsyncPool: Apply a cooldown to workers to cut down unnecessary GC lag spikes
Since 3.2 there have been some runtime performance issues related to garbage collection and dynamic AsyncWorker booting. This is partly because of GC being dumb about shutting down what it thinks are "unused" workers. A worker which has been idle for a single tick is considered the same as a worker which has been idle for hours. The result of this is that on active servers, workers would get shut down and then immediately restarted because of something like chunk sending. Since booting an async worker is frightfully expensive, this causes lag spikes, which is obviously bad.

This commit changes the GC mechanism to only shutdown workers which have not been used for the last 5 minutes.
2019-01-03 15:06:53 +00:00
Dylan T
6ad405950a
Update support.yml 2019-01-03 00:01:20 +00:00
Dylan K. Taylor
71f123c616 Merge branch '3.5'
# Conflicts:
#	resources/locale
2019-01-02 21:25:57 +00:00
Dylan K. Taylor
658786f2f6 TitleCommand: fix off-by-one bug in "times" subcommand 2019-01-02 21:04:25 +00:00
Dylan K. Taylor
d34f3f1af3 Add a terminal message for the crash strangler 2019-01-02 19:10:05 +00:00
Dylan K. Taylor
5bb414620c Merge branch '3.5' 2019-01-02 15:05:19 +00:00
Dylan K. Taylor
8650c187f9 Entity: fixed mob head yaw 2019-01-02 15:04:56 +00:00
Dylan K. Taylor
171be946c6 Network: burn some deprecated stuff 2019-01-01 20:53:33 +00:00
Dylan K. Taylor
f81bbd60e8 Avoid use of internal fields in BinaryStream 2019-01-01 16:42:14 +00:00
Dylan K. Taylor
4a629e1a26 DataPacket: remove dead function clean() 2019-01-01 15:43:05 +00:00
Dylan K. Taylor
c6a32ccf2a Merge branch 'release/3.5' 2019-01-01 14:08:20 +00:00
Dylan K. Taylor
4b4820cf53 3.5.5 is next 2019-01-01 13:55:45 +00:00
Dylan K. Taylor
d33acc4fd0 Release 3.5.4 3.5.4 2019-01-01 12:33:17 +00:00