Dylan K. Taylor
554f96bc24
InventoryManager: Defer opening new windows to the client until the window close handshake has been completed
...
fixes #5021 and probably a bunch of other inventory related glitches
When the server initiates a window close, it does so by sending a ContainerClose to the client, which causes the
client to behave as if it initiated the close itself. It responds by sending a ContainerClose back to the server,
which the server is then expected to respond to.
Sending the client a new window before sending this final response creates buggy behaviour on the client, which
is problematic when switching windows. Therefore, we defer sending any new windows until after the client
responds to our window close instruction, so that we can complete the window handshake correctly.
This is a pile of complicated garbage that only exists because Mojang overengineered the process of opening and
closing inventory windows.
2022-05-20 16:54:15 +01:00
Dylan K. Taylor
4e777572c9
fix CS
2022-03-23 13:28:21 +00:00
Dylan K. Taylor
90a8595a40
Check for mismatched inventory slot predictions in transactions
...
this should limit the problems caused by mismatched gameplay features that result in ghost items, such as #4896 .
2022-03-22 17:42:19 +00:00
Dylan K. Taylor
3232a83965
InventoryManager: beware possible crash due to invalid items
2022-02-22 16:50:36 +00:00
Dylan K. Taylor
4f25ab10e9
InventoryManager: Do not sync slots the client correctly predicted during using items
...
closes #4825
2022-02-22 16:46:23 +00:00
Dylan K. Taylor
be1996752a
Replace disallowed operators in src/network/
2022-01-20 19:11:32 +00:00
Dylan K. Taylor
6fdcfb01c8
Seal up main inventory open/close logic inside InventoryManager where it belongs
2021-11-08 22:58:06 +00:00
Dylan K. Taylor
45edb94607
Crafting tables now work the same way as anvils and enchanting tables
...
Removing almost all special-case logic for crafting tables.
2021-11-07 16:20:07 +00:00
Dylan K. Taylor
e131c2cefa
Drop pocketmine/spl
2021-11-02 16:08:29 +00:00
Dylan K. Taylor
88b7389080
InventoryManager: reduce code duplication
2021-10-29 15:37:52 +01:00
Dylan K. Taylor
c773e43eda
Updated BedrockProtocol to pmmp/BedrockProtocol@97fa88e9ef
2021-10-23 01:16:45 +01:00
Rush2929
58bc9332cd
Workaround for offhand sync ( #4359 )
...
fixes #4231
2021-08-12 23:27:53 +01:00
Dylan T
27e0ecf7ee
Implemented Blast Furnace and Smoker ( #4362 )
2021-08-12 23:27:05 +01:00
Dylan K. Taylor
b8ebf8936e
InventoryManager: fix container open callbacks not working
...
this was reported to me on socials by multiple different people, but nobody reported an issue so I almost forgot. >.<
2021-06-26 21:21:23 +01:00
Dylan K. Taylor
652de2632a
Rough OffHand implementation
...
this doesn't do stuff like taking arrows from offhand yet.
2021-05-05 14:46:51 +01:00
Dylan K. Taylor
593a8ac529
Added Loom blocks
...
these don't support doing patterns yet, but their inventories work.
2021-04-29 19:51:09 +01:00
Dylan K. Taylor
8364bc51ac
...
2021-04-27 14:47:11 +01:00
Dylan K. Taylor
7ce77713dd
InventoryManager: add a mechanism to allow plugins to inject their own container open packet creators
...
closes #4008
2021-04-27 14:40:43 +01:00
Dylan K. Taylor
1e6d97a157
Merge branch 'stable'
2021-04-07 21:25:39 +01:00
Dylan K. Taylor
a7dbc2c77b
Merge tag '3.17.7'
2021-03-14 19:29:32 +00:00
Dylan K. Taylor
c70c0b55df
Separate held item index change listener logic from PlayerInventory
2021-01-12 16:44:25 +00:00
Dylan K. Taylor
af1fe7c293
Merge branch 'stable'
2020-11-21 21:13:48 +00:00
Dylan K. Taylor
d7f7e1c4ff
InventoryManager: remove useless repeated code
2020-10-06 18:14:46 +01:00
Dylan K. Taylor
7e6adc41f0
Merge 1.16 support into PM4 (with changes)
2020-06-26 22:21:09 +01:00
Dylan K. Taylor
0397204c68
network/mcpe: imports cleanup
2020-04-27 12:56:28 +01:00
Dylan K. Taylor
6dd31cc3f5
break cycle between block and inventory packages
2020-04-24 23:53:49 +01:00
Dylan K. Taylor
08ac6a3c43
Convert CreativeInventory to singleton
2020-04-24 00:38:18 +01:00
Dylan K. Taylor
18d48869a0
the great airgapping of recipes and itemstacks
2020-04-23 14:11:48 +01:00
Dylan K. Taylor
95eddbdd74
InventoryManager: move add/remove logic to separate functions
2020-02-12 17:36:29 +00:00
Dylan K. Taylor
55e3b9ed91
InventoryManager: avoid feedback loop when closing inventory
2020-02-12 16:35:57 +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
c85c1c3c3f
Merge commit '82d9e481d2a0a389fbbc6dfd3672fc366127febc'
2019-12-11 23:06:35 +00:00
Dylan K. Taylor
399f9242e0
InventoryManager: avoid use of PlayerHotbarPacket
...
it doesn't work so well when the selected slot is empty.
2019-08-10 18:09:38 +01:00
Dylan K. Taylor
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00