mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
InGamePacketHandler: fixed crafting table breaking when clicked while sneaking
This commit is contained in:
@ -24,9 +24,9 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\network\mcpe\handler;
|
namespace pocketmine\network\mcpe\handler;
|
||||||
|
|
||||||
use pocketmine\block\BaseSign;
|
use pocketmine\block\BaseSign;
|
||||||
use pocketmine\block\BlockLegacyIds;
|
|
||||||
use pocketmine\block\ItemFrame;
|
use pocketmine\block\ItemFrame;
|
||||||
use pocketmine\block\utils\SignText;
|
use pocketmine\block\utils\SignText;
|
||||||
|
use pocketmine\crafting\CraftingGrid;
|
||||||
use pocketmine\entity\animation\ConsumingItemAnimation;
|
use pocketmine\entity\animation\ConsumingItemAnimation;
|
||||||
use pocketmine\entity\InvalidSkinException;
|
use pocketmine\entity\InvalidSkinException;
|
||||||
use pocketmine\event\player\PlayerEditBookEvent;
|
use pocketmine\event\player\PlayerEditBookEvent;
|
||||||
@ -339,8 +339,8 @@ class InGamePacketHandler extends PacketHandler{
|
|||||||
if(!$this->player->interactBlock($blockPos, $data->getFace(), $clickPos)){
|
if(!$this->player->interactBlock($blockPos, $data->getFace(), $clickPos)){
|
||||||
$this->onFailedBlockAction($blockPos, $data->getFace());
|
$this->onFailedBlockAction($blockPos, $data->getFace());
|
||||||
}elseif(
|
}elseif(
|
||||||
$this->player->getWorld()->getBlock($blockPos)->getId() === BlockLegacyIds::CRAFTING_TABLE &&
|
!array_key_exists($windowId = InventoryManager::HARDCODED_CRAFTING_GRID_WINDOW_ID, $this->openHardcodedWindows) &&
|
||||||
!array_key_exists($windowId = InventoryManager::HARDCODED_CRAFTING_GRID_WINDOW_ID, $this->openHardcodedWindows)
|
$this->player->getCraftingGrid()->getGridWidth() === CraftingGrid::SIZE_BIG
|
||||||
){
|
){
|
||||||
//TODO: HACK! crafting grid doesn't fit very well into the current PM container system, so this hack
|
//TODO: HACK! crafting grid doesn't fit very well into the current PM container system, so this hack
|
||||||
//allows it to carry on working approximately the same way as it did in 1.14
|
//allows it to carry on working approximately the same way as it did in 1.14
|
||||||
|
Reference in New Issue
Block a user