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