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