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
54 // NOLINTEND
55
56public:
57 // prevent constructor by default
58 LootItemFunction& operator=(LootItemFunction const&);
61
62public:
63 // virtual functions
64 // NOLINTBEGIN
65 // vIndex: 0
66 virtual ~LootItemFunction();
67
68 // vIndex: 4
69 virtual void apply(::ItemStack&, ::Random&, ::LootTableContext&) = 0;
70
71 // vIndex: 3
72 virtual int apply(::ItemStack& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
73
74 // vIndex: 2
75 virtual void apply(::ItemInstance&, ::Random&, ::LootTableContext&) = 0;
76
77 // vIndex: 1
78 virtual int apply(::ItemInstance& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
79
80 // vIndex: 5
81 virtual ::LootItemFunction::FunctionType getFunctionType() const = 0;
82 // NOLINTEND
83
84public:
85 // static functions
86 // NOLINTBEGIN
87 MCNAPI static ::std::unique_ptr<::LootItemFunction>
88 deserialize(::Json::Value object, bool usingUpcomingCreatorFeaturesExperiment);
89 // NOLINTEND
90
91public:
92 // static variables
93 // NOLINTBEGIN
94 MCNAPI static ::std::unordered_map<
96 ::std::function<::std::unique_ptr<
97 ::LootItemFunction>(::Json::Value&, ::std::vector<::std::unique_ptr<::LootItemCondition>>&)>> const&
99 // NOLINTEND
100
101public:
102 // destructor thunk
103 // NOLINTBEGIN
104 MCNAPI void $dtor();
105 // NOLINTEND
106
107public:
108 // virtual function thunks
109 // NOLINTBEGIN
110 MCNAPI int $apply(::ItemStack& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
111
112 MCNAPI int $apply(::ItemInstance& item, ::Random& random, ::Trade const& trade, ::LootTableContext& context);
113 // NOLINTEND
114
115public:
116 // vftables
117 // NOLINTBEGIN
118 MCNAPI static void** $vftable();
119 // NOLINTEND
120};
Definition HashedString.h:5
Definition ItemInstance.h:15
Definition ItemStack.h:23
Definition Value.h:16
Definition LootItemCondition.h:12
Definition LootItemFunction.h:17
static MCAPI ::std::unordered_map< ::HashedString, ::std::function<::std::unique_ptr< ::LootItemFunction >(::Json::Value &, ::std::vector<::std::unique_ptr<::LootItemCondition > > &)> > const & mLootingFunctions()
static MCAPI void ** $vftable()
MCAPI int $apply(::ItemInstance &item, ::Random &random, ::Trade const &trade, ::LootTableContext &context)
MCAPI int $apply(::ItemStack &item, ::Random &random, ::Trade const &trade, ::LootTableContext &context)
static MCAPI ::std::unique_ptr<::LootItemFunction > deserialize(::Json::Value object, bool usingUpcomingCreatorFeaturesExperiment)
MCAPI void $dtor()
Definition LootTableContext.h:19
Definition Random.h:10
Definition Trade.h:10
Definition context.h:5
Definition Alias.h:14