mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +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;
|
$meta = $b[1] & 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(defined(Item::class . "::" . strtoupper($b[0]))){
|
if(defined(ItemIds::class . "::" . strtoupper($b[0]))){
|
||||||
$item = self::get(constant(Item::class . "::" . strtoupper($b[0])), $meta);
|
$item = self::get(constant(ItemIds::class . "::" . strtoupper($b[0])), $meta);
|
||||||
}elseif(is_numeric($b[0])){
|
}elseif(is_numeric($b[0])){
|
||||||
$item = self::get(((int) $b[0]) & 0xFFFF, $meta);
|
$item = self::get(((int) $b[0]) & 0xFFFF, $meta);
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user