forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
45
src/world/item/crafting/OreRecipes.cpp
Executable file
45
src/world/item/crafting/OreRecipes.cpp
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#include "OreRecipes.h"
|
||||
#include "Recipes.h"
|
||||
#include "../../level/tile/Tile.h"
|
||||
#include "../DyePowderItem.h"
|
||||
#include <utility>
|
||||
|
||||
void OreRecipes::addRecipes(Recipes* r)
|
||||
{
|
||||
typedef std::pair<Tile*, ItemInstance> Pair;
|
||||
Pair map[] = {
|
||||
std::make_pair(Tile::goldBlock, ItemInstance(Item::goldIngot, 9)),
|
||||
std::make_pair(Tile::ironBlock, ItemInstance(Item::ironIngot, 9)),
|
||||
std::make_pair(Tile::emeraldBlock, ItemInstance(Item::emerald, 9)),
|
||||
std::make_pair(Tile::lapisBlock, ItemInstance(Item::dye_powder, 9, DyePowderItem::BLUE))
|
||||
};
|
||||
const int NumItems = sizeof(map) / sizeof(Pair);
|
||||
|
||||
for (int i = 0; i < NumItems; i++) {
|
||||
Tile* from = map[i].first;
|
||||
ItemInstance to = map[i].second;
|
||||
|
||||
r->addShapedRecipe(ItemInstance(from), //
|
||||
"###", //
|
||||
"###", //
|
||||
"###", //
|
||||
|
||||
definition('#', to));
|
||||
|
||||
r->addShapedRecipe(to, //
|
||||
"#", //
|
||||
|
||||
definition('#', from));
|
||||
}
|
||||
|
||||
//r->addShapedRecipe(ItemInstance(Item::goldIngot), //
|
||||
// "###", //
|
||||
// "###", //
|
||||
// "###", //
|
||||
|
||||
// definition('#', Item::goldNugget));
|
||||
//r->addShapedRecipe(ItemInstance(Item::goldNugget, 9), //
|
||||
// "#", //
|
||||
|
||||
// definition('#', Item::goldIngot));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue