LeviLamina
Loading...
Searching...
No Matches
UnlockedRecipesServerComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/item/crafting/RecipeUnlockingRequirement.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
11class CompoundTag;
12class DataLoadHelper;
13// clang-format on
14
15class UnlockedRecipesServerComponent {
16public:
17 // UnlockedRecipesServerComponent inner types declare
18 // clang-format off
20 // clang-format on
21
22 // UnlockedRecipesServerComponent inner types define
23 struct UnlockingInstruction {
24 public:
25 // UnlockingInstruction inner types define
26 enum class Instruction : int {
27 UnlockRecipe = 0,
28 UnlockAllRecipes = 1,
29 RemoveRecipe = 2,
30 RemoveAllRecipes = 3,
31 };
32
33 public:
34 // member variables
35 // NOLINTBEGIN
38 // NOLINTEND
39
40 public:
41 // prevent constructor by default
42 UnlockingInstruction& operator=(UnlockingInstruction const&);
43 UnlockingInstruction(UnlockingInstruction const&);
44 UnlockingInstruction();
45
46 public:
47 // member functions
48 // NOLINTBEGIN
49 MCAPI ~UnlockingInstruction();
50 // NOLINTEND
51
52 public:
53 // destructor thunk
54 // NOLINTBEGIN
55 MCFOLD void $dtor();
56 // NOLINTEND
57 };
58
59public:
60 // member variables
61 // NOLINTBEGIN
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;
69 // NOLINTEND
70
71public:
72 // member functions
73 // NOLINTBEGIN
74 MCAPI UnlockedRecipesServerComponent();
75
76 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
77
78 MCAPI void addChangedInventorySlot(int slot);
79
80 MCAPI void addUnlockedRecipe(::std::string const& recipeId);
81
82 MCAPI void addUnlockingInstruction(::UnlockedRecipesServerComponent::UnlockingInstruction instruction);
83
84 MCAPI void clearChangedInventorySlots();
85
86 MCAPI void clearUnlockingInstructions();
87
88 MCFOLD ::std::unordered_set<int> const& getChangedInventorySlots() const;
89
90 MCFOLD ::std::unordered_set<::std::string> const& getUnlockedRecipes() const;
91
92 MCFOLD ::std::vector<::UnlockedRecipesServerComponent::UnlockingInstruction> const&
93 getUnlockingInstructions() const;
94
95 MCAPI bool hasContextBeenUsed(::RecipeUnlockingRequirement::UnlockingContext context) const;
96
97 MCFOLD bool hasInitialDataBeenSent() const;
98
99 MCFOLD bool hasInventoryChanged() const;
100
101 MCFOLD bool hasUnlockedRecipes() const;
102
103 MCAPI bool hasUnlockingInstructions() const;
104
105 MCAPI bool isRecipeUnlocked(::std::string const& recipeId) const;
106
107 MCAPI void markContextAsUsed(::RecipeUnlockingRequirement::UnlockingContext context);
108
109 MCFOLD void markInitialDataAsSent();
110
111 MCAPI void readAdditionalSaveData(::Actor&, ::CompoundTag const& tag, ::DataLoadHelper&);
112
113 MCAPI void removeAllUnlockedRecipes();
114
115 MCAPI void removeUnlockedRecipe(::std::string const& recipeId);
116
117 MCAPI void resetUsedContexts();
118
119 MCAPI ~UnlockedRecipesServerComponent();
120 // NOLINTEND
121
122public:
123 // static variables
124 // NOLINTBEGIN
125 MCAPI static ::std::string const& COMPONENT_TAG();
126
127 MCAPI static ::std::string const& UNLOCKED_RECIPES_TAG();
128
129 MCAPI static ::std::string const& USED_CONTEXTS_TAG();
130 // NOLINTEND
131
132public:
133 // constructor thunks
134 // NOLINTBEGIN
135 MCAPI void* $ctor();
136 // NOLINTEND
137
138public:
139 // destructor thunk
140 // NOLINTBEGIN
141 MCAPI void $dtor();
142 // NOLINTEND
143};
Definition Actor.h:125
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition UnlockedRecipesServerComponent.h:23
Definition context.h:5
Definition Alias.h:14