LeviLamina
Loading...
Searching...
No Matches
InventoryTransaction.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/Result.h"
7#include "mc/util/BidirectionalUnorderedMap.h"
8#include "mc/world/inventory/transaction/InventoryTransactionError.h"
9
10// auto generated forward declare list
11// clang-format off
12class BinaryStream;
13class InventoryAction;
14class InventorySource;
16class ItemStack;
17class Player;
19// clang-format on
20
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 64, ::std::unordered_map<::InventorySource, ::std::vector<::InventoryAction>>> mActions;
26 ::ll::TypedStorage<8, 24, ::std::vector<::InventoryTransactionItemGroup>> mContents;
27 // NOLINTEND
28
29public:
30 // prevent constructor by default
33
34public:
35 // member functions
36 // NOLINTBEGIN
38
39 MCAPI void addAction(::InventoryAction const& action);
40
41 MCAPI void addItemToContent(::ItemStack const& item, int count);
42
43 MCAPI ::InventoryTransactionError executeFull(::Player& p, bool isSenderAuthority) const;
44
45 MCAPI void forceBalanceTransaction();
46
47 MCAPI ::std::vector<::InventoryAction> const& getActions(::InventorySource const& source) const;
48
49 MCAPI ::InventoryTransactionError verifyFull(::Player& p, bool isSenderAuthority) const;
50
51 MCAPI void write(::BinaryStream& stream) const;
52
54 // NOLINTEND
55
56public:
57 // static functions
58 // NOLINTBEGIN
59 MCAPI static bool checkTransactionItemsMatch(::ItemStack const& serverItem, ::ItemStack const& clientItem);
60
61 MCAPI static ::Bedrock::Result<::InventoryTransaction> deserialize(::ReadOnlyBinaryStream& stream);
62 // NOLINTEND
63
64public:
65 // static variables
66 // NOLINTBEGIN
67 MCAPI static ::BidirectionalUnorderedMap<::InventoryTransactionError, ::std::string> const&
68 inventoryTransactionErrorMap();
69 // NOLINTEND
70
71public:
72 // constructor thunks
73 // NOLINTBEGIN
74 MCAPI void* $ctor(::InventoryTransaction const&);
75 // NOLINTEND
76
77public:
78 // destructor thunk
79 // NOLINTBEGIN
80 MCAPI void $dtor();
81 // NOLINTEND
82};
Definition BinaryStream.h:10
Definition InventoryAction.h:15
Definition InventorySource.h:9
Definition InventoryTransactionItemGroup.h:11
Definition InventoryTransaction.h:21
Definition ItemStack.h:23
Definition Player.h:123
Definition ReadOnlyBinaryStream.h:8