mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Nuke Block->meta, split into variant and state properties, lots of cleanup
This is a major change to the way block metadata is handled within the PM core. This separates variant metadata (which really ought to be part of the ID) from state metadata, and in a couple of cases flattens separate states of blocks together. The result of this is that invalid variants can be much more easily detected, and additionally state handling is much cleaner since meta is only needed at the serialize layer instead of throughout the code.
This commit is contained in:
@ -27,8 +27,8 @@ class Pumpkin extends Solid{
|
||||
|
||||
protected $id = self::PUMPKIN;
|
||||
|
||||
public function __construct(int $meta = 0){
|
||||
$this->setDamage($meta);
|
||||
public function __construct(){
|
||||
|
||||
}
|
||||
|
||||
public function getHardness() : float{
|
||||
@ -42,8 +42,4 @@ class Pumpkin extends Solid{
|
||||
public function getName() : string{
|
||||
return "Pumpkin";
|
||||
}
|
||||
|
||||
public function getVariantBitmask() : int{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user