32class ChestBlockActor :
public ::RandomizableBlockActorFillingContainer {
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&);
65 ::ll::TypedStorage<4, 4, float> mSpeed;
66 ::ll::TypedStorage<1, 1, bool> mIsGlobalChest;
67 ::ll::TypedStorage<1, 1, bool> mAlwayCheckObstructionComponent;
68 ::ll::TypedStorage<4, 4, float> mObstructionHeight;
70 ::ll::TypedStorage<4, 4, float> mOpenness;
71 ::ll::TypedStorage<4, 4, float> mOldOpenness;
72 ::ll::TypedStorage<1, 1, bool> mIsOpen;
73 ::ll::TypedStorage<4, 4, int> mTickInterval;
74 bool mPairingChanged : 1;
76 bool mDeferredPairLoad : 1;
78 ::ll::TypedStorage<4, 4, int> mDeferredPairX;
79 ::ll::TypedStorage<4, 4, int> mDeferredPairZ;
80 ::ll::TypedStorage<8, 8, ::ChestBlockActor*> mLargeChestPaired;
81 ::ll::TypedStorage<4, 12, ::BlockPos> mLargeChestPairedPosition;
82 ::ll::TypedStorage<1, 2, ::std::optional<::ChestType>> mChestType;
83 ::ll::TypedStorage<1, 1, bool> mIsFindable;
84 ::ll::TypedStorage<8, 64, ::std::unordered_set<::ActorUniqueID>> mOpenedByIds;
85 ::ll::TypedStorage<4, 4, int> mUpdateFlags;
86 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::ChestBlockActor::ChestCloser>>> mChestClosers;
96 virtual ~ChestBlockActor() ;
98 virtual bool isTypeOrDerived(::BlockActorType type)
const ;
100 virtual int getContainerSize() const ;
102 virtual
int getMaxStackSize() const ;
104 virtual ::
std::
string getName() const ;
106 virtual ::
ItemStack const& getItem(
int slot) const ;
108 virtual
void setItem(
int slot, ::
ItemStack const& item) ;
110 virtual
void setItemWithForceBalance(
int slot, ::
ItemStack const& item,
bool forceBalanced) ;
112 virtual
void serverInitItemStackIds(
115 ::
std::function<
void(
int, ::
ItemStack const&)> onNetIdChanged
126 virtual
bool saveItemInstanceData(::
CompoundTag& base) const ;
130 virtual
void triggerEvent(
int b0,
int b1) ;
132 virtual
void startOpen(::
Actor& actor) ;
136 virtual
void stopOpen(::
Actor& actor) ;
145 virtual
int clearInventory(
int resizeTo) ;
147 virtual ::Container* getContainer() ;
149 virtual ::Container const* getContainer() const ;
151 virtual
void onMove() ;
155 virtual
void openBy(::
Player& p);
157 virtual
void setContainerChanged(
int slot) ;
159 virtual
bool canPushInItem(
int slot,
int face, ::
ItemStack const& item) const ;
161 virtual
bool canPullOutItem(
int,
int, ::
ItemStack const&) const ;
163 virtual
void getDebugText(
164 ::
std::vector<::
std::
string>& outputInfo,
173 virtual
void initializeContainerContents(::
BlockSource& region) ;
179 virtual
bool _canOpenThis(::
BlockSource& region) const;
181 virtual ::
AABB getObstructionAABB() const;
183 virtual
bool _detectEntityObstruction(::
BlockSource& region) const;
185 virtual ::SharedTypes::Legacy::LevelSoundEvent getOpenSound() const;
187 virtual ::SharedTypes::Legacy::LevelSoundEvent getCloseSound() const;
193 MCAPI ChestBlockActor(
194 ::BlockActorType type,
195 ::BlockActorRendererId renderId,
196 ::
std::optional<::ChestType> chestType,
202 MCAPI
void _pairWith(::ChestBlockActor* chest, ::
BlockSource& region,
bool isLead);
210 MCAPI ::
std::weak_ptr<::ChestBlockActor::
ChestCloser> getChestCloser(::
Actor& closingActor);
218 MCAPI static ::
std::unique_ptr<::ChestBlockActor>
219 createChestBlockEntity(::
std::optional<::ChestType> const& chestType, ::
BlockPos const& pos);
226 ::BlockActorType type,
227 ::BlockActorRendererId renderId,
228 ::
std::optional<::ChestType> chestType,
242 MCAPI
bool $isTypeOrDerived(::BlockActorType type) const;
244 MCAPI
int $getContainerSize() const;
246 MCFOLD
int $getMaxStackSize() const;
248 MCAPI ::
std::
string $getName() const;
250 MCAPI ::
ItemStack const& $getItem(
int slot) const;
252 MCAPI
void $setItem(
int slot, ::
ItemStack const& item);
254 MCFOLD
void $setItemWithForceBalance(
int slot, ::
ItemStack const& item,
bool forceBalanced);
256 MCAPI
void $serverInitItemStackIds(
259 ::
std::function<
void(
int, ::
ItemStack const&)> onNetIdChanged
270 MCAPI
bool $saveItemInstanceData(::
CompoundTag& base) const;
274 MCAPI
void $triggerEvent(
int b0,
int b1);
276 MCAPI
void $startOpen(::
Actor& actor);
280 MCAPI
void $stopOpen(::
Actor& actor);
288 MCAPI
int $clearInventory(
int resizeTo);
290 MCFOLD ::Container* $getContainer();
292 MCFOLD ::Container const* $getContainer() const;
294 MCFOLD
void $onMove();
298 MCAPI
void $openBy(::
Player& p);
300 MCAPI
void $setContainerChanged(
int slot);
302 MCFOLD
bool $canPushInItem(
int slot,
int face, ::
ItemStack const& item) const;
304 MCFOLD
bool $canPullOutItem(
int,
int, ::
ItemStack const&) const;
306 MCAPI
void $getDebugText(
307 ::
std::vector<::
std::
string>& outputInfo,
316 MCAPI
void $initializeContainerContents(::
BlockSource& region);
322 MCAPI
bool $_canOpenThis(::
BlockSource& region) const;
324 MCAPI ::
AABB $getObstructionAABB() const;
326 MCAPI
bool $_detectEntityObstruction(::
BlockSource& region) const;
328 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getOpenSound() const;
330 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getCloseSound() const;
Definition ContainerContentChangeListener.h:5
Definition SaveContext.h:5