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 explicit InventoryTransaction(::std::vector<::InventoryAction> const& in);
40
41 MCAPI void addAction(::InventoryAction const& action);
42
43 MCAPI void addItemToContent(::ItemStack const& item, int count);
44
45 MCAPI ::InventoryTransactionError executeFull(::Player& p, bool isSenderAuthority) const;
46
47 MCAPI void forceBalanceTransaction();
48
49 MCAPI ::std::vector<::InventoryAction> const& getActions(::InventorySource const& source) const;
50
51 MCAPI void markValidActionsForSerialization(bool isClientSide) const;
52
53 MCAPI ::InventoryTransactionError verifyFull(::Player& p, bool isSenderAuthority) const;
54
55 MCAPI void write(::BinaryStream& stream) const;
56
58 // NOLINTEND
59
60public:
61 // static functions
62 // NOLINTBEGIN
63 MCAPI static bool checkTransactionItemsMatch(::ItemStack const& serverItem, ::ItemStack const& clientItem);
64
65 MCAPI static ::Bedrock::Result<::InventoryTransaction> deserialize(::ReadOnlyBinaryStream& stream);
66 // NOLINTEND
67
68public:
69 // static variables
70 // NOLINTBEGIN
71 MCAPI static ::BidirectionalUnorderedMap<::InventoryTransactionError, ::std::string> const&
72 inventoryTransactionErrorMap();
73 // NOLINTEND
74
75public:
76 // constructor thunks
77 // NOLINTBEGIN
78 MCAPI void* $ctor(::InventoryTransaction const&);
79
80 MCAPI void* $ctor(::std::vector<::InventoryAction> const& in);
81 // NOLINTEND
82
83public:
84 // destructor thunk
85 // NOLINTBEGIN
86 MCAPI void $dtor();
87 // NOLINTEND
88};
Definition BinaryStream.h:10
Definition InventoryAction.h:15
Definition InventorySource.h:9
Definition InventoryTransactionItemGroup.h:11
Definition InventoryTransaction.h:21
Definition ItemStack.h:25
Definition Player.h:119
Definition ReadOnlyBinaryStream.h:8