Skip to content
LeviMC
English
AutoLightDark
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 MCNAPI int _getEffectTier(int effectId) const;
108
109 MCNAPI void
110 _notifyBeamSectionsChange(::BlockSource& region, ::std::vector<::BeaconBeamSection> const& oldBeamSections);
111
112#ifdef LL_PLAT_C
113 MCNAPI bool _saveClientSideState(::CompoundTag& tag, ::SaveContext const& saveContext) const;
114#endif
115
116#ifdef LL_PLAT_S
117 MCNAPI bool _saveClientSideState(::CompoundTag& tag, ::SaveContext const& saveContext) const;
118#endif
119
120#ifdef LL_PLAT_C
121 MCAPI void checkShape(::BlockSource& region);
122
123 MCNAPI void generateBeamSections(::BlockSource& region);
124#endif
125
126 MCNAPI bool setSecondaryEffect(int effectId);
127 // NOLINTEND
128
129public:
130 // static functions
131 // NOLINTBEGIN
132 MCNAPI 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 MCNAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
147
148 MCNAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
149
150 MCNAPI bool $hasAlphaLayer() const;
151
152 MCNAPI bool $isPermanentlyRendered() const;
153
154 MCNAPI bool $isWithinRenderDistance(::Vec3 const& cameraPosition) const;
155
156 MCNAPI ::ItemStack const& $getItem(int slot) const;
157
158 MCNAPI void $setItem(int slot, ::ItemStack const& item);
159
160 MCNAPI void $removeItem(int slot, int count);
161
162 MCNAPI ::std::string $getName() const;
163
164 MCNAPI int $getContainerSize() const;
165
166 MCNAPI int $getMaxStackSize() const;
167
168 MCNAPI void $startOpen(::Actor&);
169
170 MCNAPI void $stopOpen(::Actor& actor);
171
173 int containerSlot,
174 int count,
175 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
176 );
177
178 MCNAPI ::Container* $getContainer();
179
180 MCNAPI ::Container const* $getContainer() const;
181
182 MCNAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource& region);
183
184 MCNAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
185
186
187 // NOLINTEND
188};
Definition Actor.h:116
static MCAPI bool isPaymentItem(::ItemDescriptor const &pItem)
MCAPI void $setItem(int slot, ::ItemStack const &item)
MCAPI::ItemStack const & $getItem(int slot) const
MCAPI void $load(::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
MCAPI void $_onUpdatePacket(::CompoundTag const &data, ::BlockSource &region)
MCAPI void $stopOpen(::Actor &actor)
MCAPI ::std::unique_ptr<::BlockActorDataPacket > $_getUpdatePacket(::BlockSource &region)
MCAPI::std::string $getName() const
MCAPI::Container * $getContainer()
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI void _notifyBeamSectionsChange(::BlockSource &region, ::std::vector<::BeaconBeamSection > const &oldBeamSections)
MCAPI void $startOpen(::Actor &)
MCAPI bool $isWithinRenderDistance(::Vec3 const &cameraPosition) const
MCAPI int _getEffectTier(int effectId) const
MCAPI int $getMaxStackSize() const
MCAPI void $removeItem(int slot, int count)
MCAPI bool $hasAlphaLayer() const
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
MCAPI::Container const * $getContainer() const
MCAPI bool $isPermanentlyRendered() const
MCAPI int $getContainerSize() const
MCAPI bool setSecondaryEffect(int effectId)
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
Definition ILevel.h:223
Definition ItemDescriptor.h:24
Definition ItemStack.h:26
Definition MobEffect.h:27
Definition SaveContext.h:5
Definition Vec3.h:10
Definition BeaconBeamSection.h:8