mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
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:
@ -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{
|
||||
|
Reference in New Issue
Block a user