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
52 virtual ~LockingFillingContainer() /*override*/ = default;
53 // NOLINTEND
54
55public:
56 // member functions
57 // NOLINTBEGIN
58 MCAPI LockingFillingContainer(
59 int numTotalSlots,
60 ::SharedTypes::Legacy::ContainerType containerType,
61 ::std::weak_ptr<::Bedrock::Threading::SharedRecursiveMutex> serializationMutex,
62 bool isClientSide
63 );
64
65 MCAPI int getWeightInStorageItem() const;
66 // NOLINTEND
67
68public:
69 // constructor thunks
70 // NOLINTBEGIN
71 MCAPI void* $ctor(
72 int numTotalSlots,
73 ::SharedTypes::Legacy::ContainerType containerType,
74 ::std::weak_ptr<::Bedrock::Threading::SharedRecursiveMutex> serializationMutex,
75 bool isClientSide
76 );
77 // NOLINTEND
78
79public:
80 // virtual function thunks
81 // NOLINTBEGIN
82 MCFOLD int $clearInventory(int resizeTo);
83
84 MCFOLD void $swapSlots(int from, int to);
85
86 MCAPI void $setItemWithForceBalance(int slot, ::ItemStack const& item, bool forceBalanced);
87
88 MCAPI ::std::unique_ptr<::ListTag> $saveToTag(::SaveContext const& saveContext) const;
89
90 MCAPI ::ItemStack const& $getItem(int slot) const;
91
92 MCAPI void $serverInitItemStackIds(
93 int containerSlot,
94 int count,
95 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
96 );
97
98 MCAPI void $_trySetInSlot(::ItemStack& item, int const& slot, int const& inventorySize, int& backCompatOffset);
99
100
101 // NOLINTEND
102
103public:
104 // vftables
105 // NOLINTBEGIN
106 MCAPI static void** $vftable();
107 // NOLINTEND
108};
Definition SharedRecursiveMutex.h:10
Definition FillingContainer.h:17
Definition ItemStack.h:26
Definition ListTag.h:20
Definition SaveContext.h:5