45 Commits

Author SHA1 Message Date
Dylan K. Taylor
e1d80f05b1 Merge branch 'stable' into master 2020-08-03 20:14:46 +01:00
Dylan K. Taylor
1d18662d9b InventoryAction: replace isValid() with validate() which throws TransactionValidationException 2020-07-04 19:38:34 +01:00
Dylan K. Taylor
cf5e31c619 InventoryTransaction::execute() now throws exceptions instead of returning true/false 2020-07-01 14:08:28 +01:00
Dylan K. Taylor
29612cded3 CraftingTransaction: make CraftingManager injectable
this becomes a bit easier to unit-test.
2020-07-01 13:38:06 +01:00
Dylan K. Taylor
5b0964cec8 Merge commit '2dc3cf816'
# Conflicts:
#	resources/vanilla
2020-06-03 12:52:42 +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
f34753c496 CallbackInventoryListener: fix crash when any of the callbacks isn't provided 2020-05-03 21:48:32 +01:00
Dylan K. Taylor
6e6fffa461 Inventory: added removeAllListeners()
this isn't strictly necessary because it could be done by removeListeners(...getListeners()), but I think developers will appreciate not needing so much boilerplate code.
2020-05-03 21:44:45 +01:00
Dylan K. Taylor
adadd5423d move force-close crafting grid hack to InGamePacketHandler
the crafting transaction implementation has no business caring about this
2020-04-29 16:54:23 +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
08ac6a3c43 Convert CreativeInventory to singleton 2020-04-24 00:38:18 +01:00
Dylan K. Taylor
86e051b7bf Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3' 2020-04-18 17:33:05 +01:00
DaPigGuy
12e4e92894
Inventory: Pass old item(s) to inventory change listeners, closes #3323 (#3337) 2020-03-09 13:52:15 +00:00
Dylan K. Taylor
78394a336c Merge branch 'stable' 2020-02-25 20:45:39 +00:00
Dylan K. Taylor
7c2741e4f5 Inventory: eliminate remaining $send parameters 2020-02-23 21:59:51 +00:00
Dylan K. Taylor
b108fb61bf Inventory: drop $send params from setItem() and clear() 2020-02-12 13:34:35 +00:00
Dylan K. Taylor
1c06438cbb Inventory: remove final usage of $send parameter of setItem() and clear() 2020-02-12 13:33:23 +00:00
Dylan K. Taylor
4014f9a4f2 InventoryManager: be aware of client-side state when syncing slots
this eliminates feedback loops during client-initiated slot changes, and also makes it possible to have a SlotChangeAction anonymous from its initiator.
2020-02-11 21:12:18 +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
3a9e6bb612 CallbackInventoryChangeListener: fix use of tab instead of space 2020-02-07 19:28:43 +00:00
Dylan K. Taylor
fb1126797a Merge branch 'stable' 2020-02-07 18:13:55 +00:00
Dylan K. Taylor
85fdb7ec05 CallbackInventoryChangeListener: provide signature information for closures 2020-01-27 18:08:59 +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
cda1143a79 Merge branch 'stable' 2020-01-09 17:17:42 +00:00
Dylan K. Taylor
0f718ea28b Merge commit '8726604899d1a371567141e0831ed570d3233356' 2019-12-25 14:19:35 +00:00
Dylan K. Taylor
a9c09e4517 Merge branch 'next-minor' 2019-12-12 13:52:14 +00:00
Dylan K. Taylor
d3d7709ead Merge branch 'next-minor' 2019-12-03 11:55:45 +00:00
Dylan K. Taylor
6d24760174 Merge branch 'stable' 2019-10-20 21:25:39 +01:00
Dylan K. Taylor
6b22f68674 Player: remove sendDataPacket() 2019-08-20 15:50:34 +01:00
Dylan K. Taylor
d355d5b5b5 Remove hack to break cyclic dependency on double chests
Since these now reference positions instead of tiles, the cyclic dependency is removed.
2019-08-05 19:01:21 +01:00
Dylan K. Taylor
f0505c0284 Remove dead comments from PlayerInventory and PlayerCursorInventory
these aren't overrides anymore.
2019-08-05 18:53:46 +01:00
Dylan K. Taylor
9353f616a2 All BlockInventory descendents now have a Position as holder
this allows multiple problems to be solved:
1) Cycle between tile and inventory is now removed.
2) BlockInventory now provides a consistent API for plugins to get the block holding an inventory.
2019-08-05 18:50:29 +01:00
Dylan K. Taylor
5499ac620c Removed pocketmine subdirectory, map PSR-4 style 2019-07-30 19:14:57 +01:00
Shoghi Cervantes
5ea31b57ce First step to namespaces 2014-03-05 23:43:16 +01:00
Shoghi Cervantes
23b8fc32ff removed DocBlock header for logo 2014-03-05 11:15:47 +01:00
Michael Yoo
e2a77b05b7 Remove redundant closing tag 2014-02-06 21:20:29 +10:30
Shoghi Cervantes
a21bb5ab6d Revert "Revert "Roll back""
This reverts commit e1e804ffe35f9e6c6411b8ed6425af3f8e72f608.
2013-08-29 18:52:12 +02:00
Shoghi Cervantes
e1e804ffe3 Revert "Roll back"
This reverts commit 29504c09f263e73492c6ffecea201a81dcf3591d.
2013-08-28 20:55:58 +02:00
Shoghi Cervantes
093b86fa43 Fixed URL 2013-08-27 19:16:11 +02:00
Shoghi Cervantes
36ff8331b7 Updated headers 2013-08-27 18:16:57 +02:00
Shoghi Cervantes
e8c273fc10 Updated Chests [part1] 2013-08-27 02:08:04 +02:00
Shoghi Cervantes Pueyo
6d39f54591 Removed $server constructor arguments because of ServerAPI::request() 2013-03-29 19:49:33 +01:00
Shoghi Cervantes Pueyo
874571d572 Changes made to be compatible with the DevTools plugin 2013-02-14 20:37:16 +01:00