LeviLamina
Loading...
Searching...
No Matches
BannerBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/BannerBlockType.h"
7#include "mc/world/level/block/actor/BlockActor.h"
8
9// auto generated forward declare list
10// clang-format off
12class BlockPos;
13class BlockSource;
14class CompoundTag;
15class DataLoadHelper;
16class ILevel;
17class ItemStack;
18class ItemStackBase;
19class SaveContext;
20// clang-format on
21
22class BannerBlockActor : public ::BlockActor {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<1, 1, bool> mDirtyBounds;
27 ::ll::TypedStorage<1, 1, uchar> mBaseColor;
28 ::ll::TypedStorage<8, 24, ::std::vector<uchar>> mPatterns;
29 ::ll::TypedStorage<8, 24, ::std::vector<uchar>> mColors;
30 ::ll::TypedStorage<4, 4, ::BannerBlockType> mBannerType;
31 // NOLINTEND
32
33public:
34 // prevent constructor by default
35 BannerBlockActor();
36
37public:
38 // virtual functions
39 // NOLINTBEGIN
40 virtual void onPlace(::BlockSource& region) /*override*/;
41
42 virtual void tick(::BlockSource& region) /*override*/;
43
44 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
45
46 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
47
48 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
49
50 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
51
52#ifdef LL_PLAT_S
53 virtual ~BannerBlockActor() /*override*/ = default;
54#else // LL_PLAT_C
55 virtual ~BannerBlockActor() /*override*/;
56#endif
57
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
63 MCAPI explicit BannerBlockActor(::BlockPos const& pos);
64
65 MCAPI void setItemValues(::ItemStackBase const& instance);
66 // NOLINTEND
67
68public:
69 // static functions
70 // NOLINTBEGIN
71 MCAPI_C static ::BannerBlockType getBannerType(::CompoundTag const* tag);
72
73 MCAPI static int getBaseColor(::ItemStack const& item);
74
75 MCAPI_C static ::std::string getColors(::CompoundTag const* tag);
76
77 MCAPI static int getPatternCount(::CompoundTag const* tagElement);
78
79 MCAPI_C static ::std::string getPatterns(::CompoundTag const* tag);
80
81 MCAPI static bool isDefaultBanner(::ItemStackBase const& instance);
82
83 MCAPI static void removeLastPattern(::ItemStack& instance);
84
85 MCAPI_C static void setBannerDetails(
86 ::ItemStack& instance,
87 int customColor,
88 ::std::string const& patterns,
89 ::std::string const& colors,
90 ::BannerBlockType bannerType
91 );
92 // NOLINTEND
93
94public:
95 // static variables
96 // NOLINTBEGIN
97 MCAPI static int const& MAX_PATTERNS();
98
99 MCAPI static ::std::string const& TAG_BASE_COLOR();
100
101 MCAPI static ::std::string const& TAG_COLOR();
102
103 MCAPI static ::std::string const& TAG_PATTERN();
104
105 MCAPI static ::std::string const& TAG_PATTERNS();
106
107 MCAPI static ::std::string const& TAG_TYPE();
108 // NOLINTEND
109
110public:
111 // constructor thunks
112 // NOLINTBEGIN
113 MCAPI void* $ctor(::BlockPos const& pos);
114 // NOLINTEND
115
116public:
117 // destructor thunk
118 // NOLINTBEGIN
119 MCAPI void $dtor();
120 // NOLINTEND
121
122public:
123 // virtual function thunks
124 // NOLINTBEGIN
125 MCAPI void $onPlace(::BlockSource& region);
126
127 MCAPI void $tick(::BlockSource& region);
128
129 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
130
131 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
132
133 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
134
135 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
136
137
138 // NOLINTEND
139
140public:
141 // vftables
142 // NOLINTBEGIN
143 MCAPI static void** $vftable();
144 // NOLINTEND
145};
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:214
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition SaveContext.h:5