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