44 use FacesOppositePlacingPlayerTrait;
47 protected FurnaceType $furnaceType;
50 $this->furnaceType = $furnaceType;
51 parent::__construct($idInfo, $name, $typeInfo);
55 $w->enum($this->facing);
59 public function getFurnaceType() : FurnaceType{
60 return $this->furnaceType;
64 return $this->lit ? 13 : 0;
72 $world = $this->position->getWorld();
73 $furnace = $world->getTile($this->position);
74 if($furnace instanceof TileFurnace && $furnace->onUpdate()){
75 if(mt_rand(1, 60) === 1){
76 $world->addSound($this->position, $furnace->getFurnaceType()->getCookSound());
78 $world->scheduleDelayedBlockUpdate($this->position, 1);