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
21class InventoryTransaction {
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
31 InventoryTransaction& operator=(InventoryTransaction const&);
32 InventoryTransaction();
33
34public:
35 // member functions
36 // NOLINTBEGIN
37 MCAPI InventoryTransaction(::InventoryTransaction const&);
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 void markValidActionsForSerialization(bool isClientSide) const;
50
51 MCAPI ::InventoryTransactionError verifyFull(::Player& p, bool isSenderAuthority) const;
52
53 MCAPI void write(::BinaryStream& stream) const;
54
55 MCAPI ~InventoryTransaction();
56 // NOLINTEND
57
58public:
59 // static functions
60 // NOLINTBEGIN
61 MCAPI static bool checkTransactionItemsMatch(::ItemStack const& serverItem, ::ItemStack const& clientItem);
62
63 MCAPI static ::Bedrock::Result<::InventoryTransaction> deserialize(::ReadOnlyBinaryStream& stream);
64 // NOLINTEND
65
66public:
67 // static variables
68 // NOLINTBEGIN
69 MCAPI static ::BidirectionalUnorderedMap<::InventoryTransactionError, ::std::string> const&
70 inventoryTransactionErrorMap();
71 // NOLINTEND
72
73public:
74 // constructor thunks
75 // NOLINTBEGIN
76 MCAPI void* $ctor(::InventoryTransaction const&);
77 // NOLINTEND
78
79public:
80 // destructor thunk
81 // NOLINTBEGIN
82 MCAPI void $dtor();
83 // NOLINTEND
84};
Definition BinaryStream.h:11
Definition InventoryAction.h:15
Definition InventorySource.h:9
Definition InventoryTransactionItemGroup.h:11
Definition ItemStack.h:26
Definition Player.h:125
Definition ReadOnlyBinaryStream.h:8