Commit Graph

8365 Commits

Author SHA1 Message Date
b22a2ef914 Living: Despawn in endDeathAnimation()
this removes the necessity for the player to do this.
2019-01-05 12:46:11 +00:00
f7f7be896e Server: drop misleading config values 2019-01-05 11:12:09 +00:00
254281cd5e Ice: don't create water for creative players, fixes #2622 2019-01-05 09:26:35 +00:00
5dfceeea98 Fix typo in command.op.take permission description 2019-01-04 23:56:29 +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
0bacf51729 Fix another swathe of number_format() truncation bugs 2019-01-04 19:39:51 +00:00
33f6b441d8 Fixed /gc truncating memory freed
wtf PHP?
2019-01-04 17:30:35 +00:00
11b59498d9 TakeItemEntityPacket: add missing decode, close #2633 2019-01-04 11:45:37 +00:00
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
5e0c3333cf Player: catch more specific exceptions for transactions 2019-01-03 17:57:37 +00:00
0f941410f6 Use more appropriate exceptions in the protocol layer 2019-01-03 17:57:06 +00:00
504cc3bf8b AddEntityPacket: fix some bugs in legacy ID conversion handling 2019-01-03 17:00:16 +00:00
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
658786f2f6 TitleCommand: fix off-by-one bug in "times" subcommand 2019-01-02 21:04:25 +00:00
d34f3f1af3 Add a terminal message for the crash strangler 2019-01-02 19:10:05 +00:00
8650c187f9 Entity: fixed mob head yaw 2019-01-02 15:04:56 +00:00
4b4820cf53 3.5.5 is next 2019-01-01 13:55:45 +00:00
d33acc4fd0 Release 3.5.4 3.5.4 2019-01-01 12:33:17 +00:00
f7de6eb59f Network: Deprecate some garbage
Deprecations on a patch version breaks release protocol, but I don't care at this point. Nobody should have been using this shit anyway.
2018-12-31 22:52:39 +00:00
75a0627bf2 Network: cut this catch-all bullshit out as well
If a network interface crashes, it should take out the whole server, not try to keep on ticking.
2018-12-31 22:40:13 +00:00
8752e363c9 EXCUSE ME, HOW DARE YOU NOT LOG NETWORK ERRORS?! 2018-12-31 22:33:56 +00:00
9ed1b5ca7f Event: More detailed errors for non-cancellable events 2018-12-31 21:29:22 +00:00
1cbb31f1db Player: Reintroduce permission checks for command hints
This was removed way back in 2016 because of an unidentified bug which caused permissible commands not to show up on the client. Back then, command parsing and validity checks were client-sided, and the client would simply not send the command at all if it didn't recognize it. Now, that problem is gone, so it doesn't matter as much if there are permission bugs which cause commands to be erroneously missing.
closes #2625
2018-12-31 19:35:59 +00:00
1393b4c4e2 Player: aDd a HacK foR CliEnt SidE rIghT cLicK SpaM BuG
this bug has existed for so long I forgot it was still here. People stopped pestering me to do something about it, and as a result I forgot to do anything about it.

This hack isn't perfect, but it filters out the worst of the noise. It has side effects for legitimate fast double-clicks, but I don't think anyone will be too bothered - just click more slowly.

This hack may also have negative side effects on poor connections where latency spikes are a problem, but there isn't really much that can be done about that.
2018-12-31 19:16:13 +00:00
2921c86b3c Torch: fixed crash on blockupdate with corrupted meta 2018-12-30 19:50:35 +00:00
9c3a929b65 3.5.4 is next 2018-12-30 19:04:47 +00:00
9abaa42cd7 Release 3.5.3 3.5.3 2018-12-30 18:44:16 +00:00
77b9feb3c0 Player: don't waste CPU time ordering chunks for non-moving players 2018-12-30 18:40:36 +00:00
e0e2e1775f Player: Fixed sluggish chunk updates when not moving
Always order chunks ASAP on chunk change, not just during the spawn sequence. This fixes the sluggishness observed in BlockSniper when doing async chunk modifications.
2018-12-30 17:32:38 +00:00
d2d65ce6cc Attribute: Fix exception messages, make them less useless 2018-12-30 13:44:30 +00:00
ff2e982f22 Updated BinaryUtils dependency 2018-12-30 12:44:08 +00:00
daf56e990b Get rid of some network-layer asserts
NEVER assert on user data. 🤦
2018-12-30 12:42:52 +00:00
3f5e83a322 Backport 23954c4cda to 3.5 branch 2018-12-29 16:39:56 +00:00
5ecc5ed7e0 Get rid of catch-all on chunk unload
god only knows what the fuck is going on in here that warrants this catch-all... so let's remove it and find out!
2018-12-29 16:37:59 +00:00
cd80ae00d4 Handle errors properly on chunk load
Only CorruptedChunkException and UnsupportedChunkFormatException are expected. Anything else should crash the server.
2018-12-29 16:37:10 +00:00
beb5d72299 RegionLoader: fix off-by-one bug with large chunks, closes #2615 2018-12-29 00:02:54 +00:00
0eef634aab Player: Give me ALLLLL your crashdumps
I suspect this is going to cause a firestorm, but once it does we'll be able to see what needs fixing.
2018-12-28 19:30:05 +00:00
0ea166a551 Prevent placement of unknown blocks, closes #2260
I don't know why I ever allowed this in the first place... stupid idea...
2018-12-28 13:03:34 +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
a71af952ba Sign: simplify network data reading, ensure text is always 4 lines, closes #2610 2018-12-26 22:57:42 +00:00
93dd05a03e Fixed ender chest sounds, closes #2611 2018-12-26 22:33:51 +00:00
98f903783c Chest: remove pairx and pairz on blockpick, fixes #2612 2018-12-26 22:26:17 +00:00
5d47ea4337 Merge branch 'release/3.4' into release/3.5 2018-12-23 14:04:13 +00:00
c242d6213a Rewrite documentation for PlayerPreLogin, PlayerLogin and PlayerJoin events
this is some of the most awful documentation I've ever seen. No documentation would have been better.
2018-12-23 14:03:19 +00:00
4ad1093fd7 3.5.3 is next 2018-12-22 17:36:29 +00:00
fc0782df02 Release 3.5.2 3.5.2 2018-12-22 17:29:31 +00:00
bfaa224f6b Merge branch 'release/3.4' into release/3.5 2018-12-22 17:29:11 +00:00
de88f0fce1 3.4.4 is next 2018-12-22 17:28:47 +00:00
9b078854c4 Release 3.4.3 3.4.3 2018-12-22 17:17:24 +00:00
42f8e061a5 Merge branch 'release/3.4' into release/3.5 2018-12-22 13:29:41 +00:00