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