mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Fix type error in Furnace due to useless floor(), close #1031
This commit is contained in:
parent
c445db421f
commit
cc1d1b0f45
@ -227,7 +227,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
|
||||
if($this->namedtag["BurnTime"] > 0){
|
||||
$this->namedtag->BurnTime = new ShortTag("BurnTime", $this->namedtag["BurnTime"] - 1);
|
||||
$this->namedtag->BurnTicks = new ShortTag("BurnTicks", ceil(($this->namedtag["BurnTime"] / $this->namedtag["MaxTime"] * 200)));
|
||||
$this->namedtag->BurnTicks = new ShortTag("BurnTicks", (int) ceil(($this->namedtag["BurnTime"] / $this->namedtag["MaxTime"] * 200)));
|
||||
|
||||
if($smelt instanceof FurnaceRecipe and $canSmelt){
|
||||
$this->namedtag->CookTime = new ShortTag("CookTime", $this->namedtag["CookTime"] + 1);
|
||||
@ -270,7 +270,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
|
||||
$pk = new ContainerSetDataPacket();
|
||||
$pk->windowid = $windowId;
|
||||
$pk->property = 0; //Smelting
|
||||
$pk->value = floor($this->namedtag["CookTime"]);
|
||||
$pk->value = $this->namedtag["CookTime"];
|
||||
$player->dataPacket($pk);
|
||||
|
||||
$pk = new ContainerSetDataPacket();
|
||||
|
Loading…
x
Reference in New Issue
Block a user