LeviLamina
Loading...
Searching...
No Matches
ComplexInventoryTransaction.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/InventoryTransaction.h"
9#include "mc/world/inventory/transaction/InventoryTransactionError.h"
10
11// auto generated forward declare list
12// clang-format off
13class BinaryStream;
14class BlockPalette;
15class Player;
17// clang-format on
18
20public:
21 // ComplexInventoryTransaction inner types define
22 enum class Type : uint {
23 NormalTransaction = 0,
24 InventoryMismatch = 1,
25 ItemUseTransaction = 2,
26 ItemUseOnEntityTransaction = 3,
27 ItemReleaseTransaction = 4,
28 };
29
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<4, 4, ::ComplexInventoryTransaction::Type> mType;
34 ::ll::TypedStorage<8, 88, ::InventoryTransaction> mTransaction;
35 // NOLINTEND
36
37public:
38 // virtual functions
39 // NOLINTBEGIN
41
42 virtual ::Bedrock::Result<void> read(::ReadOnlyBinaryStream&);
43
44 virtual void write(::BinaryStream& stream) const;
45
46 virtual void postLoadItems(::BlockPalette& blockPalette, bool isClientSide);
47
48 virtual ::InventoryTransactionError handle(::Player& player, bool isSenderAuthority) const;
49
50 virtual void onTransactionError(::Player& player, ::InventoryTransactionError error) const;
51 // NOLINTEND
52
53public:
54 // static functions
55 // NOLINTBEGIN
56 MCAPI static ::std::unique_ptr<::ComplexInventoryTransaction>
57 fromType(::ComplexInventoryTransaction::Type type, ::InventoryTransaction const& transaction);
58 // NOLINTEND
59
60public:
61 // static variables
62 // NOLINTBEGIN
63 MCAPI static ::BidirectionalUnorderedMap<::ComplexInventoryTransaction::Type, ::std::string> const&
64 transactionTypeMap();
65 // NOLINTEND
66
67public:
68 // destructor thunk
69 // NOLINTBEGIN
70 MCAPI void $dtor();
71 // NOLINTEND
72
73public:
74 // virtual function thunks
75 // NOLINTBEGIN
76 MCFOLD ::Bedrock::Result<void> $read(::ReadOnlyBinaryStream&);
77
78 MCFOLD void $write(::BinaryStream& stream) const;
79
80 MCFOLD void $postLoadItems(::BlockPalette& blockPalette, bool isClientSide);
81
82 MCAPI ::InventoryTransactionError $handle(::Player& player, bool isSenderAuthority) const;
83
84 MCFOLD void $onTransactionError(::Player& player, ::InventoryTransactionError error) const;
85
86
87 // NOLINTEND
88
89public:
90 // vftables
91 // NOLINTBEGIN
92 MCNAPI static void** $vftable();
93 // NOLINTEND
94};
Definition BinaryStream.h:11
Definition BlockPalette.h:19
Definition ComplexInventoryTransaction.h:19
static MCAPI void ** $vftable()
Definition InventoryTransaction.h:21
Definition Player.h:125
Definition ReadOnlyBinaryStream.h:8