bits += $bits; } public function getBitsUsed() : int{ return $this->bits; } public function int(int $bits, int &$value) : void{ $this->addBits($bits); } public function boundedInt(int $bits, int $min, int $max, int &$value) : void{ $this->addBits($bits); } public function bool(bool &$value) : void{ $this->addBits(1); } public function horizontalFacing(int &$facing) : void{ $this->addBits(2); } /** * @inheritDoc */ public function horizontalFacingFlags(array &$faces) : void{ $this->addBits(count(Facing::HORIZONTAL)); // TODO: Implement horizontalFacingFlags() method. } public function facing(int &$facing) : void{ $this->addBits(3); } public function facingExcept(int &$facing, int $except) : void{ $this->facing($facing); } public function axis(int &$axis) : void{ $this->addBits(2); } public function horizontalAxis(int &$axis) : void{ $this->addBits(1); } public function wallConnections(array &$connections) : void{ //TODO: this can be reduced to 7 if we pack the trinary values $this->addBits(8); } public function brewingStandSlots(array &$slots) : void{ $this->addBits(count(BrewingStandSlot::getAll())); } public function railShape(int &$railShape) : void{ $this->addBits(4); } public function straightOnlyRailShape(int &$railShape) : void{ $this->addBits(3); } }