15class UnlockedRecipesServerComponent {
23 struct UnlockingInstruction {
26 enum class Instruction :
int {
42 UnlockingInstruction& operator=(UnlockingInstruction
const&);
43 UnlockingInstruction(UnlockingInstruction
const&);
44 UnlockingInstruction();
49 MCAPI ~UnlockingInstruction();
62 ::ll::TypedStorage<1, 1, bool> mInventoryHasChanged;
63 ::ll::TypedStorage<1, 1, bool> mInitialDataSent;
64 ::ll::TypedStorage<4, 4, uint> mUsedContexts;
65 ::ll::TypedStorage<8, 64, ::std::unordered_set<::std::string>> mUnlockedRecipes;
66 ::ll::TypedStorage<8, 64, ::std::unordered_set<int>> mChangedInventorySlots;
67 ::ll::TypedStorage<8, 24, ::std::vector<::UnlockedRecipesServerComponent::UnlockingInstruction>>
68 mUnlockingInstructions;
74 MCAPI UnlockedRecipesServerComponent();
78 MCAPI
void addChangedInventorySlot(
int slot);
80 MCAPI
void addUnlockedRecipe(::std::string
const& recipeId);
84 MCAPI
void clearChangedInventorySlots();
86 MCAPI
void clearUnlockingInstructions();
88 MCFOLD ::std::unordered_set<int>
const& getChangedInventorySlots()
const;
90 MCFOLD ::std::unordered_set<::std::string>
const& getUnlockedRecipes()
const;
92 MCFOLD ::std::vector<::UnlockedRecipesServerComponent::UnlockingInstruction>
const&
93 getUnlockingInstructions()
const;
95 MCAPI
bool hasContextBeenUsed(::RecipeUnlockingRequirement::UnlockingContext
context)
const;
97 MCFOLD
bool hasInitialDataBeenSent()
const;
99 MCFOLD
bool hasInventoryChanged()
const;
101 MCFOLD
bool hasUnlockedRecipes()
const;
103 MCAPI
bool hasUnlockingInstructions()
const;
105 MCAPI
bool isRecipeUnlocked(::std::string
const& recipeId)
const;
107 MCAPI
void markContextAsUsed(::RecipeUnlockingRequirement::UnlockingContext
context);
109 MCFOLD
void markInitialDataAsSent();
113 MCAPI
void removeAllUnlockedRecipes();
115 MCAPI
void removeUnlockedRecipe(::std::string
const& recipeId);
117 MCAPI
void resetUsedContexts();
119 MCAPI ~UnlockedRecipesServerComponent();
125 MCAPI static ::std::string
const& COMPONENT_TAG();
127 MCAPI static ::std::string
const& UNLOCKED_RECIPES_TAG();
129 MCAPI static ::std::string
const& USED_CONTEXTS_TAG();