11049 Commits

Author SHA1 Message Date
Dylan K. Taylor
b81cc671e9 Major performance improvement to basic sky light calculation
this was degraded whenever it was I decided to make chunks always be allocated. This commit uses a fast path for light filling in subchunks which are completely clear of the heightmap, which returns the performance back to its old fast levels.
2020-09-04 15:51:33 +01:00
Dylan K. Taylor
101dc1e1d7 fixed a couple of new phpstan errors 2020-09-04 01:44:21 +01:00
Dylan K. Taylor
0aee39027e Merge branch 'stable' into master
# Conflicts:
#	composer.lock
#	resources/vanilla
#	src/entity/Living.php
#	src/pocketmine/Player.php
#	src/pocketmine/VersionInfo.php
#	src/pocketmine/block/Potato.php
#	src/pocketmine/block/Sugarcane.php
#	src/pocketmine/entity/Entity.php
#	src/pocketmine/item/Item.php
#	src/pocketmine/level/format/Chunk.php
#	src/pocketmine/level/format/io/leveldb/LevelDB.php
#	src/world/generator/GeneratorRegisterTask.php
#	tests/phpstan/configs/check-explicit-mixed-baseline.neon
#	tests/phpstan/configs/l7-baseline.neon
#	tests/phpstan/configs/l8-baseline.neon
#	tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php
#	tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php
#	tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskPublishProgressRaceTest.php
2020-09-04 01:43:52 +01:00
Dylan K. Taylor
2ea7a9e216 3.15.2 is next 2020-09-03 15:09:52 +01:00
Dylan K. Taylor
9f60484212 Release 3.15.1 2020-09-03 15:09:52 +01:00
Dylan K. Taylor
3031d89ec5 Potato: drop 1-5 potatoes per harvest, not 1-4 2020-09-03 14:54:58 +01:00
Dylan K. Taylor
883e135bc0 Potato: drop poisonous potatoes when harvested, fixes #2830 2020-09-03 14:54:04 +01:00
Dylan K. Taylor
9365525efa ANTI CHEAT DOESN'T TRIP ON STAIRS ANYMORE 🎉
This commit fixes the 5+ years-old bug with the movement anti-cheat that everyone has complained about: sprinting on stairs causes rubberbanding.
This commit addresses this problem at long last, along with a handful of precursor commits that were necessary to fix this problem:
- dac76f0e0f14d9beae3e55491ab9f61353db1b68
- 89fe8f7f10716fed6193646984a7e2d28f6f6ce5
- 2d77b1e3649d11a6072fbd1dbf88574b6ebf1af3

Additionally, these changes now allow the anti-cheat to be accurate to at least 0.001 of a block, perhaps even better. I didn't commit a change to the threshold here, but it was instrumental to pinning down the exact nature of these bugs.

