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
604900d4c5
Merge branch 'stable' into next-minor
2020-04-14 01:38:01 +01:00
Dylan K. Taylor
d4dc1c8a0c
AttributeMap: be aware of possible NULL offset in ArrayAccess
...
reported by phpstan 0.12.17
2020-03-18 12:59:01 +00:00
Dylan K. Taylor
b8caf34e62
Merge branch 'stable' into next-minor
2020-03-10 12:45:00 +00:00
Dylan K. Taylor
456d9a722a
reduce some doc comments to single line
2020-03-10 12:36:19 +00:00
Dylan K. Taylor
db215283a2
Effect: add desc for color parameter
2020-03-10 12:28:44 +00:00
Dylan K. Taylor
c19ab97610
AddActorPacket: move BC hack to higher level
...
we shouldn't hack the protocol impl for BC.
2020-02-27 17:37:45 +00:00
Dylan K. Taylor
dbaf851be7
Merge branch 'stable' into next-minor
2020-02-27 16:51:06 +00:00
Dylan K. Taylor
365d4a1592
better fix for 1.14.30 movement bug
2020-02-23 19:31:32 +00:00
Dylan K. Taylor
2f1fad2745
Bucket: implement MaybeConsumable, fixes #3306
...
this is a nauseating fix, but it's only needed for stable.
2020-02-21 17:49:55 +00:00
Dylan K. Taylor
44182dccbd
Human: an additional hack for MoveActor(Absolute|Delta)Packet on 1.14.30+
...
before anyone asks, we still can't use this for regular player movement, because it would cause the player to receive their own movement. This was OK with MoveActor, but isn't OK with MovePlayer.
2020-02-21 12:35:17 +00:00
Dylan K. Taylor
7b7dfc36d1
Living: fixed broken @var tag
2020-02-14 08:17:51 +00:00
Dylan K. Taylor
f08e411cad
Merge branch 'stable' into next-minor
2020-02-10 11:40:08 +00:00
Dylan K. Taylor
da3742b39e
Remove useless typecasts
2020-02-06 16:00:57 +00:00
Dylan K. Taylor
d26fcf7dee
Removed useless casts() from min/max calls
2020-02-06 15:58:27 +00:00
Dylan K. Taylor
037c34d961
Living: fixed bad @var confusing PHPStan
2020-02-05 20:58:38 +00:00
Dylan K. Taylor
914450c30b
Entity: remove useless assert()
...
namedtag is always non-null here, and if it isn't, it should just catch fire the normal way.
2020-02-05 20:40:34 +00:00
Dylan K. Taylor
fa82cb26d8
added native types to closures (phpstan-strict-rules)
2020-02-05 16:35:10 +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
88afedd1e8
Human: avoid overwriting non-foreach vars in foreach
2020-02-05 12:59:59 +00:00
Dylan K. Taylor
799183e13e
make use of phpstan class-string in some areas
2020-01-30 22:23:11 +00:00
Dylan K. Taylor
260ac47588
add some phpstan array types
2020-01-30 22:23:11 +00:00
Dylan K. Taylor
839a789180
populate missing array value types in entity namespace
2020-01-30 20:50:24 +00:00
Dylan K. Taylor
f624871b3f
strip extra blank lines (php-cs-fixer)
2020-01-22 14:50:29 +00:00
Dylan K. Taylor
9cd6b3e1c7
fix remaining multiline @var annotations
2020-01-22 14:44:36 +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
205e47c0c4
entity: populate missing return type information
2020-01-19 17:03:54 +00:00
Dylan K. Taylor
1e624e7bb9
Attribute: add missing @return $this annotations
2020-01-18 17:50:58 +00:00
Dylan K. Taylor
d9bbab54f4
Entity: fixing position and velocity sync on start/stop movement, closes #3133
...
the delta for velocity sync is WAYYYYYY too big, but that's a task for another commit.
2020-01-14 13:08:38 +00:00
Dylan K. Taylor
5bded9cff8
AttributeMap: add phpstan generic parameters for ArrayAccess
2020-01-11 23:03:21 +00:00
Dylan K. Taylor
17720041a3
phpdoc: populate missing parameter typeinfo
2020-01-11 21:53:24 +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
a908197907
Effect: document that duration is expected in ticks
2019-12-29 19:03:32 +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
1370930ea9
Entity: remove redundant defaults from lastX lastY lastZ, remove nullability
...
these fields are never null because they are initialized in the constructor, and they are never written to with null nor ever expected to be null.
2019-12-12 16:14:30 +00:00
Dylan K. Taylor
1a467420e3
Merge branch 'stable' into next-minor
2019-12-12 13:07:02 +00:00
Dylan K. Taylor
6b61efcfc8
remove unused imports
2019-12-09 19:49:21 +00:00
Dylan K. Taylor
02fcfcc383
Merge branch 'stable' into next-minor
2019-12-09 10:47:53 +00:00
Dylan K. Taylor
d20d9fb689
Merge branch 'stable' into drew-1.13
2019-12-05 10:59:53 +00:00
Dylan K. Taylor
9a67192f74
Merge branch 'stable' into next-minor
2019-12-03 10:45:51 +00:00
Dylan K. Taylor
dbbe1f2d5c
Revert "Entity: remove redundant check from spawnTo()"
...
This reverts commit 3028832cd35c53937bb6502f74d3ad53646b12a7.
When I created this commit, I made the flawed assumption that spawnTo()
would not be used by plugins. In addition, I was not aware that there
are some usages of spawnTo() in the core which do not check for chunk
usage, such as in Player->showPlayer().
This caused a collection of problems including memory leaks and crashes
due to disconnecting players not removing their references from viewed
entities.
The reverted commit may be the cause of #3178 .
2019-12-03 10:41:13 +00:00
Stephen
e38c0c0fe1
Merge remote-tracking branch 'upstream/stable' into stable
2019-12-01 21:55:50 -05:00
Dylan K. Taylor
25e6cb74b3
Squid: fixed type doc comment of swimDirection field
2019-12-01 21:06:03 +00:00
Dylan K. Taylor
8d2e59222e
Entity: fixed not calculating surrounding blocks on entity creation
...
it's unclear if this was actually causing any bugs, but if it was it would likely manifest in the form of, for example, not burning in lava.
2019-12-01 21:05:36 +00:00
Dylan K. Taylor
cd778661c2
Entity: fixed type doc comment for blocksAround field
2019-12-01 21:03:57 +00:00
Dylan K. Taylor
c2afc05e7c
Entity: fix type doc comment for static knownEntities field
2019-12-01 21:03:29 +00:00
SOFe
cb76f8a5df
Merge branch 'stable' into next-minor
2019-11-21 23:21:16 +08:00
Stephen
be9c413a9e
Added network components for skins, to collect instead of throw out data
2019-11-20 21:43:41 -05:00