mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Rename some meta usages to variant
This commit is contained in:
@ -187,15 +187,15 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
* purpose.
|
||||
*
|
||||
* @param int $id
|
||||
* @param int $meta
|
||||
* @param int $variant
|
||||
* @param string $name
|
||||
*/
|
||||
public function __construct(int $id, int $meta = 0, string $name = "Unknown"){
|
||||
public function __construct(int $id, int $variant = 0, string $name = "Unknown"){
|
||||
if($id < -0x8000 or $id > 0x7fff){ //signed short range
|
||||
throw new \InvalidArgumentException("ID must be in range " . -0x8000 . " - " . 0x7fff);
|
||||
}
|
||||
$this->id = $id;
|
||||
$this->meta = $meta !== -1 ? $meta & 0x7FFF : -1;
|
||||
$this->meta = $variant !== -1 ? $variant & 0x7FFF : -1;
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user