mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 05:55:33 +00:00
Merge commit 'c5bbb2bcbc4ecc8bcfd9bfaefd27c1b51e482d77'
# Conflicts: # resources/vanilla # src/pocketmine/Player.php # src/pocketmine/network/mcpe/protocol/InventoryTransactionPacket.php
This commit is contained in:
commit
9887a8b778
@ -201,7 +201,7 @@ class InGamePacketHandler extends PacketHandler{
|
|||||||
/** @var InventoryAction[] $actions */
|
/** @var InventoryAction[] $actions */
|
||||||
$actions = [];
|
$actions = [];
|
||||||
|
|
||||||
$isCrafting = false;
|
$isCraftingPart = false;
|
||||||
$isFinalCraftingPart = false;
|
$isFinalCraftingPart = false;
|
||||||
$converter = TypeConverter::getInstance();
|
$converter = TypeConverter::getInstance();
|
||||||
foreach($data->getActions() as $networkInventoryAction){
|
foreach($data->getActions() as $networkInventoryAction){
|
||||||
@ -213,7 +213,7 @@ class InGamePacketHandler extends PacketHandler{
|
|||||||
$networkInventoryAction->inventorySlot === 50 and
|
$networkInventoryAction->inventorySlot === 50 and
|
||||||
!$old->equalsExact($new)
|
!$old->equalsExact($new)
|
||||||
){
|
){
|
||||||
$isCrafting = true;
|
$isCraftingPart = true;
|
||||||
if(!$old->isNull() and $new->isNull()){
|
if(!$old->isNull() and $new->isNull()){
|
||||||
$isFinalCraftingPart = true;
|
$isFinalCraftingPart = true;
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ class InGamePacketHandler extends PacketHandler{
|
|||||||
$networkInventoryAction->windowId === NetworkInventoryAction::SOURCE_TYPE_CRAFTING_USE_INGREDIENT
|
$networkInventoryAction->windowId === NetworkInventoryAction::SOURCE_TYPE_CRAFTING_USE_INGREDIENT
|
||||||
)
|
)
|
||||||
){
|
){
|
||||||
$isCrafting = true;
|
$isCraftingPart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
@ -237,7 +237,7 @@ class InGamePacketHandler extends PacketHandler{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($isCrafting){
|
if($isCraftingPart){
|
||||||
//we get the actions for this in several packets, so we need to wait until we have all the pieces before
|
//we get the actions for this in several packets, so we need to wait until we have all the pieces before
|
||||||
//trying to execute it
|
//trying to execute it
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user