mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
look for item IDs in ItemIds instead of Item
Item is likely to be more polluted by other constants which aren't item IDs.
This commit is contained in:
parent
8ad02c9a4e
commit
e95b1d4b00
@ -353,8 +353,8 @@ class ItemFactory{
|
||||
$meta = $b[1] & 0xFFFF;
|
||||
}
|
||||
|
||||
if(defined(Item::class . "::" . strtoupper($b[0]))){
|
||||
$item = self::get(constant(Item::class . "::" . strtoupper($b[0])), $meta);
|
||||
if(defined(ItemIds::class . "::" . strtoupper($b[0]))){
|
||||
$item = self::get(constant(ItemIds::class . "::" . strtoupper($b[0])), $meta);
|
||||
}elseif(is_numeric($b[0])){
|
||||
$item = self::get(((int) $b[0]) & 0xFFFF, $meta);
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user