8564 Commits

Author SHA1 Message Date
Dylan T
71d17c50d6
Fixed internal IP detection (#2711), closes #2702 2019-01-29 12:51:53 +00:00
Dylan K. Taylor
3a18bdd6a0 Prevent block-picking unknown blocks 2019-01-28 17:45:48 +00:00
Dylan K. Taylor
96857c65b6 Player: Fixed subscribing to broadcast permissions too early
Plugins would indirectly trigger permissible recalculation too early in the login sequence, which then caused their permissions to be recalculated and subscribing them to the broadcast permission far too early.
2019-01-27 15:08:08 +00:00
Dylan K. Taylor
9826abd83e Stair: fixed crash if player is null 2019-01-26 16:59:03 +00:00
Dylan K. Taylor
48c8c2a8c3 ItemFrame: address crashdump 2113950
thanks Mojang for designing this lovely system where so much undefined behaviour is able to take place :(
2019-01-26 16:58:25 +00:00
Dylan K. Taylor
c83b7d9b69 Utils: fixed getNiceClosureName() not processing namespaced closures properly 2019-01-26 12:08:07 +00:00
Dylan K. Taylor
c66dc7b273 Level: Optimize blockticking coordinate selection
generating 1 large bounded random costs the same as generating 4 small ones, so it makes more sense to do it like this instead.

Note that prior to 7.1 this code would not work due to it not handling 64-bit appropriately.
2019-01-25 19:43:16 +00:00
Dylan K. Taylor
5bf7350ee5 Level: change some stupid var names 2019-01-25 17:10:44 +00:00
Dylan K. Taylor
636cc1c199 Level: some mitigations for #2675
this reduces the performance impact by using smaller keys, which reduces the key distance for nearby blocks.
2019-01-25 13:17:33 +00:00
Dylan K. Taylor
62b6405371 Use 2 space indents in YAML files
this is (mostly) a backport of #2593 to 3.5. Closes #2593.
2019-01-24 18:44:06 +00:00
Dylan K. Taylor
9ecf23d3ee Fix some bugs in doxygen config 2019-01-24 11:26:48 +00:00
Dylan K. Taylor
187f36fe38 ExperienceOrb: clean up some confusing code 2019-01-23 16:46:18 +00:00
Dylan K. Taylor
dc89b48354 Human: Fixed XP drop amount to match vanilla
In vanilla it doesn't drop the exact number of points you collected. Rather, you lose a little for every level above 1 you had (1 level requires 7 points, later levels require +2 per level), and can recover at most 100 points. Hence, if you had 10 levels, you get back enough points to fill 5 levels and most of a 6th. 14-15 levels gets you the upper bound of about 7.5 levels.
2019-01-23 12:39:25 +00:00
Dylan K. Taylor
e6d1c1dfbc Living: Get rid of delayed XP spawning, closes #2644
This is not identical to vanilla, but I don't care because it gets rid of edge cases and also makes it easier to integrate with EntityDeathEvent in the future.
2019-01-23 12:31:05 +00:00
Dylan K. Taylor
5a8812b1dc 3.5.8 is next 2019-01-22 22:14:19 +00:00
Dylan K. Taylor
4b8e4123af Release 3.5.7 3.5.7 2019-01-22 22:13:35 +00:00
Dylan K. Taylor
45a4252c26 RCON: Explicitly specify connection backlog size, fixes #2685
I believe this is caused by a bug in the linux kernel, since it only impacts certain machines I tested (one, to be specific). Whatever the case, setting a max backlog size is prudent anyway, and fixes the problem.
2019-01-22 22:11:32 +00:00
Dylan K. Taylor
feaaa925a7 Fixed a series of denial-of-service bugs in RCON
Packets with a too-short payload would either cause the RCON thread to hang until the client disconnected, or crash the RCON thread entirely.

commit 90bb1894d7f87645b806f5fc67d1b877bb963180
Author: Dylan K. Taylor <odigiman@gmail.com>
Date:   Tue Jan 22 18:15:46 2019 +0000

    fix some bugs in RCON
2019-01-22 22:05:15 +00:00
Dylan K. Taylor
5221db1178 Updated BinaryUtils dependency 2019-01-22 17:22:11 +00:00
Dylan K. Taylor
47321114eb login: allow 60 seconds clock drift on login JWT
can everyone please just use NTP already?
2019-01-20 15:51:29 +00:00
Dylan K. Taylor
a27c9409f1 ExperienceOrb: fixed wrong condition 2019-01-20 12:30:24 +00:00
Dylan K. Taylor
854f851525 ExperienceOrb: don't follow players in other worlds 2019-01-20 12:30:09 +00:00
Dylan K. Taylor
9003b38be3 Fixed a wtf in Player->removeWindow() 2019-01-19 19:14:21 +00:00
Dylan K. Taylor
a6a93f822f 3.5.7 is next 2019-01-19 17:48:16 +00:00
Dylan K. Taylor
d4851a8f1f Release 3.5.6 3.5.6 2019-01-19 17:33:07 +00:00
Dylan K. Taylor
480a513f30 Sign: fixed asserts on loading NBT, closes #2636 2019-01-19 16:42:22 +00:00
Dylan K. Taylor
4fd3bee360 Entity: Address fireticks crashdumps
This will now throw an exception at the source instead of crashing when the entity is saved, which should put the blame on the correct plugin responsible for this.
This also includes magic method hacks to preserve backwards compatibility, since the fireTicks field is now protected.
2019-01-19 16:05:10 +00:00
Dylan K. Taylor
41fd7545e3 RegionLoader: Account for unexpected EOF when reading chunks, closes #2676 2019-01-19 15:49:19 +00:00
Dylan K. Taylor
82dddde159 Remove dead code in /time command handler 2019-01-19 15:15:04 +00:00
Dylan K. Taylor
bc709efb77 Prevent stupidity with /enchant 2019-01-19 15:14:51 +00:00
Dylan K. Taylor
cd98e6a23e Updated PreProcessor submodule 2019-01-19 13:57:17 +00:00
Dylan K. Taylor
cb591a98f4 NetworkBinaryStream: Skip item NBT which is too large when encoded
Encoded tags larger than 32KB overflow the length field, so we can't send these over network. However, it's unreasonable to randomly throw this burden off onto users by crashing their servers, so the next best solution is to just not send the NBT. This is also not an ideal solution (books and the like with too-large tags won't work on the client side) but it's better than crashing the server or client due to a protocol bug. Mojang have confirmed this will be resolved by a future MCPE release, so we'll just work around this problem until then.
2019-01-16 21:50:43 +00:00
Dylan K. Taylor
e9d1af0aee Fixed stack trace encoding bug in CrashDump
it was encoding the real (full) trace, instead of emitting the printable version.
2019-01-16 18:56:56 +00:00
Dylan K. Taylor
0f545c410a Bow: Improve consistency with vanilla (JE at least), closes #2660
This change causes the existing test I did to now report ~55-60 blocks, which is much closer to parity with vanilla.
2019-01-15 14:42:41 +00:00
Dylan K. Taylor
1c2ed0836f Sync composer dependencies 2019-01-15 10:26:33 +00:00
Dylan T
6cf30dc813 build 7.3 on travis 2019-01-11 23:54:44 +00:00
Dylan K. Taylor
f7d9247d39 Server: Permit NULL value entries in pocketmine.yml worlds
this permits listing worlds to load as keys without values.
2019-01-10 19:30:37 +00:00
Dylan K. Taylor
3380aa3ac2 Config: Assert only whitespace precedes .properties key, fixes #commented properties not being skipped 2019-01-07 12:25:05 +00:00
Dylan K. Taylor
6a9cad8fb7 3.5.6 is next 2019-01-06 20:18:32 +00:00
Dylan K. Taylor
c9e598cdb9 Release 3.5.5 3.5.5 2019-01-06 19:55:21 +00:00
Dylan K. Taylor
a6e5b6e158 Log a debug message when not sending crash due to folder plugin 2019-01-06 19:52:20 +00:00
Dylan K. Taylor
22a6b817d7 Distinguish between direct and indirect plugin crash involvement
If a plugin was involved in a crash, we can't safely blame it for the crash, since it might have innocently triggered a core bug. Furthermore, it's difficult to accurately detect plugin causing things like invalid argument crashes.
2019-01-06 18:07:29 +00:00
Dylan K. Taylor
2cdf97b7b5 CrashDump: Scan full stack trace to determine plugin involvement 2019-01-06 18:07:29 +00:00
Dylan K. Taylor
836cb67850 Server: don't abuse random_bytes() to generate integers 2019-01-06 17:22:31 +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
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
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