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\item\Item;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Facing;
@@ -42,7 +42,7 @@ class Farmland extends Transparent{
}
public function readStateFromData(int $id, int $stateMeta) : void{
$this->wetness = BlockDataValidator::readBoundedInt("wetness", $stateMeta, 0, 7);
$this->wetness = BlockDataSerializer::readBoundedInt("wetness", $stateMeta, 0, 7);
}
public function getStateBitmask() : int{