mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Burn meta wildcards from Item, allow more dynamic recipe inputs
this was an obstacle for getting rid of legacy item IDs.
This commit is contained in:
@@ -31,8 +31,11 @@ class ItemIdentifier{
|
||||
if($id < -0x8000 || $id > 0x7fff){ //signed short range
|
||||
throw new \InvalidArgumentException("ID must be in range " . -0x8000 . " - " . 0x7fff);
|
||||
}
|
||||
if($meta < 0 || $meta > 0x7ffe){
|
||||
throw new \InvalidArgumentException("Meta must be in range 0 - " . 0x7ffe);
|
||||
}
|
||||
$this->id = $id;
|
||||
$this->meta = $meta !== -1 ? $meta & 0x7FFF : -1;
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
||||
public function getId() : int{
|
||||
|
Reference in New Issue
Block a user