LeviLamina
Loading...
Searching...
No Matches
LootItemFunction.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class HashedString;
8class ItemInstance;
9class ItemStack;
12class Random;
13struct Trade;
14namespace Json { class Value; }
15// clang-format on
16
18public:
19 // LootItemFunction inner types define
20 enum class FunctionType : int {
21 SetItemCount = 0,
22 SetItemData = 1,
23 SetItemDamage = 2,
24 LootingEnchant = 3,
25 EnchantWithLevels = 4,
26 EnchantBookForTrading = 5,
27 EnchantRandomly = 6,
28 SmeltItem = 7,
29 SetDataFromColorIndex = 8,
30 EnchantRandomEquipment = 9,
31 RandomAuxValue = 10,
32 RandomBlockState = 11,
33 RandomDye = 12,
34 ExplorationMap = 13,
35 SetBannerDetails = 14,
36 ExplosionDecay = 15,
37 SetItemName = 16,
38 SetItemLore = 17,
39 SpecificEnchant = 18,
40 FillContainer = 19,
41 SetSpawnEgg = 20,
42 SetBookContents = 21,
43 SetStewEffect = 22,
44 SetOminousBottle = 23,
45 SetArmorTrim = 24,
46 SetPotion = 25,
47 Count = 26,
48 };
49
50public:
51 // member variables
52 // NOLINTBEGIN
53 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::LootItemCondition>>> mPredicates;
54 // NOLINTEND
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59 virtual ~LootItemFunction();
60
61 virtual void apply(::ItemStack& item, ::Random& random, ::LootTableContext& context) = 0;
62
63 virtual int apply(::ItemStack& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
64
65 virtual void apply(::ItemInstance& item, ::Random& random, ::LootTableContext& context) = 0;
66
67 virtual int apply(::ItemInstance& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
68
69 virtual ::LootItemFunction::FunctionType getFunctionType() const = 0;
70 // NOLINTEND
71
72public:
73 // member functions
74 // NOLINTBEGIN
75 MCFOLD ::std::vector<::std::unique_ptr<::LootItemCondition>> const& getConditions() const;
76 // NOLINTEND
77
78public:
79 // static functions
80 // NOLINTBEGIN
81 MCAPI static ::std::unique_ptr<::LootItemFunction>
82 deserialize(::Json::Value object, bool usingUpcomingCreatorFeaturesExperiment);
83 // NOLINTEND
84
85public:
86 // static variables
87 // NOLINTBEGIN
88 MCAPI static ::std::unordered_map<
90 ::std::function<::std::unique_ptr<
91 ::LootItemFunction>(::Json::Value&, ::std::vector<::std::unique_ptr<::LootItemCondition>>&)>> const&
92 mLootingFunctions();
93 // NOLINTEND
94
95public:
96 // destructor thunk
97 // NOLINTBEGIN
98 MCAPI void $dtor();
99 // NOLINTEND
100
101public:
102 // virtual function thunks
103 // NOLINTBEGIN
104 MCAPI int $apply(::ItemStack& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
105
106 MCAPI int $apply(::ItemInstance& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
107
108
109 // NOLINTEND
110
111public:
112 // vftables
113 // NOLINTBEGIN
114 MCNAPI static void** $vftable();
115 // NOLINTEND
116};
Definition HashedString.h:5
Definition ItemInstance.h:15
Definition ItemStack.h:35
Definition Value.h:16
Definition LootItemCondition.h:12
Definition LootItemFunction.h:17
static MCAPI void ** $vftable()
Definition LootTableContext.h:21
Definition Random.h:10
Definition Trade.h:10
Definition context.h:5