LeviLamina
Loading...
Searching...
No Matches
RandomBlockStateFunction.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/storage/loot/RandomValueBounds.h"
7#include "mc/world/level/storage/loot/functions/LootItemFunction.h"
8
9// auto generated forward declare list
10// clang-format off
11class Block;
12class ItemInstance;
13class ItemStack;
16class Random;
17namespace Json { class Value; }
18// clang-format on
19
20class RandomBlockStateFunction : public ::LootItemFunction {
21public:
22 // RandomBlockStateFunction inner types define
23 enum class RemapComplexAliasBlockResult : int {
24 NotComplexAlias = 0,
25 Succeed = 1,
26 Fail = 2,
27 };
28
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<4, 8, ::RandomValueBounds> mValues;
33 ::ll::TypedStorage<8, 32, ::std::string> mBlockStateName;
34 // NOLINTEND
35
36public:
37 // prevent constructor by default
38 RandomBlockStateFunction();
39
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 virtual ~RandomBlockStateFunction() /*override*/;
44
45 virtual void apply(::ItemStack& item, ::Random& random, ::LootTableContext& context) /*override*/;
46
47 virtual void apply(::ItemInstance& item, ::Random& random, ::LootTableContext& context) /*override*/;
48
49 virtual ::LootItemFunction::FunctionType getFunctionType() const /*override*/;
50 // NOLINTEND
51
52public:
53 // member functions
54 // NOLINTBEGIN
55 MCAPI RandomBlockStateFunction(
56 ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates,
57 ::RandomValueBounds& values,
58 ::std::string const& blockStateName
59 );
60
61 MCAPI ::RandomBlockStateFunction::RemapComplexAliasBlockResult
62 _remapComplexAliasBlock(int randomInt, ::Block const*& inOutItemBlock, ::std::string const& originalNameStr);
63
64 MCAPI ::RandomBlockStateFunction::RemapComplexAliasBlockResult _tryRemapComplexAliasBlock(
65 ::ItemInstance& item,
66 int randomInt,
67 ::Block const*& inOutItemBlock,
68 ::std::string const& originalName
69 );
70
71 MCAPI ::RandomBlockStateFunction::RemapComplexAliasBlockResult _tryRemapComplexAliasBlock(
72 ::ItemStack& item,
73 int randomInt,
74 ::Block const*& inOutItemBlock,
75 ::std::string const& originalName
76 );
77
78 MCFOLD ::std::string const& getBlockStateName() const;
79
80 MCFOLD ::RandomValueBounds getValues() const;
81 // NOLINTEND
82
83public:
84 // static functions
85 // NOLINTBEGIN
86 MCAPI static ::std::unique_ptr<::LootItemFunction>
87 deserialize(::Json::Value object, ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates);
88 // NOLINTEND
89
90public:
91 // constructor thunks
92 // NOLINTBEGIN
93 MCAPI void* $ctor(
94 ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates,
95 ::RandomValueBounds& values,
96 ::std::string const& blockStateName
97 );
98 // NOLINTEND
99
100public:
101 // destructor thunk
102 // NOLINTBEGIN
103 MCAPI void $dtor();
104 // NOLINTEND
105
106public:
107 // virtual function thunks
108 // NOLINTBEGIN
109 MCAPI void $apply(::ItemStack& item, ::Random& random, ::LootTableContext& context);
110
111 MCAPI void $apply(::ItemInstance& item, ::Random& random, ::LootTableContext& context);
112
113 MCFOLD ::LootItemFunction::FunctionType $getFunctionType() const;
114
115
116 // NOLINTEND
117
118public:
119 // vftables
120 // NOLINTBEGIN
121 MCNAPI static void** $vftable();
122 // NOLINTEND
123};
Definition Block.h:69
Definition ItemInstance.h:15
Definition ItemStack.h:35
Definition Value.h:16
Definition LootItemCondition.h:12
Definition LootItemFunction.h:17
Definition LootTableContext.h:21
static MCAPI void ** $vftable()
Definition RandomValueBounds.h:11
Definition Random.h:10
Definition context.h:5