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&, ::Random&, ::LootTableContext&) = 0;
62
63 virtual int apply(::ItemStack& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
64
65 virtual void apply(::ItemInstance&, ::Random&, ::LootTableContext&) = 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 // static functions
74 // NOLINTBEGIN
75 MCAPI static ::std::unique_ptr<::LootItemFunction>
76 deserialize(::Json::Value object, bool usingUpcomingCreatorFeaturesExperiment);
77 // NOLINTEND
78
79public:
80 // static variables
81 // NOLINTBEGIN
82 MCAPI static ::std::unordered_map<
84 ::std::function<::std::unique_ptr<
85 ::LootItemFunction>(::Json::Value&, ::std::vector<::std::unique_ptr<::LootItemCondition>>&)>> const&
86 mLootingFunctions();
87 // NOLINTEND
88
89public:
90 // destructor thunk
91 // NOLINTBEGIN
92 MCAPI void $dtor();
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98 MCAPI int $apply(::ItemStack& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
99
100 MCAPI int $apply(::ItemInstance& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
101
102
103 // NOLINTEND
104
105public:
106 // vftables
107 // NOLINTBEGIN
108 MCNAPI static void** $vftable();
109 // NOLINTEND
110};
Definition HashedString.h:5
Definition ItemInstance.h:15
Definition ItemStack.h:26
Definition Value.h:16
Definition LootItemCondition.h:12
Definition LootItemFunction.h:17
static MCAPI void ** $vftable()
Definition LootTableContext.h:20
Definition Random.h:10
Definition Trade.h:10
Definition context.h:5