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;
20namespace mce { class Color; }
21// clang-format on
22
23class BannerBlockActor : public ::BlockActor {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<1, 1, bool> mDirtyBounds;
28 ::ll::TypedStorage<1, 1, uchar> mBaseColor;
29 ::ll::TypedStorage<8, 24, ::std::vector<uchar>> mPatterns;
30 ::ll::TypedStorage<8, 24, ::std::vector<uchar>> mColors;
31 ::ll::TypedStorage<4, 4, ::BannerBlockType> mBannerType;
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 BannerBlockActor();
37
38public:
39 // virtual functions
40 // NOLINTBEGIN
41 virtual void onPlace(::BlockSource&) /*override*/;
42
43 virtual void tick(::BlockSource& region) /*override*/;
44
45 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
46
47 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
48
49 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
50
51 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
52 // NOLINTEND
53
54public:
55 // member functions
56 // NOLINTBEGIN
57 MCAPI explicit BannerBlockActor(::BlockPos const& pos);
58
59#ifdef LL_PLAT_C
60 MCFOLD ::BannerBlockType getBannerType() const;
61
62 MCAPI ::mce::Color getBaseColor() const;
63#endif
64
65 MCFOLD uchar getBaseColorInt() const;
66
67#ifdef LL_PLAT_C
68 MCAPI ::mce::Color getColor(int index) const;
69
70 MCAPI uchar getPattern(int index) const;
71
72 MCAPI int getPatternCount() const;
73#endif
74
75 MCAPI void setItemValues(::ItemStackBase const& instance);
76 // NOLINTEND
77
78public:
79 // static functions
80 // NOLINTBEGIN
81 MCAPI static ::BannerBlockType getBannerType(::CompoundTag const* tag);
82
83 MCAPI static int getBaseColor(::ItemStack const& item);
84
85#ifdef LL_PLAT_C
86 MCAPI static ::std::string getColors(::CompoundTag const* tag);
87#endif
88
89 MCAPI static int getPatternCount(::CompoundTag const* tagElement);
90
91#ifdef LL_PLAT_C
92 MCAPI static ::std::string getPatterns(::CompoundTag const* tag);
93#endif
94
95 MCAPI static bool isDefaultBanner(::ItemStackBase const& instance);
96
97 MCAPI static void removeLastPattern(::ItemStack& instance);
98
99#ifdef LL_PLAT_C
100 MCAPI static void setBannerDetails(
101 ::ItemStack& instance,
102 int customColor,
103 ::std::string const& patterns,
104 ::std::string const& colors,
105 ::BannerBlockType bannerType
106 );
107#endif
108 // NOLINTEND
109
110public:
111 // static variables
112 // NOLINTBEGIN
113 MCAPI static int const& MAX_PATTERNS();
114
115 MCAPI static ::std::string const& TAG_BASE_COLOR();
116
117 MCAPI static ::std::string const& TAG_COLOR();
118
119 MCAPI static ::std::string const& TAG_PATTERN();
120
121 MCAPI static ::std::string const& TAG_PATTERNS();
122
123 MCAPI static ::std::string const& TAG_TYPE();
124 // NOLINTEND
125
126public:
127 // constructor thunks
128 // NOLINTBEGIN
129 MCAPI void* $ctor(::BlockPos const& pos);
130 // NOLINTEND
131
132public:
133 // virtual function thunks
134 // NOLINTBEGIN
135 MCAPI void $onPlace(::BlockSource&);
136
137 MCAPI void $tick(::BlockSource& region);
138
139 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
140
141 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
142
143 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
144
145 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
146
147
148 // NOLINTEND
149
150public:
151 // vftables
152 // NOLINTBEGIN
153 MCAPI static void** $vftable();
154 // NOLINTEND
155};
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:219
Definition ItemStackBase.h:52
Definition ItemStack.h:35
Definition SaveContext.h:5
Definition Color.h:13