Commit Graph

22 Commits

Author SHA1 Message Date
6e2685cbbb Merge branch 'next-minor' into next-major 2022-12-18 22:25:32 +00:00
b2017c8462 and more 2022-12-18 22:14:31 +00:00
f6c9bf5cd1 Merge branch 'next-minor' into next-major 2022-07-20 20:55:33 +01:00
24e72ec109 ContainerTrait: improve performance of block destroy hook
this was creating useless vector3s for every iteration, as well as repeatedly invoking Position->getWorld() for no reason.
2022-07-20 20:39:37 +01:00
6964012464 fix a bunch of bugs 2022-06-23 19:34:08 +01:00
aa9f8781ff Merge branch 'next-minor' into next-major 2022-06-07 19:56:26 +01:00
f2dc9187f0 Use covariant types for InventoryHolder and Container implementors 2022-06-05 18:49:48 +01:00
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
5a98b08ee8 Fixed several crashes on bad data due to inadequate TAG_List type checks 2022-04-19 16:48:18 +01:00
79d1feff9c Replace disallowed operators in src/block/ 2022-01-20 16:57:09 +00:00
3c6146b5e0 ContainerTrait: avoid absurdly inefficient use of setItem()
this substantially improves the performance of loading containers such as chests.
2022-01-01 15:05:32 +00:00
7fd712c1ff Refactor Block & Tile: getPos() to getPosition() (#4395)
this also changes the name of the class property 'pos' to 'position' as well as Block->getPosOffset() to Block->getPositionOffset()
2021-08-23 14:01:32 +01:00
279abb871d Remove all usages of CompoundTag->hasTag()
in pretty much every case, these usages really wanted to read the tag's contents anyway, which can be combined with a getTag() and instanceof call for more concise and static analysis friendly code.
In the few cases where the tag contents wasn't needed, it still wanted to check the type, which, again, can be done in a more static analysis friendly way by just using getTag() and instanceof.
2020-07-10 21:01:43 +01:00
670ad9eb9d Position: rename getWorldNonNull() to getWorld(), remove original getWorld() 2020-06-29 21:19:46 +01:00
9484220bd5 ContainerTrait: use a static-analysis-friendly way to read NBT, fixes 4 phpstan level 8 errors 2020-06-27 13:09:05 +01:00
337addf1de Eradicate remaining usages of public Position->world field
and as an added bonus, ditch a bunch of extra phpstan errors
2020-05-19 19:14:56 +01:00
4437756987 Inventory: reduce API duplication by using a Set for viewers 2020-05-14 14:13:28 +01:00
4fbf4dcdc6 Rename InventoryChangeListener -> InventoryListener 2020-04-24 23:44:38 +01:00
7c2741e4f5 Inventory: eliminate remaining $send parameters 2020-02-23 21:59:51 +00:00
67bcc1c0fb phpdoc armageddon for master, pass 1 2020-01-22 11:55:03 +00:00
4e5b296c8c Tiles now encapsulate positions instead of extending them 2019-08-05 19:33:34 +01:00
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00