Skip to content
LeviMC
English
AutoLightDark
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/util/BidirectionalUnorderedMap.h"
7#include "mc/world/inventory/transaction/InventoryTransaction.h"
8#include "mc/world/inventory/transaction/InventoryTransactionError.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPalette;
13class EntityContext;
14class Player;
15// clang-format on
16
18public:
19 // ComplexInventoryTransaction inner types define
20 enum class Type : uint {
21 NormalTransaction = 0,
22 InventoryMismatch = 1,
23 ItemUseTransaction = 2,
24 ItemUseOnEntityTransaction = 3,
25 ItemReleaseTransaction = 4,
26 };
27
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<4, 4, ::ComplexInventoryTransaction::Type> mType;
32 ::ll::TypedStorage<8, 88, ::InventoryTransaction> mTransaction;
33 // NOLINTEND
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual ~ComplexInventoryTransaction() = default;
39
40 virtual void postLoadItems(::BlockPalette& blockPalette, bool isClientSide);
41
42 virtual ::InventoryTransactionError handle(::Player& player, bool isSenderAuthority) const;
43
44 virtual void onTransactionError(::Player& player, ::InventoryTransactionError error) const;
45 // NOLINTEND
46
47public:
48 // static functions
49 // NOLINTBEGIN
50 MCNAPI static void _setDepenetrationOverride(::EntityContext& entity);
51
52 MCAPI static ::std::unique_ptr<::ComplexInventoryTransaction>
53 fromType(::ComplexInventoryTransaction::Type type, ::InventoryTransaction const& transaction);
54
55 MCNAPI static ::std::string const getTransactionTypeName(::ComplexInventoryTransaction::Type type);
56 // NOLINTEND
57
58public:
59 // static variables
60 // NOLINTBEGIN
61 MCNAPI static ::BidirectionalUnorderedMap<::ComplexInventoryTransaction::Type, ::std::string> const&
63 // NOLINTEND
64
65public:
66 // virtual function thunks
67 // NOLINTBEGIN
68 MCNAPI void $postLoadItems(::BlockPalette& blockPalette, bool isClientSide);
69
70 MCAPI ::InventoryTransactionError $handle(::Player& player, bool isSenderAuthority) const;
71
72 MCNAPI void $onTransactionError(::Player& player, ::InventoryTransactionError error) const;
73
74
75 // NOLINTEND
76
77public:
78 // vftables
79 // NOLINTBEGIN
80 MCNAPI static void** $vftable();
81 // NOLINTEND
82};
Definition BlockPalette.h:18
Definition ComplexInventoryTransaction.h:17
static MCAPI ::std::string const getTransactionTypeName(::ComplexInventoryTransaction::Type type)
MCAPI void $postLoadItems(::BlockPalette &blockPalette, bool isClientSide)
static MCAPI void ** $vftable()
static MCAPI void _setDepenetrationOverride(::EntityContext &entity)
MCAPI void $onTransactionError(::Player &player, ::InventoryTransactionError error) const
static MCAPI ::BidirectionalUnorderedMap<::ComplexInventoryTransaction::Type, ::std::string > const & transactionTypeMap()
Definition EntityContext.h:15
Definition InventoryTransaction.h:17
Definition Player.h:131