Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
RandomBlockStateFunction.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/world/level/storage/loot/predicates/LootItemCondition.h"
5
6// auto generated inclusion list
7#include "mc/world/level/storage/loot/RandomValueBounds.h"
8#include "mc/world/level/storage/loot/functions/LootItemFunction.h"
9
10// auto generated forward declare list
11// clang-format off
12class ItemStackBase;
15class Random;
16class SemVersion;
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
36#ifdef LL_PLAT_S
37#else // LL_PLAT_C
38public:
39 // prevent constructor by default
40 RandomBlockStateFunction();
41
42#endif
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 virtual ::LootItemFunction::FunctionType getFunctionType() const /*override*/;
47
48 virtual void applyPreVersion(::ItemStackBase& item, ::Random& random, ::LootTableContext& context) /*override*/;
49
50 virtual void apply26U6(::ItemStackBase& item, ::Random& random, ::LootTableContext& context) /*override*/;
51 // NOLINTEND
52
53public:
54 // member functions
55 // NOLINTBEGIN
56#ifdef LL_PLAT_C
57 MCNAPI RandomBlockStateFunction(
58 ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates,
59 ::RandomValueBounds& values,
60 ::std::string const& blockStateName
61 );
62#endif
63
64 MCNAPI void _internalApply(
65 ::ItemStackBase& item,
66 ::Random& random,
68 ::SemVersion const& jsonVersion
69 );
70 // NOLINTEND
71
72public:
73 // static functions
74 // NOLINTBEGIN
75#ifdef LL_PLAT_C
76 MCNAPI static ::std::unique_ptr<::LootItemFunction>
77 deserialize(::Json::Value object, ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates);
78#endif
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84#ifdef LL_PLAT_C
85 MCNAPI void* $ctor(
86 ::std::vector<::std::unique_ptr<::LootItemCondition>>& predicates,
87 ::RandomValueBounds& values,
88 ::std::string const& blockStateName
89 );
90#endif
91 // NOLINTEND
92
93public:
94 // virtual function thunks
95 // NOLINTBEGIN
96 MCNAPI ::LootItemFunction::FunctionType $getFunctionType() const;
97
99
101
102
103 // NOLINTEND
104
105public:
106 // vftables
107 // NOLINTBEGIN
108 MCNAPI static void** $vftable();
109 // NOLINTEND
110};
Definition ItemStackBase.h:45
Definition Value.h:16
Definition LootItemCondition.h:12
Definition LootItemFunction.h:20
static MCAPI ::std::unique_ptr<::LootItemFunction > deserialize(::Json::Value object, bool usingUpcomingCreatorFeaturesExperiment)
Definition LootTableContext.h:20
MCAPI void $applyPreVersion(::ItemStackBase &item, ::Random &random, ::LootTableContext &context)
MCAPI void _internalApply(::ItemStackBase &item, ::Random &random, ::LootTableContext const &context, ::SemVersion const &jsonVersion)
MCAPI::LootItemFunction::FunctionType $getFunctionType() const
MCAPI void $apply26U6(::ItemStackBase &item, ::Random &random, ::LootTableContext &context)
static MCAPI void ** $vftable()
Definition RandomValueBounds.h:5
Definition Random.h:10
Definition SemVersion.h:15
Definition context.h:5