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;
16class Random;
17namespace Json { class Value; }
18// clang-format on
19
20class SpecificEnchantFunction : public ::LootItemFunction {
21public:
22 // SpecificEnchantFunction inner types declare
23 // clang-format off
24 struct EnchantInfo;
25 // clang-format on
26
27 // SpecificEnchantFunction inner types define
28 struct EnchantInfo {
29 public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<1, 1, ::Enchant::Type> enchantment;
33 ::ll::TypedStorage<4, 8, ::IntRange> levelRange;
34 // NOLINTEND
35 };
36
37public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<8, 24, ::std::vector<::SpecificEnchantFunction::EnchantInfo>> mEnchantments;
41 // NOLINTEND
42
43public:
44 // prevent constructor by default
45 SpecificEnchantFunction();
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual ~SpecificEnchantFunction() /*override*/;
51
52 virtual void apply(::ItemStack& item, ::Random& random, ::LootTableContext&) /*override*/;
53
54 virtual void apply(::ItemInstance& itemInstance, ::Random& random, ::LootTableContext&) /*override*/;
55
56 virtual ::LootItemFunction::FunctionType getFunctionType() const /*override*/;
57 // NOLINTEND
58
59public:
60 // member functions
61 // NOLINTBEGIN
62 MCAPI SpecificEnchantFunction(
63 ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates,
64 ::std::vector<::SpecificEnchantFunction::EnchantInfo> const& enchantments
65 );
66
67 MCFOLD ::std::vector<::SpecificEnchantFunction::EnchantInfo> const& getEnchantments() const;
68 // NOLINTEND
69
70public:
71 // static functions
72 // NOLINTBEGIN
73 MCAPI static ::std::unique_ptr<::LootItemFunction>
74 deserialize(::Json::Value object, ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates);
75 // NOLINTEND
76
77public:
78 // constructor thunks
79 // NOLINTBEGIN
80 MCAPI void* $ctor(
81 ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates,
82 ::std::vector<::SpecificEnchantFunction::EnchantInfo> const& enchantments
83 );
84 // NOLINTEND
85
86public:
87 // destructor thunk
88 // NOLINTBEGIN
89 MCAPI void $dtor();
90 // NOLINTEND
91
92public:
93 // virtual function thunks
94 // NOLINTBEGIN
95 MCAPI void $apply(::ItemStack& item, ::Random& random, ::LootTableContext&);
96
97 MCAPI void $apply(::ItemInstance& itemInstance, ::Random& random, ::LootTableContext&);
98
99 MCFOLD ::LootItemFunction::FunctionType $getFunctionType() const;
100
101
102 // NOLINTEND
103
104public:
105 // vftables
106 // NOLINTBEGIN
107 MCNAPI static void** $vftable();
108 // NOLINTEND
109};
Definition ItemInstance.h:15
Definition ItemStack.h:35
Definition Value.h:16
Definition LootItemCondition.h:12
Definition LootItemFunction.h:17
Definition LootTableContext.h:21
Definition Random.h:10
static MCAPI void ** $vftable()
STL namespace.
Definition SpecificEnchantFunction.h:28