This closes #1475, at long last.
2020-09-03 14:27:11 +01:00
Dylan K. Taylor
17bee5e349 Fixed crash when using strings for flatworld layers
I don't know why this didn't show up sooner.
2020-09-03 14:15:37 +01:00
KingOfTurkey38
0af08a7375
Call BlockGrowEvent when sugarcane grows (#3780) 2020-08-31 16:03:38 +01:00
Stephen B
9cf8f608d8
Provide a default for health (#3806) 2020-08-30 21:50:11 +01:00
Dylan K. Taylor
09eb904f6b fixed explicit-mixed errors exposed by upgrading pocketmine/nbt 2020-08-28 15:47:41 +01:00
Dylan K. Taylor
eba888449d ExperienceUtils: handle an unhandled error condition explicitly
this would previously throw a TypeError on some negative numbers and crash. This should still crash, but this makes it explicit.
2020-08-25 21:28:29 +01:00
Dylan K. Taylor
dac76f0e0f Player: reset ySize when syncing movement 2020-08-23 18:31:25 +01:00
Dylan K. Taylor
89fe8f7f10 Entity: shift BB back down after trying to auto-step
this fixes bugs where the entity would jump in the air when walking on blocks like carpet. It also fixes a lot of the issues with stepping in the anti-cheat, allowing to reduce the error tolerance on movement processing.
2020-08-23 17:54:48 +01:00
Dylan K. Taylor
2d77b1e364 Entity: fixed recalculateCollisionBox not taking ySize into account
this was causing the movement anti-cheat to shit itself after the first movement because it used setPosition() on the player if the position wasn't exactly perfect (which obviously it never is perfect, because of fp rounding errors).
2020-08-23 17:51:36 +01:00
Dylan K. Taylor
e59a4296f8 LevelDB: fixed crash on corrupted level.dat 2020-08-22 19:36:22 +01:00
Dylan K. Taylor
ebd20f997d Merge commit 'e80ad22702f87f4a006ab16af3b46baae0490856' into master
# Conflicts:
#	build/php
#	resources/vanilla
#	src/pocketmine/Player.php
#	tests/plugins/DevTools
2020-08-21 21:39:17 +01:00
Dylan K. Taylor
1ed36573a1 BlockLegacyMetadata: added some coral constants 2020-08-21 17:46:44 +01:00
Dylan K. Taylor
c22ab37372 Player: pre-cancel PlayerInteractEvent when left-clicking a block in spectator mode
fixes #3778
2020-08-20 23:43:52 +01:00
Dylan K. Taylor
ddc5694b70 remove file accidentally committed in 0b05fd198733ac5d4eebf4cfa720c63a9efa070b 2020-08-17 20:25:30 +01:00
Dylan K. Taylor
40d49b88dd EntityFactory: remove requirement for $className as return type on creation funcs
since the removal of EntityFactory::create() this isn't needed anymore, since these creation functions are only used for creating entities loaded from disk.
2020-08-17 13:20:34 +01:00
Dylan T
bf401421fa
Implemented bamboo (#3762) 2020-08-16 20:39:51 +01:00
Dylan K. Taylor
62394811e3 Merge branch 'stable' into master
# Conflicts:
#	resources/vanilla
#	src/world/Explosion.php
2020-08-16 01:00:04 +01:00
Dylan K. Taylor
0506905875 clean up unused imports 2020-08-16 00:58:55 +01:00
Dylan K. Taylor
b53f88027e Explosion: fixed blocks getting updated too early
this bug became painfully obvious when testing bamboo. Detonating TNT near tall bamboo canes would result in bamboo canes not deleting themselves in some circumstances, because the non-destroyed parts of the cane would be updated before their supporting block was deleted, and subsequently would not be re-updated afterwards.
I think this bug should also reproduce with cacti, but I have not tested.
2020-08-16 00:09:17 +01:00
Dylan K. Taylor
a35ca1fa71 Merge branch 'stable' into master 2020-08-15 20:32:14 +01:00
Dylan K. Taylor
6920deac2c BlockFactory: regenerated TODO lists 2020-08-15 19:47:38 +01:00
Dylan T
730ee74a65
Use objects for internal structures created in TextFormat::toJSON() (#3747) 2020-08-15 18:30:26 +01:00
Dylan K. Taylor
dbd015b866 3.15.1 is next 2020-08-11 21:26:12 +01:00
Dylan K. Taylor
a498b0415a Release 3.15.0 2020-08-11 21:26:12 +01:00
Dylan K. Taylor
5b01cf72dd Data sync and version bump for 1.16.20
this version doesn't change any packets as far as I know, but it does change some packet content (most notably, some blockstates changed, which are troublesome when not in sync).
2020-08-11 21:17:11 +01:00
Dylan K. Taylor
11a0d9b502 3.14.4 is next 2020-08-11 21:06:38 +01:00
Dylan K. Taylor
a7fc245291 Release 3.14.3 2020-08-11 21:06:38 +01:00
Dylan K. Taylor
98db4c5200 Merge branch 'stable' into master
# Conflicts:
#	.gitmodules
#	composer.lock
#	resources/vanilla
#	src/network/mcpe/protocol/PlayerAuthInputPacket.php
#	src/pocketmine/Player.php
#	src/pocketmine/network/mcpe/protocol/LoginPacket.php
2020-08-10 17:55:49 +01:00
Dylan K. Taylor
192e31a397 Move code & docblock generation methods out of RegistryTrait
this allows generating a docblock / code for a registry without the class needing to exist or be populated yet, which makes code generation significantly less cumbersome.
2020-08-07 21:43:19 +01:00
Jack Honour
ff2a3baa8e
Implemented Jukebox & Records (#3742)
Co-authored-by: Dylan K. Taylor <odigiman@gmail.com>
2020-08-07 21:07:58 +01:00
Dylan K. Taylor
63f57841de PlayerAuthInputPacket: fixed yaw/pitch being the wrong way round, closes #3757 2020-08-07 19:50:49 +01:00
Dylan K. Taylor
2545897fc2 HorizontalFacingTrait: use a cheaper check for horizontal facing 2020-08-06 14:53:51 +01:00
Dylan K. Taylor
2b044195a5 Update for pocketmine/math Axis refactor 2020-08-06 14:38:54 +01:00
Dylan K. Taylor
7399e6944e Consistent fluency for block property setters 2020-08-06 13:46:08 +01:00
Dylan K. Taylor
3d4470ed8d added nether quartz ore to nether generation 2020-08-06 13:23:03 +01:00
Dylan K. Taylor
7bcfece11e Flat: use block names instead of legacy block IDs for hardcoded preset 2020-08-06 12:58:49 +01:00
Dylan K. Taylor
de9856151a Flat: remove useless field 2020-08-06 12:58:08 +01:00
Dylan K. Taylor
aa682a865e Allow injecting arbitrary preimage block for ore generation
this will be useful for nether ore generation.
2020-08-06 12:46:07 +01:00
Dylan K. Taylor
b725fcbdf2 IPlayer: remove circular dependency on Player
and remove useless Player->getPlayer()
2020-08-05 22:01:41 +01:00
Dylan K. Taylor
56ae3d01da block: added HorizontalFacingTrait and AnyFacingTrait
these are primarily intended for deduplication of code and ability to cross-reference. Don't expect this API to remain the same.
2020-08-05 21:17:37 +01:00
Dylan K. Taylor
060c300d50 Bed::setOccupied() no longer sets itself into the world
setting itself into the world is very annoying when trying to simply set up a blockstate.
2020-08-05 20:59:59 +01:00
Dylan K. Taylor
3f89bd7bff TaskHandler->getOwnerName() never returns NULL 2020-08-04 16:58:27 +01:00
Dylan K. Taylor
8da7e789fd LoginPacket: protocol cannot be NULL 2020-08-04 16:55:47 +01:00