Remove implied dependence on Facing/Bearing constant values

this introduces mapping tables for redundancy for when those things change or disappear.
This commit is contained in:
Dylan K. Taylor
2019-07-29 17:43:36 +01:00
parent 18d05f57b5
commit a621bf66ff
41 changed files with 176 additions and 136 deletions

View File

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\block\utils\BlockDataValidator;
use pocketmine\block\utils\BlockDataSerializer;
use pocketmine\event\block\BlockGrowEvent;
use pocketmine\item\Fertilizer;
use pocketmine\item\Item;
@ -46,7 +46,7 @@ abstract class Crops extends Flowable{
}
public function readStateFromData(int $id, int $stateMeta) : void{
$this->age = BlockDataValidator::readBoundedInt("age", $stateMeta, 0, 7);
$this->age = BlockDataSerializer::readBoundedInt("age", $stateMeta, 0, 7);
}
public function getStateBitmask() : int{