mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 02:38:54 +00:00
TypeConverter: duct tape for crafting recipe block inputs
This commit is contained in:
parent
13bb1c26fb
commit
c89f7f8e5e
@ -123,6 +123,11 @@ class TypeConverter{
|
|||||||
$meta = self::RECIPE_INPUT_WILDCARD_META;
|
$meta = self::RECIPE_INPUT_WILDCARD_META;
|
||||||
}else{
|
}else{
|
||||||
[$id, $meta] = ItemTranslator::getInstance()->toNetworkId($itemStack);
|
[$id, $meta] = ItemTranslator::getInstance()->toNetworkId($itemStack);
|
||||||
|
if($id < 256){
|
||||||
|
//TODO: this is needed for block crafting recipes to work - we need to replace this with some kind of
|
||||||
|
//blockstate <-> meta mapping table so that we can remove the legacy code from the core
|
||||||
|
$meta = $itemStack->getMeta();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return new RecipeIngredient($id, $meta, $itemStack->getCount());
|
return new RecipeIngredient($id, $meta, $itemStack->getCount());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user