blob: b3c0cd2b256dfc1b8f6f7dae6e106252572f7220 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#pragma once
#include <vector>
class MerchantRecipe;
class CompoundTag;
class ItemInstance;
class DataOutputStream;
class DataInputStream;
class MerchantRecipeList
{
private:
std::vector<MerchantRecipe *> m_recipes;
public:
MerchantRecipeList();
MerchantRecipeList(CompoundTag *tag);
~MerchantRecipeList();
MerchantRecipe *getRecipeFor(std::shared_ptr<ItemInstance> buyA, std::shared_ptr<ItemInstance> buyB, int selectionHint);
bool addIfNewOrBetter(MerchantRecipe *recipe); // 4J Added bool return
MerchantRecipe *getMatchingRecipeFor(std::shared_ptr<ItemInstance> buy, std::shared_ptr<ItemInstance> buyB, std::shared_ptr<ItemInstance> sell);
void writeToStream(DataOutputStream *stream);
static MerchantRecipeList *createFromStream(DataInputStream *stream);
void load(CompoundTag *tag);
CompoundTag *createTag();
void push_back(MerchantRecipe *recipe);
MerchantRecipe *at(size_t index);
std::vector<MerchantRecipe *>::iterator begin();
std::vector<MerchantRecipe *>::iterator end();
std::vector<MerchantRecipe *>::iterator erase(std::vector<MerchantRecipe *>::iterator it);
size_t size();
bool empty();
};
|