LeviLamina
Loading...
Searching...
No Matches
SpecificEnchantFunction.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/IntRange.h"
7#include "mc/world/item/enchanting/Enchant.h"
8#include "mc/world/level/storage/loot/functions/LootItemFunction.h"
9
10// auto generated forward declare list
11// clang-format off
12class ItemInstance;
13class ItemStack;
14class ItemStackBase;
17class Random;
18namespace Json { class Value; }
19// clang-format on
20
21class SpecificEnchantFunction : public ::LootItemFunction {
22public:
23 // SpecificEnchantFunction inner types declare
24 // clang-format off
25 struct EnchantInfo;
26 // clang-format on
27
28 // SpecificEnchantFunction inner types define
29 struct EnchantInfo {
30 public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<1, 1, ::Enchant::Type> enchantment;
34 ::ll::TypedStorage<4, 8, ::IntRange> levelRange;
35 // NOLINTEND
36 };
37
38public:
39 // member variables
40 // NOLINTBEGIN
41 ::ll::TypedStorage<8, 24, ::std::vector<::SpecificEnchantFunction::EnchantInfo>> mEnchantments;
42 // NOLINTEND
43
44public:
45 // prevent constructor by default
46 SpecificEnchantFunction();
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 virtual ~SpecificEnchantFunction() /*override*/ = default;
52
53 virtual void apply(::ItemStack& item, ::Random& random, ::LootTableContext& context) /*override*/;
54
55 virtual void apply(::ItemInstance& itemInstance, ::Random& random, ::LootTableContext& context) /*override*/;
56
57 virtual ::LootItemFunction::FunctionType getFunctionType() const /*override*/;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI SpecificEnchantFunction(
64 ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates,
65 ::std::vector<::SpecificEnchantFunction::EnchantInfo> const& enchantments
66 );
67
68 MCAPI void _applyInner(::ItemStackBase& item, ::Random& random, ::LootTableContext&, bool allowNonVanilla);
69 // NOLINTEND
70
71public:
72 // static functions
73 // NOLINTBEGIN
74 MCAPI static ::std::unique_ptr<::LootItemFunction>
75 deserialize(::Json::Value object, ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates);
76 // NOLINTEND
77
78public:
79 // constructor thunks
80 // NOLINTBEGIN
81 MCAPI void* $ctor(
82 ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates,
83 ::std::vector<::SpecificEnchantFunction::EnchantInfo> const& enchantments
84 );
85 // NOLINTEND
86
87public:
88 // virtual function thunks
89 // NOLINTBEGIN
90 MCAPI void $apply(::ItemStack& item, ::Random& random, ::LootTableContext& context);
91
92 MCAPI void $apply(::ItemInstance& itemInstance, ::Random& random, ::LootTableContext& context);
93
94 MCFOLD ::LootItemFunction::FunctionType $getFunctionType() const;
95
96
97 // NOLINTEND
98
99public:
100 // vftables
101 // NOLINTBEGIN
102 MCNAPI static void** $vftable();
103 // NOLINTEND
104};
Definition ItemInstance.h:15
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Value.h:16
Definition LootItemCondition.h:12
Definition LootItemFunction.h:17
Definition LootTableContext.h:20
Definition Random.h:10
static MCAPI void ** $vftable()
STL namespace.
Definition SpecificEnchantFunction.h:29
Definition context.h:5