44 ::ll::TypedStorage<8, 8, ::ChestBlockActor&> mChest;
45 ::ll::TypedStorage<1, 1, bool> mIsUsed;
46 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mActorId;
51 ChestCloser& operator=(ChestCloser
const&);
52 ChestCloser(ChestCloser
const&);
59 ::ll::TypedStorage<4, 4, float> mSpeed;
60 ::ll::TypedStorage<1, 1, bool> mIsGlobalChest;
61 ::ll::TypedStorage<1, 1, bool> mUsesBlockTypeDetection;
62 ::ll::TypedStorage<4, 4, float> mObstructionHeight;
64 ::ll::TypedStorage<4, 4, float> mOpenness;
65 ::ll::TypedStorage<4, 4, float> mOldOpenness;
66 ::ll::TypedStorage<1, 1, bool> mIsOpen;
67 ::ll::TypedStorage<4, 4, int> mTickInterval;
68 bool mPairingChanged : 1;
70 bool mDeferredPairLoad : 1;
72 ::ll::TypedStorage<4, 4, int> mDeferredPairX;
73 ::ll::TypedStorage<4, 4, int> mDeferredPairZ;
74 ::ll::TypedStorage<8, 8, ::ChestBlockActor*> mLargeChestPaired;
75 ::ll::TypedStorage<4, 12, ::BlockPos> mLargeChestPairedPosition;
76 ::ll::TypedStorage<1, 2, ::std::optional<::ChestType>> mChestType;
77 ::ll::TypedStorage<1, 1, bool> mIsFindable;
78 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mOpenedByIds;
79 ::ll::TypedStorage<4, 4, int> mUpdateFlags;
80 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::ChestBlockActor::ChestCloser>>> mChestClosers;
90 virtual ~ChestBlockActor() ;
92 virtual int getContainerSize() const ;
94 virtual
int getMaxStackSize() const ;
96 virtual ::
std::
string getName() const ;
98 virtual ::
ItemStack const& getItem(
int slot) const ;
100 virtual
void setItem(
int slot, ::
ItemStack const& item) ;
102 virtual
void setItemWithForceBalance(
int slot, ::
ItemStack const& item,
bool forceBalanced) ;
104 virtual
void serverInitItemStackIds(
107 ::
std::function<
void(
int, ::
ItemStack const&)> onNetIdChanged
122 virtual
void triggerEvent(
int b0,
int b1) ;
124 virtual
void startOpen(::
Actor& actor) ;
128 virtual
void stopOpen(::
Actor& actor) ;
136 virtual
int clearInventory(
int resizeTo) ;
138 virtual ::Container* getContainer() ;
140 virtual ::Container const* getContainer() const ;
142 virtual
void onMove() ;
146 virtual
void openBy(::
Player& p);
148 virtual
void setContainerChanged(
int slot) ;
150 virtual
bool canPushInItem(
int,
int, ::
ItemStack const&) const ;
152 virtual
bool canPullOutItem(
int,
int, ::
ItemStack const&) const ;
154 virtual
void getDebugText(
155 ::
std::vector<::
std::
string>& outputInfo,
164 virtual
void initializeContainerContents(::
BlockSource& region) ;
170 virtual
bool _canOpenThis(::
BlockSource& region) const;
172 virtual ::
AABB getObstructionAABB() const;
174 virtual
bool _detectEntityObstruction(::
BlockSource& region) const;
176 virtual ::SharedTypes::Legacy::LevelSoundEvent getOpenSound() const;
178 virtual ::SharedTypes::Legacy::LevelSoundEvent getCloseSound() const;
184 MCAPI ChestBlockActor(
185 ::BlockActorType type,
186 ::BlockActorRendererId renderId,
187 ::
std::optional<::ChestType> chestType,
193 MCAPI
bool _detectBlockObstruction(::
BlockSource& region) const;
195 MCAPI
void _pairWith(::ChestBlockActor* chest, ::
BlockSource& region,
bool isLead);
201 MCAPI
void _unpair();
203 MCAPI
void _validatePairedChest(::
BlockSource& region);
207 MCAPI
bool canPairWith(::BlockActor* entity, ::
BlockSource& region);
211 MCAPI ::
std::weak_ptr<::ChestBlockActor::
ChestCloser> getChestCloser(::
Actor& closingActor);
213 MCAPI
void pairWithLeadChest(::ChestBlockActor* leadChest, ::
BlockSource& region);
227 MCAPI_C static ::
std::unique_ptr<::ChestBlockActor>
228 createChestBlockEntity(::
std::optional<::ChestType> const& chestType, ::
BlockPos const& pos);
235 ::BlockActorType type,
236 ::BlockActorRendererId renderId,
237 ::
std::optional<::ChestType> chestType,
251 MCAPI
int $getContainerSize() const;
253 MCFOLD
int $getMaxStackSize() const;
255 MCAPI ::
std::
string $getName() const;
257 MCAPI ::
ItemStack const& $getItem(
int slot) const;
259 MCAPI
void $setItem(
int slot, ::
ItemStack const& item);
261 MCFOLD
void $setItemWithForceBalance(
int slot, ::
ItemStack const& item,
bool forceBalanced);
263 MCAPI
void $serverInitItemStackIds(
266 ::
std::function<
void(
int, ::
ItemStack const&)> onNetIdChanged
281 MCAPI
void $triggerEvent(
int b0,
int b1);
283 MCAPI
void $startOpen(::
Actor& actor);
287 MCAPI
void $stopOpen(::
Actor& actor);
295 MCAPI
int $clearInventory(
int resizeTo);
297 MCFOLD ::Container* $getContainer();
299 MCFOLD ::Container const* $getContainer() const;
301 MCFOLD
void $onMove();
305 MCAPI
void $openBy(::
Player& p);
307 MCAPI
void $setContainerChanged(
int slot);
309 MCFOLD
bool $canPushInItem(
int,
int, ::
ItemStack const&) const;
311 MCFOLD
bool $canPullOutItem(
int,
int, ::
ItemStack const&) const;
313 MCAPI
void $getDebugText(
314 ::
std::vector<::
std::
string>& outputInfo,
323 MCAPI
void $initializeContainerContents(::
BlockSource& region);
329 MCAPI
bool $_canOpenThis(::
BlockSource& region) const;
331 MCAPI ::
AABB $getObstructionAABB() const;
333 MCAPI
bool $_detectEntityObstruction(::
BlockSource& region) const;
335 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getOpenSound() const;
337 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getCloseSound() const;
345 MCAPI static
void** $vftableForFillingContainer();
347 MCAPI static
void** $vftableForRandomizableBlockActorContainerBase();
Definition ContainerContentChangeListener.h:5
Definition SaveContext.h:5