diff --git a/src/pocketmine/network/mcpe/protocol/CraftingDataPacket.php b/src/pocketmine/network/mcpe/protocol/CraftingDataPacket.php index f33982ed9..cfbcf8ddb 100644 --- a/src/pocketmine/network/mcpe/protocol/CraftingDataPacket.php +++ b/src/pocketmine/network/mcpe/protocol/CraftingDataPacket.php @@ -110,7 +110,11 @@ class CraftingDataPacket extends DataPacket implements ClientboundPacket{ $inputData = -1; } } - $entry["input"] = ItemFactory::get($inputId, $inputData); + try{ + $entry["input"] = ItemFactory::get($inputId, $inputData); + }catch(\InvalidArgumentException $e){ + throw new BadPacketException($e->getMessage(), 0, $e); + } $entry["output"] = $this->getSlot(); $entry["block"] = $this->getString();