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
40 // vIndex: 0
42
43 // vIndex: 1
44 virtual ::Bedrock::Result<void> read(::ReadOnlyBinaryStream&);
45
46 // vIndex: 2
47 virtual void write(::BinaryStream& stream) const;
48
49 // vIndex: 3
50 virtual void postLoadItems(::BlockPalette& blockPalette, bool isClientSide);
51
52 // vIndex: 4
53 virtual ::InventoryTransactionError handle(::Player& player, bool isSenderAuthority) const;
54
55 // vIndex: 5
56 virtual void onTransactionError(::Player& player, ::InventoryTransactionError error) const;
57 // NOLINTEND
58
59public:
60 // static functions
61 // NOLINTBEGIN
62 MCAPI static ::std::unique_ptr<::ComplexInventoryTransaction>
63 fromType(::ComplexInventoryTransaction::Type type, ::InventoryTransaction const& transaction);
64 // NOLINTEND
65
66public:
67 // static variables
68 // NOLINTBEGIN
69 MCAPI static ::BidirectionalUnorderedMap<::ComplexInventoryTransaction::Type, ::std::string> const&
70 transactionTypeMap();
71 // NOLINTEND
72
73public:
74 // destructor thunk
75 // NOLINTBEGIN
76 MCAPI void $dtor();
77 // NOLINTEND
78
79public:
80 // virtual function thunks
81 // NOLINTBEGIN
82 MCFOLD ::Bedrock::Result<void> $read(::ReadOnlyBinaryStream&);
83
84 MCFOLD void $write(::BinaryStream& stream) const;
85
86 MCFOLD void $postLoadItems(::BlockPalette& blockPalette, bool isClientSide);
87
88 MCAPI ::InventoryTransactionError $handle(::Player& player, bool isSenderAuthority) const;
89
90 MCFOLD void $onTransactionError(::Player& player, ::InventoryTransactionError error) const;
91 // NOLINTEND
92
93public:
94 // vftables
95 // NOLINTBEGIN
96 MCNAPI static void** $vftable();
97 // NOLINTEND
98};
Definition BinaryStream.h:10
Definition BlockPalette.h:19
Definition ComplexInventoryTransaction.h:19
static MCAPI void ** $vftable()
Definition InventoryTransaction.h:21
Definition Player.h:123
Definition ReadOnlyBinaryStream.h:8