Tile: remove server field

it would be nice to get rid of the server dependency entirely... perhaps craftingmanager should be a singleton? it's contextless after all...
This commit is contained in:
Dylan K. Taylor
2018-11-25 15:58:24 +00:00
parent d8ea8fa0f0
commit d0e2cdb54c
2 changed files with 1 additions and 4 deletions

View File

@ -174,7 +174,7 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{
$fuel = $this->inventory->getFuel();
$raw = $this->inventory->getSmelting();
$product = $this->inventory->getResult();
$smelt = $this->server->getCraftingManager()->matchFurnaceRecipe($raw);
$smelt = $this->level->getServer()->getCraftingManager()->matchFurnaceRecipe($raw);
$canSmelt = ($smelt instanceof FurnaceRecipe and $raw->getCount() > 0 and (($smelt->getResult()->equals($product) and $product->getCount() < $product->getMaxStackSize()) or $product->isNull()));
if($this->burnTime <= 0 and $canSmelt and $fuel->getFuelTime() > 0 and $fuel->getCount() > 0){