mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Use -1 for anydamage and empty string for null NBT, closes #146
This commit is contained in:
@ -32,9 +32,9 @@ class ItemBlock extends Item{
|
||||
parent::__construct($block->getId(), $block->getDamage(), $count, $block->getName());
|
||||
}
|
||||
|
||||
public function setDamage($meta){
|
||||
$this->meta = $meta !== null ? $meta & 0xf : null;
|
||||
$this->block->setDamage($this->meta);
|
||||
public function setDamage(int $meta){
|
||||
$this->meta = $meta !== -1 ? $meta & 0xf : -1;
|
||||
$this->block->setDamage($this->meta !== -1 ? $this->meta : 0);
|
||||
}
|
||||
|
||||
public function __clone(){
|
||||
|
Reference in New Issue
Block a user