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*/ = default;
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& level, ::CompoundTag const& tag, ::DataLoadHelper& 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 slot) const /*override*/;
74
75 virtual void setItem(int slot, ::ItemStack const& item) /*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 serverInitItemStackIds(
90 int containerSlot,
91 int count,
92 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
93 ) /*override*/;
94
95 virtual ::Container* getContainer() /*override*/;
96
97 virtual ::Container const* getContainer() const /*override*/;
98
99 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource& region) /*override*/;
100
101 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
102 // NOLINTEND
103
104public:
105 // member functions
106 // NOLINTBEGIN
107 MCAPI BeaconBlockActor(::BlockPos const& pos, bool permanentlyRendered);
108
109 MCAPI void _applyEffects(::BlockSource& region);
110
111 MCAPI void
112 _notifyBeamSectionsChange(::BlockSource& region, ::std::vector<::BeaconBeamSection> const& oldBeamSections);
113
114 MCAPI bool _saveClientSideState(::CompoundTag& tag, ::SaveContext const& saveContext) const;
115
116 MCAPI bool _setEffect(int effectId, int& outEffectId, int& outTier);
117
118 MCAPI void checkAchievement(::BlockSource& region);
119
120 MCAPI void checkShape(::BlockSource& region);
121
122 MCAPI void generateBeamSections(::BlockSource& region);
123
124 MCAPI ::CompoundTag getBeaconData(::SaveContext const& saveContext);
125
126 MCAPI bool isEffectAvailable(int effectId) const;
127
128 MCAPI bool setSecondaryEffect(int effectId);
129 // NOLINTEND
130
131public:
132 // static functions
133 // NOLINTBEGIN
134 MCAPI static ::BlockColor _getMediumColor(::BlockType const& medium);
135
136 MCAPI static bool isPaymentItem(::ItemDescriptor const& pItem);
137 // NOLINTEND
138
139public:
140 // constructor thunks
141 // NOLINTBEGIN
142 MCAPI void* $ctor(::BlockPos const& pos, bool permanentlyRendered);
143 // NOLINTEND
144
145public:
146 // virtual function thunks
147 // NOLINTBEGIN
148 MCAPI void $tick(::BlockSource& region);
149
150 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
151
152 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
153
154 MCFOLD bool $hasAlphaLayer() const;
155
156 MCFOLD bool $isPermanentlyRendered() const;
157
158 MCAPI bool $isWithinRenderDistance(::Vec3 const& cameraPosition) const;
159
160 MCFOLD ::ItemStack const& $getItem(int slot) const;
161
162 MCFOLD void $setItem(int slot, ::ItemStack const& item);
163
164 MCFOLD void $removeItem(int slot, int count);
165
166 MCAPI ::std::string $getName() const;
167
168 MCFOLD int $getContainerSize() const;
169
170 MCFOLD int $getMaxStackSize() const;
171
172 MCFOLD void $startOpen(::Actor&);
173
174 MCFOLD void $stopOpen(::Actor& actor);
175
176 MCFOLD void $serverInitItemStackIds(
177 int containerSlot,
178 int count,
179 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
180 );
181
182 MCFOLD ::Container* $getContainer();
183
184 MCFOLD ::Container const* $getContainer() const;
185
186 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource& region);
187
188 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
189
190
191 // NOLINTEND
192
193public:
194 // vftables
195 // NOLINTBEGIN
196 MCAPI static void** $vftableForBlockActor();
197
198 MCAPI static void** $vftableForContainer();
199 // NOLINTEND
200};
Definition Actor.h:105
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition BlockType.h:84
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20
Definition ILevel.h:214
Definition ItemDescriptor.h:23
Definition ItemStack.h:26
Definition MobEffect.h:27
Definition SaveContext.h:5
Definition Vec3.h:10
Definition BeaconBeamSection.h:8