31class ChestBlockActor :
public ::RandomizableBlockActorFillingContainer {
43 ::ll::TypedStorage<8, 8, ::ChestBlockActor&> mChest;
44 ::ll::TypedStorage<1, 1, bool> mIsUsed;
45 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mActorId;
50 ChestCloser& operator=(ChestCloser
const&);
51 ChestCloser(ChestCloser
const&);
64 ::ll::TypedStorage<4, 4, float> mSpeed;
65 ::ll::TypedStorage<1, 1, bool> mIsGlobalChest;
66 ::ll::TypedStorage<1, 1, bool> mAlwayCheckObstructionComponent;
67 ::ll::TypedStorage<4, 4, float> mObstructionHeight;
69 ::ll::TypedStorage<4, 4, float> mOpenness;
70 ::ll::TypedStorage<4, 4, float> mOldOpenness;
71 ::ll::TypedStorage<1, 1, bool> mIsOpen;
72 ::ll::TypedStorage<4, 4, int> mTickInterval;
73 bool mPairingChanged : 1;
75 bool mDeferredPairLoad : 1;
77 ::ll::TypedStorage<4, 4, int> mDeferredPairX;
78 ::ll::TypedStorage<4, 4, int> mDeferredPairZ;
79 ::ll::TypedStorage<8, 8, ::ChestBlockActor*> mLargeChestPaired;
80 ::ll::TypedStorage<4, 12, ::BlockPos> mLargeChestPairedPosition;
81 ::ll::TypedStorage<1, 2, ::std::optional<::ChestType>> mChestType;
82 ::ll::TypedStorage<1, 1, bool> mIsFindable;
83 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mOpenedByIds;
84 ::ll::TypedStorage<4, 4, int> mUpdateFlags;
85 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::ChestBlockActor::ChestCloser>>> mChestClosers;
95 virtual ~ChestBlockActor() ;
97 virtual int getContainerSize() const ;
99 virtual
int getMaxStackSize() const ;
101 virtual ::
std::
string getName() const ;
103 virtual ::
ItemStack const& getItem(
int slot) const ;
105 virtual
void setItem(
int slot, ::
ItemStack const& item) ;
107 virtual
void setItemWithForceBalance(
int slot, ::
ItemStack const& item,
bool forceBalanced) ;
109 virtual
void serverInitItemStackIds(
112 ::
std::function<
void(
int, ::
ItemStack const&)> onNetIdChanged
127 virtual
void triggerEvent(
int b0,
int b1) ;
129 virtual
void startOpen(::
Actor& actor) ;
133 virtual
void stopOpen(::
Actor& actor) ;
141 virtual
int clearInventory(
int resizeTo) ;
143 virtual ::Container* getContainer() ;
145 virtual ::Container const* getContainer() const ;
147 virtual
void onMove() ;
151 virtual
void openBy(::
Player& p);
153 virtual
void setContainerChanged(
int slot) ;
155 virtual
bool canPushInItem(
int slot,
int face, ::
ItemStack const& item) const ;
157 virtual
bool canPullOutItem(
int,
int, ::
ItemStack const&) const ;
159 virtual
void getDebugText(
160 ::
std::vector<::
std::
string>& outputInfo,
169 virtual
void initializeContainerContents(::
BlockSource& region) ;
175 virtual
bool _canOpenThis(::
BlockSource& region) const;
177 virtual ::
AABB getObstructionAABB() const;
179 virtual
bool _detectEntityObstruction(::
BlockSource& region) const;
181 virtual ::SharedTypes::Legacy::LevelSoundEvent getOpenSound() const;
183 virtual ::SharedTypes::Legacy::LevelSoundEvent getCloseSound() const;
189 MCAPI ChestBlockActor(
190 ::BlockActorType type,
191 ::BlockActorRendererId renderId,
192 ::
std::optional<::ChestType> chestType,
198 MCAPI
bool _detectBlockObstruction(::
BlockSource& region) const;
200 MCAPI
void _pairWith(::ChestBlockActor* chest, ::
BlockSource& region,
bool isLead);
206 MCAPI
void _validatePairedChest(::
BlockSource& region);
210 MCAPI
bool canPairWith(::BlockActor* entity, ::
BlockSource& region);
214 MCAPI ::
std::weak_ptr<::ChestBlockActor::
ChestCloser> getChestCloser(::
Actor& closingActor);
217 MCAPI
bool getIsGlobalChest();
220 MCAPI ::ChestBlockActor& getMainChest();
223 MCAPI
float getModelOffsetX()
const;
225 MCAPI
float getOldOpenness()
const;
228 MCAPI
int getOpenCount()
const;
230 MCAPI
float getOpenness()
const;
232 MCFOLD ::BlockPos
const& getPairedChestPosition()
const;
234 MCAPI
bool isFindable()
const;
236 MCAPI
bool isLargeChest()
const;
238 MCAPI
bool isMainSubchest()
const;
242 MCAPI
void pairWithLeadChest(::ChestBlockActor* leadChest,
::BlockSource& region);
248 MCAPI
void setFindable(
bool isFindable);
256 MCAPI static ::std::unique_ptr<::ChestBlockActor>
257 createChestBlockEntity(::std::optional<::ChestType>
const& chestType,
::BlockPos const& pos);
264 ::BlockActorType type,
265 ::BlockActorRendererId renderId,
266 ::std::optional<::ChestType> chestType,
280 MCAPI
int $getContainerSize()
const;
282 MCFOLD
int $getMaxStackSize()
const;
284 MCAPI ::std::string $getName()
const;
286 MCAPI ::ItemStack
const& $getItem(
int slot)
const;
288 MCAPI
void $setItem(
int slot,
::ItemStack const& item);
290 MCFOLD
void $setItemWithForceBalance(
int slot,
::ItemStack const& item,
bool forceBalanced);
292 MCAPI
void $serverInitItemStackIds(
295 ::std::function<
void(
int,
::ItemStack const&)> onNetIdChanged
310 MCAPI
void $triggerEvent(
int b0,
int b1);
312 MCAPI
void $startOpen(
::Actor& actor);
316 MCAPI
void $stopOpen(
::Actor& actor);
324 MCAPI
int $clearInventory(
int resizeTo);
326 MCFOLD ::Container* $getContainer();
328 MCFOLD ::Container
const* $getContainer()
const;
330 MCFOLD
void $onMove();
336 MCAPI
void $setContainerChanged(
int slot);
338 MCFOLD
bool $canPushInItem(
int slot,
int face,
::ItemStack const& item)
const;
340 MCFOLD
bool $canPullOutItem(
int,
int,
::ItemStack const&)
const;
342 MCAPI
void $getDebugText(
343 ::std::vector<::std::string>& outputInfo,
352 MCAPI
void $initializeContainerContents(
::BlockSource& region);
354 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(
::BlockSource&);
360 MCAPI ::AABB $getObstructionAABB()
const;
362 MCAPI
bool $_detectEntityObstruction(
::BlockSource& region)
const;
364 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getOpenSound()
const;
366 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getCloseSound()
const;
376 MCAPI
static void** $vftableForRandomizableBlockActorContainerBase();
Definition ContainerContentChangeListener.h:5
Definition SaveContext.h:5