Implement campfire & soul campfire (#4696)

This commit is contained in:
ipad54
2024-07-07 23:01:34 +03:00
committed by GitHub
parent f6c0b228ec
commit 2ffc38c835
18 changed files with 661 additions and 3 deletions

View File

@ -0,0 +1,63 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\event\block;
use pocketmine\block\Campfire;
use pocketmine\event\Cancellable;
use pocketmine\event\CancellableTrait;
use pocketmine\item\Item;
class CampfireCookEvent extends BlockEvent implements Cancellable{
use CancellableTrait;
public function __construct(
private Campfire $campfire,
private int $slot,
private Item $input,
private Item $result
){
parent::__construct($campfire);
$this->input = clone $input;
}
public function getCampfire() : Campfire{
return $this->campfire;
}
public function getSlot() : int{
return $this->slot;
}
public function getInput() : Item{
return $this->input;
}
public function getResult() : Item{
return $this->result;
}
public function setResult(Item $result) : void{
$this->result = $result;
}
}