Merge remote-tracking branch 'origin/stable' into master

# Conflicts:
#	build/php
#	composer.lock
#	phpstan.neon.dist
#	resources/vanilla
#	src/pocketmine/Server.php
#	src/pocketmine/VersionInfo.php
#	src/pocketmine/entity/Entity.php
#	src/pocketmine/lang/locale
#	src/utils/Timezone.php
#	tests/phpstan/bootstrap.php
#	tests/phpstan/configs/custom-leveldb.neon
This commit is contained in:
Dylan K. Taylor
2020-10-13 17:51:49 +01:00
11 changed files with 43 additions and 22 deletions

View File

@ -29,6 +29,9 @@ use pocketmine\event\Cancellable;
use pocketmine\event\CancellableTrait;
use pocketmine\item\Item;
/**
* Called when a furnace is about to consume a new fuel item.
*/
class FurnaceBurnEvent extends BlockEvent implements Cancellable{
use CancellableTrait;
@ -56,18 +59,31 @@ class FurnaceBurnEvent extends BlockEvent implements Cancellable{
return $this->fuel;
}
/**
* Returns the number of ticks that the furnace will be powered for.
*/
public function getBurnTime() : int{
return $this->burnTime;
}
/**
* Sets the number of ticks that the given fuel will power the furnace for.
*/
public function setBurnTime(int $burnTime) : void{
$this->burnTime = $burnTime;
}
/**
* Returns whether the fuel item will be consumed.
*/
public function isBurning() : bool{
return $this->burning;
}
/**
* Sets whether the fuel will be consumed. If false, the furnace will smelt as if it consumed fuel, but no fuel
* will be deducted.
*/
public function setBurning(bool $burning) : void{
$this->burning = $burning;
}