Commit Graph

770 Commits

Author SHA1 Message Date
fec42f16ba Level: properly define type of generator field 2020-11-01 14:36:05 +00:00
e990c5a0a5 Protocol changes for 1.16.0 2020-06-26 14:06:41 +01:00
d8d994351b phpstan 0.12.29 2020-06-14 16:25:55 +01:00
f24be2b055 Merge branch 'stable' into next-minor
# Conflicts:
#	src/pocketmine/Player.php
#	src/pocketmine/block/SnowLayer.php
2020-06-01 13:42:59 +01:00
42e14f749e Do not blanket-ban all inventory transactions in spectator mode, fixes #2627
instead, we cancel the appropriate events before they are called, so that plugins can uncancel them if they choose.
2020-05-31 16:32:06 +01:00
484557935e Level: remove dead block placement code (player movements are now always processed immediately, just not immediately broadcasted) 2020-05-31 16:06:48 +01:00
58e32086c0 Level: Updated TIME_* constants (#3385)
- Added Level::TIME_NOON
- Added Level::TIME_MIDNIGHT
- Changed values of Level::TIME_DAY and Level::TIME_NIGHT
2020-05-17 10:10:35 +01:00
8c0d441a13 Merge branch 'stable' into next-minor 2020-05-17 10:03:17 +01:00
ad2a39bf13 Merge #3489: fix spawn protection check for placement checking the wrong block, close #3488, close #3489 2020-05-14 00:30:11 +01:00
8e1b3edd2c Merge branch 'stable' into next-minor 2020-04-25 12:06:52 +01:00
34a3e0d8b1 Level: fix sneaking use-item logic (thanks @95CivicSi)
inspired by, but closes #3403
fixes #3401
fixes #2539
fixes #1904
2020-04-19 15:38:12 +01:00
f8ce01e2fd ItemFactory: extract fromStringSingle() from fromString()
on PM4, the multiple functionality is removed, but on PM3 this is a problem for phpstan.
2020-03-13 17:54:25 +00:00
dbaf851be7 Merge branch 'stable' into next-minor 2020-02-27 16:51:06 +00:00
8ac7f7f11f Level: fix type of randomTickBlocks and friends 2020-02-17 15:13:40 +00:00
15b76a24b7 scrub useless phpdoc 2020-02-10 12:21:07 +00:00
f08e411cad Merge branch 'stable' into next-minor 2020-02-10 11:40:08 +00:00
86fc33fe26 Level: add phpstan generics to getNearestEntity() 2020-02-06 14:20:19 +00:00
495bfda044 Drop a bunch of invalid null defaults
phpstan doesn't report these out of the box, for reasons I'm not clear on. It's also not clear if having null defaults has any effect on nullability behaviour, so they are best removed. In addition, these would be problematic on 7.4.
2020-02-05 20:53:54 +00:00
25554f0d61 Level: remove useless code from unload() 2020-02-05 20:39:38 +00:00
3f7e7352fb added SplFixedArray generics for phpstan 0.12.9 2020-02-05 11:57:37 +00:00
a5764b3ae9 populate missing array value types in level namespace 2020-01-30 21:01:59 +00:00
f624871b3f strip extra blank lines (php-cs-fixer) 2020-01-22 14:50:29 +00:00
9f44adf04a pass 2, manual removal of incorrect non-nullable @param for nullable native types 2020-01-21 15:44:34 +00:00
c4793241f5 Mass removal of useless @param/@return PHPDoc annotations, pass 1 2020-01-21 15:10:18 +00:00
cd36af46bf Level: populate missing type information 2020-01-19 18:44:41 +00:00
8794292788 remove &$var reference notations in phpdoc
this isn't required by the spec and PHPStan chokes on it. I was previously having it ignore these errors, but it turns out that PHPStan is not making use of extended typeinfo provided if it can't parse the tag, which is problematic on level 6 and also a problem for array-of-type. Therefore, we are going to have to take the hit.
2020-01-11 21:20:55 +00:00
1eedac87b2 added missing @var property types (reported by phpstan) 2020-01-09 14:13:54 +00:00
494660102e Replace empty() usages with count() 2019-12-18 11:23:24 +00:00
1a467420e3 Merge branch 'stable' into next-minor 2019-12-12 13:07:02 +00:00
62069bc7af Level: fix return type content doc comment for getAdjacentChunks() 2019-12-12 12:18:35 +00:00
9a67192f74 Merge branch 'stable' into next-minor 2019-12-03 10:45:51 +00:00
dbab8b5733 Level: fixed type doc of tickRateTime field 2019-12-01 21:21:42 +00:00
c237ff538c Merge branch 'stable' into next-minor 2019-08-02 16:32:00 +01:00
8f5eb7ef37 Level: fix memory leak on scheduled blockupdate in unloaded chunk 2019-07-30 15:37:24 +01:00
23b00bea5b Merge branch 'stable' into next-minor 2019-07-29 17:31:06 +01:00
2d3562c687 World: fixed scheduled updates causing chunk loading
this probably needs to be backported.
2019-07-29 17:21:54 +01:00
bb048fb361 Merge branch 'stable' into next-minor 2019-07-26 19:50:17 +01:00
c58a1bf9b7 Protocol changes for 1.12.0.28 2019-07-12 19:00:15 +01:00
6afc689529 Add Level->getTimeOfDay(), closes #2908 (#2979) 2019-06-22 16:00:18 +01:00
cb49f1e835 fixed air being breakable by creative players
closes #2851
2019-05-02 16:25:23 +01:00
3878f58847 Level: fixed crash when time overflows
this can be triggered by a plugin setting time to PHP_INT_MAX

fixes CA 2346977
2019-05-02 14:22:01 +01:00
d850a84d0d Level: clean up and remove checkTime() 2019-04-26 14:15:41 +01:00
3b103dcd62 Level: use isInWorld() where appropriate 2019-04-26 12:26:01 +01:00
48dfc5b232 Level: reduce complexity of populateChunk() 2019-04-26 12:18:00 +01:00
1e5941c98c Level: Properly report world save timings
this wasn't including chunk unloading in the world save timings.
2019-04-18 19:39:23 +01:00
612e9e162c Fixed worlds with unknown generators silently getting wrong generator, closes #2860 2019-04-06 15:17:36 +01:00
8e9f787d33 Implement runtimeID table randomization, closes #2841 2019-03-29 14:35:06 +00:00
562179bdd6 Backport 58cafc853f: s/level/world (strings only)
we should look at doing this for code too, but for now I'm not planning to break everyone's plugins.
2019-03-10 11:35:46 +00:00
99606bbe23 beware possible API break 2019-03-09 19:33:46 +00:00
0659d2fbef Backport 6bd43a8215: Firehose auto-tick-rate anti-feature, closes #2665 2019-03-09 19:20:53 +00:00