Dylan K. Taylor
c47ecb55c0
Sign: Do not allow edits by any player except the one who placed it, and only while that player is online
...
signs now become finalized if:
- the player quits and rejoins (because the entity runtime ID of the player will not be the same)
- the chunk is unloaded and reloaded (because the tagged entity runtime ID is not saved).
closes #4198
2021-05-02 13:22:31 +01:00
Dylan K. Taylor
fac2bd3379
Liquid: mark getSmallestFlowDecay() as impure
...
this fixes two bogus PHPStan warnings.
2021-02-25 22:41:07 +00:00
Mohamed
1c43538238
Fix that a hoe gets damage applied to it, when it's used to break a block ( #3967 )
...
closes #3965
2020-12-11 21:14:52 +00: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
KingOfTurkey38
0af08a7375
Call BlockGrowEvent when sugarcane grows ( #3780 )
2020-08-31 16:03:38 +01:00
TheNewHEROBRINEX
8bba25f4f5
Fix wrong hardness value for Podzol ( #3709 )
2020-07-16 22:07:41 +01:00
Kang Ji-won
57b6451e16
Fix projectile motion being changed by the ladder, close #3602 ( #3631 )
2020-06-27 21:18:39 +01:00
Dylan K. Taylor
8480ee82ea
Player: track hardcoded window state, fixes crashes opening inventory on high-latency connections
2020-06-27 18:34:39 +01:00
Dylan K. Taylor
e990c5a0a5
Protocol changes for 1.16.0
2020-06-26 14:06:41 +01:00
Matt
c601352777
Fixed wrong meta value when pick cake block. ( #3593 )
2020-06-18 11:14:57 +01:00
Dylan K. Taylor
04191ec44a
Rail: specify type for local static variable
...
fixes a phpstan level 7 error
phpstan doesn't make any assumptions about local static variable types because analysing them would require too much work, apparently.
2020-06-15 22:47:20 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
3f2455f090
SnowLayer: fixed layer stacking, closes #2775
2020-05-31 17:38:24 +01:00
Dylan K. Taylor
9d26a224a2
DoublePlant: add flammability info, closes #2465
2020-05-31 17:04:50 +01:00
Dylan K. Taylor
71e0521286
Merge branch 'stable' into next-minor
...
# Conflicts:
# composer.lock
2020-05-31 14:43:53 +01:00
Muqsit Rayyan
4199c3796f
Water: Remove duplicate call to Entity->resetFallDistance() ( #3524 )
...
It's not clear what the intended goal of this code was, but the duplicate call is obviously useless.
2020-05-24 14:00:19 +01:00
Dylan K. Taylor
8c0d441a13
Merge branch 'stable' into next-minor
2020-05-17 10:03:17 +01:00
Dylan K. Taylor
35747874f6
Cocoa: fix drops, closes #3326
...
this doesn't really do a whole lot, but I want this issue off my tracker, it's worthless...
2020-05-14 00:56:39 +01:00
Dylan K. Taylor
a2543ff80d
Position: add getLevelNonNull()
...
this allows assuming that a position has a valid world in places where it's never expected to not be valid. Since this is the vast majority of usages, it eliminates a lot of possible null-pointer warnings given by static analysers.
TODO: Consider whether we can make Position->getLevel/World use this behaviour out of the box in the next major version.
2020-04-14 11:08:37 +01:00
Dylan K. Taylor
dbaf851be7
Merge branch 'stable' into next-minor
2020-02-27 16:51:06 +00:00
Dylan K. Taylor
2d7f37ac47
avoid direct mutation of Item->count field, use Item->pop() instead
...
I think this change was already applied on the master branch, but I don't remember for sure.
2020-02-23 17:37:25 +00:00
Dylan K. Taylor
f08e411cad
Merge branch 'stable' into next-minor
2020-02-10 11:40:08 +00:00
Dylan K. Taylor
bfce478e72
BlockFactory: keep the generic types for PHPStan, which actually understands it
2020-02-07 20:10:40 +00:00
Dylan K. Taylor
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
Dylan K. Taylor
e5a2cfb65f
avoid type juggling in conditions, always use explicit boolean conditions
2020-02-05 15:44:06 +00:00
Dylan K. Taylor
3f7e7352fb
added SplFixedArray generics for phpstan 0.12.9
2020-02-05 11:57:37 +00:00
Dylan K. Taylor
32d6ea0fba
Chest: do not crash on failure to fetch pair, closes #2701
...
isPaired() returning true is not semantically equivalent to getPair() returning non-null. getPair() might return null if the pair is inaccessible, such as when it's in an unloaded chunk (it doesn't check this yet, but it should).
For the sake of opening inventory, we don't care if the chest believes if it is paired, we care if there is actually a pair to be accessed for inventory viewing.
In addition, it's possible to create this broken-data scenario artificially by close()ing a chest tile without unpairing it first, because a tile doesn't know the difference between being closed due to unload and being destroyed.
2020-02-03 19:32:58 +00:00
Dylan K. Taylor
260ac47588
add some phpstan array types
2020-01-30 22:23:11 +00:00
Dylan K. Taylor
5c8a625d88
populate missing iterable value types in block namespace
2020-01-30 20:43:13 +00:00
Dylan K. Taylor
f624871b3f
strip extra blank lines (php-cs-fixer)
2020-01-22 14:50:29 +00:00
Dylan K. Taylor
9f44adf04a
pass 2, manual removal of incorrect non-nullable @param for nullable native types
2020-01-21 15:44:34 +00:00
Dylan K. Taylor
c4793241f5
Mass removal of useless @param/@return PHPDoc annotations, pass 1
2020-01-21 15:10:18 +00:00
Dylan K. Taylor
cfd975009e
Leaves: fix decay performance issue
...
this code was written with references in mind, but it looks like someone forgot the reference.
2020-01-20 11:52:11 +00:00
Dylan K. Taylor
ccbcc14600
Block: populate missing return type info
2020-01-19 17:02:03 +00:00
Dylan K. Taylor
07cb603231
Liquid: add missing return type to getFluidHeightPercent()
2020-01-17 13:58:54 +00:00
Dylan K. Taylor
f59094e6d6
Fence: add missing return type to canConnect()
2020-01-17 13:58:29 +00:00
Dylan K. Taylor
d8acae5495
Door: add missing return type to getFullDamage()
2020-01-17 13:57:56 +00:00
Dylan K. Taylor
239fe909be
CobblestoneWall: add missing return type for canConnect()
2020-01-17 13:57:29 +00:00
Dylan K. Taylor
1eedac87b2
added missing @var property types (reported by phpstan)
2020-01-09 14:13:54 +00:00
Dylan K. Taylor
494660102e
Replace empty() usages with count()
2019-12-18 11:23:24 +00:00
Dylan K. Taylor
870c66d1fe
Merge branch 'stable' into next-minor
2019-12-12 18:29:04 +00:00
Dylan K. Taylor
919534d978
EnderChest: fixed crash when plugins overwrite tile classes with incompatible ones
...
relates to 47a959dace95eafe79212a444e3f865475c6ee8e
2019-12-12 16:28:30 +00:00
Dylan K. Taylor
9a67192f74
Merge branch 'stable' into next-minor
2019-12-03 10:45:51 +00:00
Dylan K. Taylor
9be95bf263
Block: return [] instead of null in getMetadata() (return type is non-nullable)
2019-12-01 21:02:49 +00:00
Dylan K. Taylor
47a959dace
block: fix some possible crashes when plugins overwrite tile classes in bad ways
...
phpstan was complaining on level 2, and it's not wrong to ...
2019-12-01 09:29:22 +00:00
Dylan K. Taylor
0591458ef6
Merge branch 'stable' into next-minor
2019-10-22 18:49:22 +01:00
Dylan K. Taylor
c3872619cd
Block: mark boundingBox as nullable
2019-10-22 10:07:27 +01:00
Dylan K. Taylor
bb048fb361
Merge branch 'stable' into next-minor
2019-07-26 19:50:17 +01:00
Dylan K. Taylor
11fc16617a
Liquid: fix max cost calculation for flow direction search, closes #2995
2019-07-07 14:32:52 +01:00