mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
InventoryManager: fixed armor slots hack
the correct condition for this should be an unsynced armor slot changed during a transaction, but conveying this information to syncSlot() is a bit of a hassle, so this will do for now.
This commit is contained in:
parent
ca6d51498f
commit
758b5ee500
@ -440,7 +440,7 @@ class InventoryManager{
|
|||||||
//BDS (Bedrock Dedicated Server) also seems to work this way.
|
//BDS (Bedrock Dedicated Server) also seems to work this way.
|
||||||
$this->session->sendDataPacket(InventoryContentPacket::create($windowId, [$itemStackWrapper]));
|
$this->session->sendDataPacket(InventoryContentPacket::create($windowId, [$itemStackWrapper]));
|
||||||
}else{
|
}else{
|
||||||
if($this->currentItemStackRequestId !== null){
|
if($windowId === ContainerIds::ARMOR){
|
||||||
//TODO: HACK!
|
//TODO: HACK!
|
||||||
//When right-clicking to equip armour, the client predicts the content of the armour slot, but
|
//When right-clicking to equip armour, the client predicts the content of the armour slot, but
|
||||||
//doesn't report it in the transaction packet. The server then sends an InventorySlotPacket to
|
//doesn't report it in the transaction packet. The server then sends an InventorySlotPacket to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user