Dylan K. Taylor
387c13beff
InGamePacketHandler: fixed invalid JSON being treated as form close
2022-01-21 18:32:58 +00:00
Dylan K. Taylor
56fe71d939
InGamePacketHandler: fixed crash in form handling when invalid JSON is given
2022-01-21 17:34:13 +00:00
Dylan K. Taylor
f126479c37
InGamePacketHandler: check the validity of facing values given by the client
2022-01-13 21:21:15 +00:00
Dylan T
3ed57ce49a
Merge pull request from GHSA-p62j-hrxm-xcxf
...
This checks the following things:
- Validity of UTF-8 encoding of title, author, and page content
- Maximum soft and hard lengths of title, author, and page content (soft
limits may be bypassed by uncancelling PlayerEditBookEvent; hard
limits may not be bypassed)
- Maximum number of pages. Books with more than 50 pages may still be
edited, but may not have new pages added.
2022-01-04 20:39:02 +00:00
Dylan K. Taylor
e43e0189df
InGamePacketHandler: do not pass bare integers from BookEditPacket directly into event
...
while these currently happen to be identical, they may not be in the future.
Really this should be represented by an enum.
2022-01-03 20:20:32 +00:00
Covered123
bcc0f1e733
Fixed desynchronization of hunger when cancelling food-related events ( #4691 )
2022-01-03 19:11:32 +00:00
Dylan K. Taylor
c7beb0a702
Clean up inventory auto close mess from PM3
...
on PM3 there was no concept of 'current window', we had no idea which window the player was actually looking at.
2021-11-08 23:51:25 +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
Hashim
f066199971
Implement emote support ( #4523 )
2021-11-02 23:04:55 +00:00
Dylan K. Taylor
c580bb2434
InGamePacketHandler: mark player as not using item in more cases
...
fixes #4355
2021-10-31 14:41:31 +00:00
Dylan K. Taylor
04aedc6494
Updated BedrockProtocol
2021-10-23 23:54:49 +01:00
Dylan K. Taylor
c773e43eda
Updated BedrockProtocol to pmmp/BedrockProtocol@97fa88e9ef
2021-10-23 01:16:45 +01:00
Dylan K. Taylor
817ab88c70
Properly handle errors decoding network item NBT
...
since the NBT is now decoded immediately now, any incorrect NBT will cause exceptions to be thrown that we weren't handling, causing server crashes.
2021-10-05 19:10:55 +01:00
Dylan K. Taylor
7701e1ff98
InGamePacketHandler: fix regression in movement handling since 82c8fa696a2e8609d8ae086c52f96abe7c7705b6
...
fixes #4291
fixes #4398
2021-09-10 16:52:46 +01:00
Dylan K. Taylor
c5abae9eaa
Fixed merge error in bbf3f4c476bb203f399b7631a7d69013980bbae8
...
the corresponding code on PM3 was originally removed here: 485f573955 (diff-cf181dff0292664e4aa13c8a1731dc62131489fa404f4ac1357493d320264cceL2263)
2021-07-17 22:59:45 +01:00
Dylan K. Taylor
9d1b2c839d
this managed to get lost in the merge
2021-07-09 19:39:15 +01:00
Dylan K. Taylor
0910054c41
NetworkSession: Fixed InventoryManager nullability disaster
...
fixes #4277
fixes #4275
fixes #3139
2021-06-26 17:44:42 +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
66fdf526d4
Remove GarbageServerboundPacket
...
it's not the protocol implementation's job to decide what's garbage. It should only indicate that a packet MAY be sent by the client. It should then be up to the handler to decide what to do with it.
2021-04-19 01:07:21 +01:00
Dylan K. Taylor
6845cbb2b3
Silence LevelSoundEventPacket noise
2021-04-19 01:02:22 +01:00
Dylan K. Taylor
1e6d97a157
Merge branch 'stable'
2021-04-07 21:25:39 +01:00
Dylan K. Taylor
b7a6c9dc17
Renamed BadPacketException -> PacketHandlingException
...
this better describes the intent, instead of just vaguely describing a packet as 'bad'.
2021-03-30 01:15:28 +01:00
Dylan K. Taylor
25998720ce
Fixed server crash on invalid gamemode in SetPlayerGameTypePacket
...
this really ought to be detected at the decode layer, but right now that's a bit difficult ...
2021-03-28 21:11:07 +01:00
Dylan K. Taylor
ad048f0b7f
Merge remote-tracking branch 'origin/stable'
2021-03-23 15:17:10 +00:00
Dylan K. Taylor
3fe0adbd7f
Merge branch 'stable'
2021-03-14 20:14:08 +00:00
Dylan K. Taylor
bbae02264d
Merge branch 'stable'
2021-01-27 20:04:13 +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
82c8fa696a
Relocate teleport ACK checks to InGamePacketHandler
2021-01-07 20:43:31 +00:00
Dylan K. Taylor
af1fe7c293
Merge branch 'stable'
2020-11-21 21:13:48 +00:00
Dylan K. Taylor
72ace3951e
InGamePacketHandler: fixed crafting table breaking when clicked while sneaking
2020-11-03 22:56:20 +00:00
Dylan K. Taylor
4c0c2ebd24
CS cleanup
2020-10-26 15:56:30 +00:00
Dylan K. Taylor
eabfd2a37b
World: replace sendBlocks() with createBlockUpdatePackets()
...
this allows the caller to decide how the packets should be sent.
2020-10-11 16:30:54 +01:00
Dylan K. Taylor
b0b08d45d5
Entity: clean up sendData() handling, remove send-to-self hack
2020-10-08 21:35:36 +01:00
Dylan K. Taylor
69cad3e694
InGamePacketHandler: Ignore LevelSoundEventPacket completely
2020-10-06 18:26:57 +01:00
Dylan K. Taylor
7ef794d725
imports cleanup
2020-10-04 18:22:07 +01:00
Dylan K. Taylor
d3a3a41d2b
Revert back to separated floor/wall sign
...
the conditionally useless properties are problematic.
2020-10-04 17:52:23 +01:00
Dylan K. Taylor
e1d80f05b1
Merge branch 'stable' into master
2020-08-03 20:14:46 +01:00
Dylan K. Taylor
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
Dylan K. Taylor
e9eadd3a26
Merge commit '8480ee82e'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
# src/pocketmine/block/CraftingTable.php
2020-07-04 22:19:43 +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
670ad9eb9d
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
2020-06-29 21:19:46 +01:00
Dylan K. Taylor
01d221b794
imports cleanup
2020-06-28 17:50:49 +01:00
Dylan K. Taylor
9f323bc480
phpstorm, stop messing with my code pls
2020-06-26 22:25:09 +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
9887a8b778
Merge commit 'c5bbb2bcbc4ecc8bcfd9bfaefd27c1b51e482d77'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/Player.php
# src/pocketmine/network/mcpe/protocol/InventoryTransactionPacket.php
2020-06-26 19:18:58 +01:00
Dylan K. Taylor
6f4d4be3da
InGamePacketHandler: handle InvalidSkinException thrown by SkinAdapter::fromSkinData()
2020-06-17 22:31:44 +01:00
Dylan K. Taylor
9ce531fef4
(master) imports cleanup
2020-06-14 19:29:33 +01:00