#pragma once #include class MerchantRecipe; class CompoundTag; class ItemInstance; class DataOutputStream; class DataInputStream; class MerchantRecipeList { private: std::vector m_recipes; public: MerchantRecipeList(); MerchantRecipeList(CompoundTag *tag); ~MerchantRecipeList(); MerchantRecipe *getRecipeFor(shared_ptr buyA, shared_ptr buyB, int selectionHint); bool addIfNewOrBetter(MerchantRecipe *recipe); // 4J Added bool return MerchantRecipe *getMatchingRecipeFor(shared_ptr buy, shared_ptr buyB, shared_ptr 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::iterator begin(); std::vector::iterator end(); std::vector::iterator erase(std::vector::iterator it); size_t size(); bool empty(); };