8912 Commits

Author SHA1 Message Date
Dylan K. Taylor
ae497a828f Merge branch 'release/3.5' 2018-12-30 17:33:31 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
d2d65ce6cc Attribute: Fix exception messages, make them less useless 2018-12-30 13:44:30 +00:00
Dylan K. Taylor
ff2e982f22 Updated BinaryUtils dependency 2018-12-30 12:44:08 +00:00
Dylan K. Taylor
daf56e990b Get rid of some network-layer asserts
NEVER assert on user data. 🤦
2018-12-30 12:42:52 +00:00
Dylan K. Taylor
39c0fa6103 Merge branch 'release/3.5' 2018-12-29 20:58:12 +00:00
Dylan K. Taylor
2e5465e328 Updated RakLib dependency 2018-12-29 20:13:28 +00:00
Dylan K. Taylor
7b3115c00c Moved network NBT serializer into network namespace 2018-12-29 20:12:00 +00:00
Dylan K. Taylor
3f5e83a322 Backport 23954c4cda739190cb79295eeb78859c5c329be0 to 3.5 branch 2018-12-29 16:39:56 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
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
Dylan T
ac87319aed
Introduce a "block write-batch" concept (#2555)
Make use of writebatch to generate trees, doors and double plants safely

- Fixes #2441 
- Fixes #2548 
- Closes #2498
2018-12-29 12:00:14 +00:00
Dylan K. Taylor
aaaddd1fd6 Terminal: stick a RESET on the end when writing a newline 2018-12-29 11:54:44 +00:00
Dylan K. Taylor
d86107e22a Terminal: Added write() and writeLine() to allow easily emitting Minecraft-formatted text to the console 2018-12-29 11:28:25 +00:00
Dylan K. Taylor
498bffb34f Fixed --enable-ansi and --disable-ansi not being respected on threads
this causes some breakage to the behaviour of Terminal, and for that reason this is going on 4.0.

Terminal::hasFormattingCodes() will no longer auto-detect whether colour codes are supported.
2018-12-29 11:23:32 +00:00
Dylan K. Taylor
10ac322b8f Merge branch 'release/3.5' 2018-12-29 00:04:33 +00:00
Dylan K. Taylor
beb5d72299 RegionLoader: fix off-by-one bug with large chunks, closes #2615 2018-12-29 00:02:54 +00:00
Dylan K. Taylor
23954c4cda RegionLoader: Remove dead/broken code
garbage collection does need to be implemented, but I was looking at this code and found so many fucking bugs I decided it wasn't worth the effort of fixing.
2018-12-28 23:03:24 +00:00
Dylan K. Taylor
baf278831e Merge branch 'release/3.5' 2018-12-28 19:32:48 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
e6381297c7 NetworkCipher: fix some missing typehints 2018-12-28 17:35:37 +00:00
Dylan K. Taylor
3ebd7e8ba6 Add network-wide API to filter raw packets by regex, stricter validation for Query 2018-12-28 16:30:52 +00:00
Frago9876543210
f06e67a792 Allow plugins to disable background generation (#2613) 2018-12-28 14:34:54 +00:00
Dylan K. Taylor
78a80a6958 Tighten validity checks for block metadata
This filters out over 200 invalid states which were previously considered just fine, including zero-width cakes, buttons with broken facing values, furnace/chest with crazy values, and more.
2018-12-28 14:33:09 +00:00
Dylan K. Taylor
333773bf14 Merge branch 'release/3.5' 2018-12-28 13:04:17 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
045868783c Merge branch 'master' of https://github.com/pmmp/pocketmine-mp 2018-12-28 12:56:01 +00:00
Dylan K. Taylor
e9d43aa44f Fixed MainLogger not being assigned as global on async workers 2018-12-28 12:55:49 +00:00
Dylan K. Taylor
f64cef7eb6 ItemFactory: Get rid of $multiple crap
this is required in a specialized format, which doesn't make any sense. Plugins with multiple packed item formats should parse them themselves.
2018-12-28 11:55:52 +00:00
Dylan K. Taylor
ab75e89d95 Fixed generation changes in recent builds compared to 3.x
this was caused by improper RNG sanitization and a recent cleanup refactor.
2018-12-27 17:36:41 -05:00
Dylan K. Taylor
cf20f0e23a Merge branch 'release/3.5' 2018-12-27 15:53:12 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
8564efc011 Sync item and block legacy IDs 2018-12-27 15:02:14 +00:00
Dylan K. Taylor
b8f8a81704 Merge branch 'release/3.5' 2018-12-26 23:18:33 +00:00
Dylan K. Taylor
a71af952ba Sign: simplify network data reading, ensure text is always 4 lines, closes #2610 2018-12-26 22:57:42 +00:00
Dylan K. Taylor
93dd05a03e Fixed ender chest sounds, closes #2611 2018-12-26 22:33:51 +00:00
Dylan K. Taylor
ba33d8340a Merge branch 'release/3.5' 2018-12-26 22:26:44 +00:00
Dylan K. Taylor
98f903783c Chest: remove pairx and pairz on blockpick, fixes #2612 2018-12-26 22:26:17 +00:00
Dylan K. Taylor
a6cd9ae029 Implemented #2556: don't send tile NBT updates until the end of tick
this eliminates spam when tile spawn NBT changes a lot during a tick, for example the lines of a sign being updated.

closes #2556
2018-12-26 22:18:52 +00:00
Dylan K. Taylor
2c6381632c Allow Tiles to decide how to copy data from an item 2018-12-26 20:01:14 +00:00
Dylan K. Taylor
f6983efec1 Revamp Tile creation (again)
This breaks down the handling of tile creation even further.
- Introduced a static Tile::override() method to allow overriding the construction class for a specific type of chest. This applies to classes as opposed to save IDs, so you can override Chest::class with MyCustomChest::class and it will take effect for any Chest save ID.
- Removed MCPE stringy save ID constants from public Tile interface. These are now only used for creating saved tiles from a stored chunk, and saving them.
- Renamed Tile::registerTile() to register()
- Tile::create() and Tile::createFromItem() now accept a class parameter instead of a stringy save ID.
- Tile::create() and Tile::createFromItem() were changed to throw \InvalidArgumentException on unknown/unregistered tile types. They also now never return null, but always (except in exception cases) return an object which is an instanceof the base class specified.
2018-12-26 19:21:37 +00:00
Dylan K. Taylor
9f4bb440bd Move server-full/banned/whitelisted controls into PlayerPreLoginEvent
This allows plugins to more easily control the behaviour of server-full, whitelisting and banning. A message can be assigned for each, with a plugin custom reason taking the final priority if set.

This system solves several edge case problems in the Bukkit version by allowing kick reasons to be combined, so that removing one kick reason will roll back the final reason to the next highest, instead of just allowing the player through completely.
Only one message will be shown at point of disconnection, for consistency with the old behaviour.
The message priority is as follows (for all cases, only if set):
- Plugin reason
- Server full
- Whitelist enabled
- Player is banned

This also brings us one step closer to separating Player and NetworkSession.
2018-12-26 13:46:44 +00:00
Dylan K. Taylor
02efa93e3a PlayerPreLoginEvent: New, more elegant way to control authentication requirement
Previously the only way to deal with this was to cancel the PlayerKickEvent generated by lack of authentication. Now, plugins can decide whether auth should be required for a specific player. The default is whatever xbox-auth is set to in server.properties.

cc @Johnmacrocraft
2018-12-23 18:24:33 +00:00
Dylan K. Taylor
f313d06070 Merge branch 'release/3.5' 2018-12-23 14:04:29 +00:00
Dylan K. Taylor
5d47ea4337 Merge branch 'release/3.4' into release/3.5 2018-12-23 14:04:13 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
0e108341d7 Merge branch 'release/3.5' 2018-12-22 17:37:32 +00:00
Dylan K. Taylor
4ad1093fd7 3.5.3 is next 2018-12-22 17:36:29 +00:00
Dylan K. Taylor
fc0782df02 Release 3.5.2 3.5.2 2018-12-22 17:29:31 +00:00
Dylan K. Taylor
bfaa224f6b Merge branch 'release/3.4' into release/3.5 2018-12-22 17:29:11 +00:00