9200 Commits

Author SHA1 Message Date
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
Dylan K. Taylor
de88f0fce1 3.4.4 is next 2018-12-22 17:28:47 +00:00
Dylan K. Taylor
9b078854c4 Release 3.4.3 3.4.3 2018-12-22 17:17:24 +00:00
Dylan K. Taylor
1520bccf7d Merge branch 'master' of https://github.com/pmmp/pocketmine-mp 2018-12-22 13:31:40 +00:00
Dylan K. Taylor
e5cb48bec2 Merge branch 'release/3.5' 2018-12-22 13:31:18 +00:00
Dylan K. Taylor
42f8e061a5 Merge branch 'release/3.4' into release/3.5 2018-12-22 13:29:41 +00:00
Dylan K. Taylor
1455c38dbe Utils: fixed crash in getCoreCount(), closes #2600
this should just default to 2 instead of shitting its pants.
2018-12-22 13:27:11 +00:00
Dylan K. Taylor
75df6973df LevelDB: Account for 2D maps tag being missing
I don't know why this would be missing, but in some cases it is, as seen in the crash archive. Whatever the case, we shouldn't be shitting the bed because of this.
2018-12-22 13:13:14 +00:00
Dylan K. Taylor
4763360e9e Update BinaryUtils dependency 2018-12-22 13:07:45 +00:00
Dylan K. Taylor
0299191e64 Attribute: fit value when resetting to default, closes #2599 2018-12-22 11:44:36 +00:00
Dylan T
17e5f60410
Add community Discord to Discussion section 2018-12-22 11:24:04 +00:00
Dylan K. Taylor
16ffd99005 Merge branch 'release/3.5' 2018-12-21 18:40:04 +00:00
Dylan K. Taylor
2664a1b4d8 Merge branch 'release/3.4' into release/3.5 2018-12-21 18:39:42 +00:00