pocketmine\inventory\FurnaceRecipe::getInput PHP Method

getInput() public method

public getInput ( ) : Item
return pocketmine\item\Item
    public function getInput()
    {
        return clone $this->ingredient;
    }

Usage Example

 private static function writeFurnaceRecipe(FurnaceRecipe $recipe, BinaryStream $stream)
 {
     if ($recipe->getInput()->getDamage() !== 0) {
         //Data recipe
         $stream->putInt($recipe->getInput()->getId() << 16 | $recipe->getInput()->getDamage());
         $stream->putSlot($recipe->getResult());
         return CraftingDataPacket::ENTRY_FURNACE_DATA;
     } else {
         $stream->putInt($recipe->getInput()->getId());
         $stream->putSlot($recipe->getResult());
         return CraftingDataPacket::ENTRY_FURNACE;
     }
 }
All Usage Examples Of pocketmine\inventory\FurnaceRecipe::getInput