LeviLamina
Loading...
Searching...
No Matches
BeaconBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Container.h"
7#include "mc/world/level/block/BlockColor.h"
8#include "mc/world/level/block/actor/BlockActor.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
14class BlockPos;
15class BlockSource;
16class BlockType;
17class CompoundTag;
18class DataLoadHelper;
19class ILevel;
20class ItemDescriptor;
21class ItemStack;
22class MobEffect;
23class SaveContext;
24class Vec3;
26// clang-format on
27
28class BeaconBlockActor : public ::BlockActor, public ::Container {
29public:
30 // BeaconBlockActor inner types define
31 using BeaconBeamSections = ::std::vector<::BeaconBeamSection>;
32
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 24, ::std::vector<::BeaconBeamSection>> mBeamSections;
37 ::ll::TypedStorage<4, 4, float> mBeamRot;
38 ::ll::TypedStorage<4, 4, int> mNumLevels;
39 ::ll::TypedStorage<4, 4, int> mNumLevelsSet;
40 ::ll::TypedStorage<4, 4, int> mBlockRefreshCounter;
41 ::ll::TypedStorage<4, 4, int> mPrimaryEffectId;
42 ::ll::TypedStorage<4, 4, int> mSecondaryEffectId;
43 ::ll::TypedStorage<4, 4, int> mPrimaryEffectTier;
44 ::ll::TypedStorage<4, 4, int> mSecondaryEffectTier;
45 ::ll::TypedStorage<8, 24, ::std::vector<::MobEffect*>> mBeaconEffects;
46 ::ll::TypedStorage<8, 24, ::std::vector<::std::vector<::MobEffect*>>> mTierEffects;
47 ::ll::TypedStorage<1, 1, bool> mPermanentlyRendered;
48 ::ll::TypedStorage<1, 1, bool> mClientRenderingNeedsUpdate;
49 ::ll::TypedStorage<1, 1, bool> mIsBlockBaseLoaded;
50 // NOLINTEND
51
52public:
53 // prevent constructor by default
54 BeaconBlockActor();
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59 virtual ~BeaconBlockActor() /*override*/;
60
61 virtual void tick(::BlockSource& region) /*override*/;
62
63 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
64
65 virtual void load(::ILevel& tag, ::CompoundTag const&, ::DataLoadHelper&) /*override*/;
66
67 virtual bool hasAlphaLayer() const /*override*/;
68
69 virtual bool isPermanentlyRendered() const /*override*/;
70
71 virtual bool isWithinRenderDistance(::Vec3 const& cameraPosition) const /*override*/;
72
73 virtual ::ItemStack const& getItem(int) const /*override*/;
74
75 virtual void setItem(int, ::ItemStack const&) /*override*/;
76
77 virtual void removeItem(int slot, int count) /*override*/;
78
79 virtual ::std::string getName() const /*override*/;
80
81 virtual int getContainerSize() const /*override*/;
82
83 virtual int getMaxStackSize() const /*override*/;
84
85 virtual void startOpen(::Actor&) /*override*/;
86
87 virtual void stopOpen(::Actor& actor) /*override*/;
88
89 virtual void
90 serverInitItemStackIds(int onNetIdChanged, int, ::std::function<void(int, ::ItemStack const&)>) /*override*/;
91
92 virtual ::Container* getContainer() /*override*/;
93
94 virtual ::Container const* getContainer() const /*override*/;
95
96 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
97
98 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
99 // NOLINTEND
100
101public:
102 // member functions
103 // NOLINTBEGIN
104 MCAPI BeaconBlockActor(::BlockPos const& pos, bool permanentlyRendered);
105
106 MCAPI void _applyEffects(::BlockSource& region);
107
108 MCAPI int _getEffectTier(int effectId) const;
109
110 MCAPI void
111 _notifyBeamSectionsChange(::BlockSource& region, ::std::vector<::BeaconBeamSection> const& oldBeamSections);
112
113 MCAPI bool _saveClientSideState(::CompoundTag& tag, ::SaveContext const&) const;
114
115 MCAPI void checkAchievement(::BlockSource& region);
116
117 MCAPI void checkShape(::BlockSource& region);
118
119#ifdef LL_PLAT_C
120 MCAPI bool clientRenderingNeedsUpdate() const;
121#endif
122
123 MCAPI void generateBeamSections(::BlockSource& region);
124
125#ifdef LL_PLAT_C
126 MCAPI ::CompoundTag getBeaconData(::SaveContext const& saveContext);
127
128 MCFOLD ::std::vector<::MobEffect*> const& getEffects() const;
129
130 MCAPI int getMaxSelections() const;
131#endif
132
133 MCAPI bool isEffectAvailable(int effectId) const;
134
135 MCAPI bool isSecondaryAvailable() const;
136
137 MCAPI bool setPrimaryEffect(int effectId);
138
139 MCAPI bool setSecondaryEffect(int effectId);
140 // NOLINTEND
141
142public:
143 // static functions
144 // NOLINTBEGIN
145 MCAPI static ::BlockColor _getMediumColor(::BlockType const& medium);
146
147 MCAPI static bool isPaymentItem(::ItemDescriptor const& pItem);
148 // NOLINTEND
149
150public:
151 // constructor thunks
152 // NOLINTBEGIN
153 MCAPI void* $ctor(::BlockPos const& pos, bool permanentlyRendered);
154 // NOLINTEND
155
156public:
157 // destructor thunk
158 // NOLINTBEGIN
159 MCAPI void $dtor();
160 // NOLINTEND
161
162public:
163 // virtual function thunks
164 // NOLINTBEGIN
165 MCAPI void $tick(::BlockSource& region);
166
167 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
168
169 MCAPI void $load(::ILevel& tag, ::CompoundTag const&, ::DataLoadHelper&);
170
171 MCFOLD bool $hasAlphaLayer() const;
172
173 MCAPI bool $isPermanentlyRendered() const;
174
175 MCAPI bool $isWithinRenderDistance(::Vec3 const& cameraPosition) const;
176
177 MCFOLD ::ItemStack const& $getItem(int) const;
178
179 MCFOLD void $setItem(int, ::ItemStack const&);
180
181 MCFOLD void $removeItem(int slot, int count);
182
183 MCAPI ::std::string $getName() const;
184
185 MCFOLD int $getContainerSize() const;
186
187 MCFOLD int $getMaxStackSize() const;
188
189 MCFOLD void $startOpen(::Actor&);
190
191 MCFOLD void $stopOpen(::Actor& actor);
192
193 MCFOLD void $serverInitItemStackIds(int onNetIdChanged, int, ::std::function<void(int, ::ItemStack const&)>);
194
195 MCFOLD ::Container* $getContainer();
196
197 MCFOLD ::Container const* $getContainer() const;
198
199 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
200
201 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
202
203
204 // NOLINTEND
205
206public:
207 // vftables
208 // NOLINTBEGIN
209 MCAPI static void** $vftableForBlockActor();
210
211 MCAPI static void** $vftableForContainer();
212 // NOLINTEND
213};
Definition Actor.h:125
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition BlockType.h:84
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:219
Definition ItemDescriptor.h:25
Definition ItemStack.h:35
Definition MobEffect.h:26
Definition SaveContext.h:5
Definition Vec3.h:10
Definition BeaconBeamSection.h:8