LeviLamina
Loading...
Searching...
No Matches
LockingFillingContainer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/ContainerType.h"
7#include "mc/world/inventory/FillingContainer.h"
8
9// auto generated forward declare list
10// clang-format off
11class ItemStack;
12class ListTag;
13class SaveContext;
14namespace Bedrock::Threading { class SharedRecursiveMutex; }
15// clang-format on
16
17class LockingFillingContainer : public ::FillingContainer {
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::Bedrock::Threading::SharedRecursiveMutex>> mContainerContextMutex;
22 ::ll::TypedStorage<4, 4, int> mWeightInStorageItem;
23 ::ll::TypedStorage<1, 1, bool> mIsClientSide;
24 // NOLINTEND
25
26public:
27 // prevent constructor by default
28 LockingFillingContainer();
29
30public:
31 // virtual functions
32 // NOLINTBEGIN
33 virtual int clearInventory(int resizeTo) /*override*/;
34
35 virtual void swapSlots(int from, int to) /*override*/;
36
37 virtual void setItemWithForceBalance(int slot, ::ItemStack const& item, bool forceBalanced) /*override*/;
38
39 virtual ::std::unique_ptr<::ListTag> saveToTag(::SaveContext const& saveContext) const /*override*/;
40
41 virtual ::ItemStack const& getItem(int slot) const /*override*/;
42
43 virtual void serverInitItemStackIds(
44 int containerSlot,
45 int count,
46 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
47 ) /*override*/;
48
49 virtual void
50 _trySetInSlot(::ItemStack& item, int const& slot, int const& inventorySize, int& backCompatOffset) /*override*/;
51 // NOLINTEND
52
53public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI LockingFillingContainer(
57 int numTotalSlots,
58 ::SharedTypes::Legacy::ContainerType containerType,
59 ::std::weak_ptr<::Bedrock::Threading::SharedRecursiveMutex> serializationMutex,
60 bool isClientSide
61 );
62
63 MCAPI int getWeightInStorageItem() const;
64 // NOLINTEND
65
66public:
67 // constructor thunks
68 // NOLINTBEGIN
69 MCAPI void* $ctor(
70 int numTotalSlots,
71 ::SharedTypes::Legacy::ContainerType containerType,
72 ::std::weak_ptr<::Bedrock::Threading::SharedRecursiveMutex> serializationMutex,
73 bool isClientSide
74 );
75 // NOLINTEND
76
77public:
78 // virtual function thunks
79 // NOLINTBEGIN
80 MCFOLD int $clearInventory(int resizeTo);
81
82 MCFOLD void $swapSlots(int from, int to);
83
84 MCAPI void $setItemWithForceBalance(int slot, ::ItemStack const& item, bool forceBalanced);
85
86 MCAPI ::std::unique_ptr<::ListTag> $saveToTag(::SaveContext const& saveContext) const;
87
88 MCAPI ::ItemStack const& $getItem(int slot) const;
89
90 MCAPI void $serverInitItemStackIds(
91 int containerSlot,
92 int count,
93 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
94 );
95
96 MCAPI void $_trySetInSlot(::ItemStack& item, int const& slot, int const& inventorySize, int& backCompatOffset);
97
98
99 // NOLINTEND
100
101public:
102 // vftables
103 // NOLINTBEGIN
104 MCAPI static void** $vftable();
105 // NOLINTEND
106};
Definition SharedRecursiveMutex.h:11
Definition ItemStack.h:35
Definition ListTag.h:21
Definition SaveContext.h:5