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