Fixed torch facing bug with wrong metadata

torches cannot face down
This commit is contained in:
Dylan K. Taylor 2018-09-21 19:45:52 +01:00
parent 3edf3a3a80
commit 9d2e9e1663

View File

@ -40,12 +40,12 @@ class Torch extends Flowable{
}
protected function writeStateToMeta() : int{
return $this->facing === Facing::DOWN ? 0 : 6 - $this->facing;
return 6 - $this->facing;
}
public function readStateFromMeta(int $meta) : void{
if($meta === 0){
$this->facing = Facing::DOWN;
$this->facing = Facing::UP;
}else{
$this->facing = 6 - $meta;
}