Fix type error in Furnace due to useless floor(), close #1031

This commit is contained in:
Dylan K. Taylor 2017-06-08 09:12:58 +01:00
parent c445db421f
commit cc1d1b0f45

View File

@ -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();