69 Commits

Author SHA1 Message Date
Dylan K. Taylor
86db3af896 remove utils\Color, use new pocketmine/color class
we're so close to separating protocol from core !!!
2020-05-14 20:38:08 +01:00
Dylan K. Taylor
4437756987 Inventory: reduce API duplication by using a Set for viewers 2020-05-14 14:13:28 +01:00
Dylan K. Taylor
6b037d6a4c RuntimeBlockMapping: these IDs are not static any more 2020-05-11 12:40:55 +01:00
Dylan K. Taylor
81f982a8d9 remove hardcoded legacy entity type ID mapping, load from resources instead 2020-05-04 13:47:39 +01:00
Dylan K. Taylor
0eec536f97 Spawnable: remove unused field 2020-05-04 13:10:23 +01:00
Dylan K. Taylor
a73c54bdd0 making tile spawn compound cache use CacheableNbt instead of strings 2020-05-04 12:35:13 +01:00
Dylan K. Taylor
6f38031121 Liquid: do not schedule delayed blockupdate when hardening occurs on nearby blockupdate
fix #3390
fix #3392
2020-04-30 09:35:55 +01:00
Dylan K. Taylor
a97cafd4f6 moving serializers into protocol namespace 2020-04-27 13:54:39 +01:00
Dylan K. Taylor
ac5cf2443e convert TileFactory to singleton 2020-04-26 01:11:30 +01:00
Dylan K. Taylor
6dd31cc3f5 break cycle between block and inventory packages 2020-04-24 23:53:49 +01:00
Dylan K. Taylor
4fbf4dcdc6 Rename InventoryChangeListener -> InventoryListener 2020-04-24 23:44:38 +01:00
Dylan K. Taylor
7d9df6af6f Convert EntityFactory to singleton 2020-04-24 22:43:02 +01:00
Dylan K. Taylor
287bf4274f move RuntimeBlockMapping to convert package 2020-04-24 12:42:43 +01:00
Dylan K. Taylor
5cc03775d3 added a SingletonTrait to reduce code duplication 2020-04-24 00:31:55 +01:00
Dylan K. Taylor
5a94af40e2 Convert ItemFactory to singleton 2020-04-24 00:18:31 +01:00
Dylan K. Taylor
13d784cd0c Convert BlockFactory to singleton 2020-04-23 23:45:13 +01:00
Dylan K. Taylor
aa1828aa98 RuntimeBlockMapping is now a singleton instead of static class
this prepares for a fully dynamic block mapper, as well as allowing a small performance improvement to chunk encoding by eliding the constant lazy-init checks.
2020-04-23 21:09:58 +01:00
Dylan K. Taylor
86e051b7bf Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3' 2020-04-18 17:33:05 +01:00
Dylan K. Taylor
995309424e updated pocketmine/nbt dependency
this is going to need work on exception handling, but right now it's so inconsistent that it doesn't matter anyway.
2020-03-04 17:53:37 +00:00
Dylan K. Taylor
7c2741e4f5 Inventory: eliminate remaining $send parameters 2020-02-23 21:59:51 +00:00
Dylan K. Taylor
fd675449e9 BlockFactory: fill blastResistance with float(0)
technically there wasn't anything wrong with this code, but it caused the type inference to report incompatibility, and I can't be bothered to report a PHPStan bug.
2020-02-07 22:06:34 +00:00
Dylan K. Taylor
d2aca6023b add native return types to closures (for phpstan) 2020-02-07 22:05:15 +00:00
Dylan K. Taylor
aac7da6c96 eliminate remaining empty() usages 2020-02-07 21:51:50 +00:00
Dylan K. Taylor
347b94b284 Merge branch 'stable' 2020-02-07 20:18:17 +00:00
Dylan K. Taylor
fb1126797a Merge branch 'stable' 2020-02-07 18:13:55 +00:00
Dylan K. Taylor
e1eb9186fe Merge branch 'stable' 2020-02-03 19:57:21 +00:00
Dylan K. Taylor
356ed5f1de DyeColor: fix PHP 7.2 compatibility 2020-02-01 20:50:16 +00:00
Dylan K. Taylor
9c33ea8dd1 EnumTrait: use a better method to initialize enums
this method is simpler, and is also safe at the native type level.
Coincidentally, it also eliminates 30 PHPStan false-positives.
2020-02-01 20:33:30 +00:00
Dylan K. Taylor
89c6da13ac phpstan: use more class-string 2020-01-31 22:05:33 +00:00
Dylan K. Taylor
f65bf76fd8 Merge commit '799183e13e61e89cc6820ad3132a4147454017c6'
# Conflicts:
#	resources/vanilla
#	src/Server.php
#	src/pocketmine/entity/Entity.php
#	src/pocketmine/level/format/io/LevelProviderManager.php
#	src/pocketmine/tile/Tile.php
#	src/world/generator/GeneratorManager.php
2020-01-31 21:26:40 +00:00
Dylan K. Taylor
cb16f5c142 Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'
# Conflicts:
#	resources/vanilla
#	src/Server.php
#	src/lang/Language.php
#	src/network/mcpe/protocol/AddItemActorPacket.php
#	src/network/mcpe/protocol/AddPlayerPacket.php
#	src/network/mcpe/protocol/SetActorDataPacket.php
#	src/network/mcpe/serializer/NetworkBinaryStream.php
#	src/permission/Permission.php
#	src/pocketmine/block/Leaves.php
#	src/pocketmine/entity/DataPropertyManager.php
#	src/pocketmine/entity/Entity.php
#	src/pocketmine/item/Banner.php
#	src/pocketmine/item/Item.php
#	src/pocketmine/level/format/io/LevelProvider.php
#	src/pocketmine/level/format/io/LevelProviderManager.php
#	src/pocketmine/network/mcpe/protocol/AddActorPacket.php
#	src/pocketmine/network/mcpe/protocol/LoginPacket.php
#	src/pocketmine/tile/Banner.php
#	src/scheduler/BulkCurlTask.php
#	src/updater/AutoUpdater.php
#	src/utils/Config.php
#	src/utils/Utils.php
#	src/world/generator/Flat.php
#	src/world/generator/Generator.php
2020-01-31 21:07:34 +00:00
Dylan K. Taylor
1ae7960fc4 Merge commit '92a752053df598e5fe9366601bef070d967374fc'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/tile/Banner.php
#	src/pocketmine/tile/Sign.php
#	src/pocketmine/tile/Tile.php
2020-01-31 19:50:33 +00:00
Dylan K. Taylor
1388a2287a Merge commit '5c8a625d88e511a6ebad765714b75f1a86dfd37f' 2020-01-31 18:50:23 +00:00
Dylan K. Taylor
42014311c5 BrewingStand: added missing void return type 2020-01-27 18:08:08 +00:00
Dylan K. Taylor
5955ff5393 fix phpdoc spacing screwed up by phpstorm 2020-01-22 15:20:50 +00:00
Dylan K. Taylor
055b13a6cf strip extra blank lines (php-cs-fixer) 2020-01-22 15:14:10 +00:00
Dylan K. Taylor
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00:00
Dylan K. Taylor
3ee6887792 populate remaining missing return types, using native returns where possible
this is done separately to stable so that stable changes can be integrated easily using an empty merge.
2020-01-19 10:26:35 +00:00
Dylan K. Taylor
47ceb7fee2 Merge commit '07cb603231d143314c2bb69d6e3ee0dc281523a0' 2020-01-18 18:19:13 +00:00
Dylan K. Taylor
0e1cea043a added some phpstan-specific generic type annotations 2020-01-13 15:05:02 +00:00
Dylan K. Taylor
eba246eab3 SignText: provide typeinfo for checkLineIndex 2020-01-11 22:39:42 +00:00
Dylan K. Taylor
aba71762e9 master-specific @var annotations 2020-01-09 17:50:01 +00:00
Dylan K. Taylor
0f718ea28b Merge commit '8726604899d1a371567141e0831ed570d3233356' 2019-12-25 14:19:35 +00:00
Dylan K. Taylor
7d89f91fea Leaves: fixed decay
detected by phpstan level 4
2019-12-04 23:21:01 +00:00
Dylan K. Taylor
e35a92d8e8 tile\Banner: fixed bad default value for patterns field
detected by PHPStan on level 3
2019-12-04 18:25:08 +00:00
Dylan K. Taylor
f302517a2d Door: fix deserialization of top flag
it's not clear what bugs this caused, if any, but nonetheless it is incorrect.
2019-12-03 21:04:04 +00:00
Dylan K. Taylor
ebbb99b96b Merge branch 'next-minor' 2019-10-22 19:05:11 +01:00
Dylan K. Taylor
6a4ae4cb94 remove position parameters from BlockFactory::get() and BlockFactory::fromFullBlock() 2019-08-24 17:19:27 +01:00
Dylan K. Taylor
75a2d79671 convert more constant interfaces to final classes, close #2885 2019-08-24 15:39:23 +01:00
Dylan K. Taylor
794c7b2469 clean up imports 2019-08-20 15:59:27 +01:00