6447 Commits

Author SHA1 Message Date
Dylan K. Taylor
3962d32ffe Chunk: Remove obsolete checks for entity/tile coordinate mismatches
This code is no longer necessary, because entities are constructed with a Level instead of a Chunk since API 3.0.0-ALPHA4. This means that they will not get allocated in the wrong chunk at runtime after having been saved on the wrong chunk by something else (such as an older version of PM). They will instead be allocated in a chunk selected by bitshifting their coordinates.

This is necessary to be able to fix #1789 without causing entities affected by the infamous bitshift-on-floats bugs to inexplicably vanish.
2018-02-14 18:58:52 +00:00
Dylan K. Taylor
a84aba5517 Replaced some bad usages of Vector3 get*() with their respective getFloor*() 2018-02-14 18:45:10 +00:00
Dylan K. Taylor
0b82d5c8d4 Math: Fix typo in Matrix->subtract() name 2018-02-14 18:22:37 +00:00
Dylan K. Taylor
3aef4c5a09 Merge branch 'legacy/alpha11' 2018-02-14 09:13:00 +00:00
Dylan K. Taylor
6307952ae9 Server: bail on trying to send empty batch (issue #2020) 2018-02-14 09:12:52 +00:00
Dylan K. Taylor
cacd0f5d8f Level: fixed global packet mechanism spamming empty batch packets every tick
This also spammed to nobody when the level is empty.

Closes #2020.
2018-02-14 09:12:07 +00:00
Dylan K. Taylor
f66928c345
Player: patch exploits relating to quitting on death (#2017)
* Revert "Revert bad duct-tape fix that broke lots of other things"
This reverts commit 4a4900e5e7ea1fd7b897b025b4b666fd2050f80a.

Player: Perform respawn actions when joining while dead
This fixes exploits related to #1567 by calling respawn logic on join when the player has zero health.
This is a shitty fix and doesn't solve the actual issues described in #1567, but it's a simple solution for the exploits related to it.
2018-02-13 21:23:31 +00:00
Dylan K. Taylor
9abfd54cc1 Updated with ListTag changes from PocketMine-NBT 2018-02-13 16:50:49 +00:00
Dylan K. Taylor
4a85311c5f Living: Remove redundant isAlive() check from kill()
This just causes unexpected bugs, and hides actual bugs.
2018-02-13 12:47:33 +00:00
Dylan K. Taylor
8a4f6eb6c2 ArmorInventory: fixed slots not updating when set
closes #2014
2018-02-13 11:33:54 +00:00
Dylan K. Taylor
b7bd8dc7f1 Human: fixed NPC skin crash after ByteArray change 2018-02-12 09:56:02 +00:00
Dylan K. Taylor
b445825467 TextFormat: Moved toANSI() to Terminal, close #1995
This also removes a cyclic dependency between TextFormat and Terminal, meaning that TextFormat is now standalone without any external dependencies.

This is also an API break. Beware all ye who wander here, master = bleeding-edge!
2018-02-11 19:11:51 +00:00
Dylan K. Taylor
98d6aea7fe Server: rename getResourcePackManager()
casual BC break, ain't nobody got time for deprecations!

closes #1797
2018-02-11 17:17:56 +00:00
Dylan K. Taylor
b75d121c7e Human: remove obsolete TODO 2018-02-11 17:08:59 +00:00
Dylan K. Taylor
88bbb03f12 Human: store cape & geometry data in NBT 2018-02-11 17:08:01 +00:00
Dylan K. Taylor
9478bc281f Human: Save skin data as TAG_ByteArray instead of TAG_String
TAG_String has a UTF-8 payload, which makes it more expensive to work with. Also, skins can contain bytes which are not valid UTF-8 characters and will therefore be treated as corrupted by external tools.
Additionally a TAG_String can only hold 32767 bytes, which might become a problem in the future.

A TAG_ByteArray can hold up to 2GB of data, and there is no character encoding restrictions on it.
2018-02-11 16:50:00 +00:00
Dylan K. Taylor
610e62e2cd Timings: don't return the paste we just sent in the response 2018-02-11 11:56:16 +00:00
Dylan K. Taylor
906442136b Merge branch 'legacy/alpha11' 2018-02-11 09:56:10 +00:00
Dylan K. Taylor
3600542d78 Timings: fixed pastes not working after ubuntu pastebin update 2018-02-11 09:55:52 +00:00
Dylan K. Taylor
3b36d46a8f Living: don't reset attack time on regaining health
fixes #2004 and related bugs
2018-02-10 20:53:39 +00:00
Dylan K. Taylor
63fa6a36a9 Merge branch 'pr/1982' 2018-02-08 12:09:29 +00: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
bab2daf711 Protocol changes for 1.2.10 release
Looks like they reverted near enough everything they did in the beta.
2018-02-08 11:18:46 +00:00
Dylan K. Taylor
dbac2abafb TextFormat: make colour matching regex less absurd 2018-02-07 11:31:49 +00:00
Dylan K. Taylor
ffbb44673f Enchantment: fix mistake in Protection translation key 2018-02-07 10:15:31 +00:00
Dylan K. Taylor
a84a8ecc14 Fixed 32-bit accident
gud fuckup
2018-02-06 21:39:15 +00:00
Dylan K. Taylor
687886e70b PermissibleBase: remove useless destructor 2018-02-06 21:10:42 +00:00
Dylan K. Taylor
bad323f5cc PocketMine.php: move stuff out of do{}while(false) that doesn't need to be in there 2018-02-06 19:13:57 +00:00
Dylan K. Taylor
ca9f700fb0 PocketMine.php: refactor timezone handling into its own class
This removes lots of bloat from PocketMine.php, and this is also important for reusability across threads.
2018-02-06 19:09:24 +00:00
Dylan K. Taylor
c51cc6b2fe Drop support for Zephir entirely
This extension hasn't been maintained in 4 years and it doesn't make sense to update it to PHP 7, since :shoghi: just dumped a blob of PHP into zephir. It's not worth the hassle of updating.

I prefer to modularise and then C-ify modules, so that they can be reused on their own.
2018-02-06 18:40:36 +00:00
Dylan K. Taylor
03c66f0f86 PocketMine.php: clean up dependencies checking 2018-02-06 18:38:09 +00:00
Dylan K. Taylor
610b041631 PocketMine.php: remove unused import 2018-02-06 18:25:59 +00:00
Dylan K. Taylor
75289b1498 kill(): fix bug when running with POSIX extension but without pcntl
SIGKILL constant is defined by pcntl, not by posix. If pcntl is not compiled then bugs can occur when trying to kill() the server (such as during a crash).
2018-02-06 17:55:18 +00:00
Dylan K. Taylor
e860d32b3a Merge branch 'text-container-move' 2018-02-06 13:13:19 +00:00
Dylan K. Taylor
c4486d9ad7 Tile: Cleaned up utterly pointless overcomplicated code for inventories 2018-02-06 13:01:54 +00:00
Dylan K. Taylor
8222b16d9a LevelDB: fixed leftover usage of the old CompoundTag API 2018-02-06 11:16:14 +00:00
Dylan K. Taylor
dcb53b1cbb RCON: Use PTHREADS_INHERIT_NONE - these threads don't need baggage from upstairs 2018-02-05 17:27:00 +00:00
Dylan K. Taylor
a52a2f6d26 RCON: register autoloader on RCON threads
fixes #1993
Interesting that this bug was never noticed before. Maybe because of the class getting loaded by PocketMine.php previously.
2018-02-04 22:24:19 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
bf3f5532ac Server: duct tape for very early startup crashes
Exceptions occurring early in the start sequence (before BaseLang is initialized) will result in the server hanging and not killing process as expected. This works around that issue.
2018-02-04 19:53:11 +00:00
Dylan K. Taylor
07bf1c9e22 Bump API version for release 2018-02-04 18:06:02 +00:00
Dylan K. Taylor
b659a3d39f Server: more shutdown debug 2018-02-04 10:14:35 +00:00
Dylan K. Taylor
68b30108be CrashDump: fix mis-reporting Composer dependency exceptions as plugin crashes
this is still not foolproof but whatever.
2018-02-03 19:27:59 +00:00
Dylan K. Taylor
f223fb2876 Use realpath() to determine correct file path case for DATA and PLUGIN_PATH
fixes issues where cleanPath() doesn't remove these paths from crash traces
2018-02-03 19:21:13 +00:00
Dylan K. Taylor
806a2005d7 added missing dependency check for OpenSSL
this is managed by Composer now so I didn't think to check it.
2018-02-03 01:03:59 +00:00
Dylan K. Taylor
c794ced0ad fix dependencies order 2018-02-03 01:03:08 +00:00
Dylan K. Taylor
f993358c5f fixed extremely stupid bug with player spawns
This was causing new players to inexplicably spawn in the wrong place when joining a world for the first time which had a different level name than folder name. With LevelDB worlds, this caused them to spawn wayyyy up at y=32767 for no good reason.
2018-02-02 16:00:28 +00:00
Dylan K. Taylor
9397356ce4 Server: fix crash when specifying settings.async-workers on the command-line 2018-02-01 17:58:49 +00:00
Dylan K. Taylor
e56e363dcc DataPacket: rename split-screen bytes 2018-01-31 12:07:26 +00:00
Dylan K. Taylor
18b287c3ea AsyncTask: Remove cleanObject() and calls to it
This is no longer needed. Doing worker GC (via collect()) frees the allocated memory anyway, so this function is now redundant.
2018-01-30 16:45:49 +00:00