LeviLamina
Loading...
Searching...
No Matches
ItemUseInventoryTransaction.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/network/NetworkBlockPosition.h"
8#include "mc/platform/Result.h"
9#include "mc/util/BidirectionalUnorderedMap.h"
10#include "mc/world/inventory/transaction/ComplexInventoryTransaction.h"
11#include "mc/world/inventory/transaction/InventoryTransactionError.h"
12#include "mc/world/item/NetworkItemStackDescriptor.h"
13
14// auto generated forward declare list
15// clang-format off
16class BinaryStream;
17class BlockPalette;
18class BlockPos;
22class ItemStack;
23class Player;
25// clang-format on
26
28public:
29 // ItemUseInventoryTransaction inner types define
30 enum class ActionType : int {
31 Place = 0,
32 Use = 1,
33 Destroy = 2,
34 };
35
36 enum class TriggerType : uchar {
37 Unknown = 0,
38 PlayerInput = 1,
39 SimulationTick = 2,
40 };
41
42 enum class PredictedResult : uchar {
43 Failure = 0,
44 Success = 1,
45 };
46
47public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<4, 4, ::ItemUseInventoryTransaction::ActionType> mActionType;
51 ::ll::TypedStorage<1, 1, ::ItemUseInventoryTransaction::TriggerType> mTriggerType;
52 ::ll::TypedStorage<4, 12, ::NetworkBlockPosition> mPos;
53 ::ll::TypedStorage<4, 4, uint> mTargetBlockId;
54 ::ll::TypedStorage<1, 1, uchar> mFace;
55 ::ll::TypedStorage<4, 4, int> mSlot;
56 ::ll::TypedStorage<8, 96, ::NetworkItemStackDescriptor> mItem;
57 ::ll::TypedStorage<4, 12, ::Vec3> mFromPos;
58 ::ll::TypedStorage<4, 12, ::Vec3> mClickPos;
59 ::ll::TypedStorage<1, 1, ::ItemUseInventoryTransaction::PredictedResult> mClientPredictedResult;
60 // NOLINTEND
61
62public:
63 // virtual functions
64 // NOLINTBEGIN
65 // vIndex: 0
66 virtual ~ItemUseInventoryTransaction() /*override*/;
67
68 // vIndex: 1
69 virtual ::Bedrock::Result<void> read(::ReadOnlyBinaryStream& stream) /*override*/;
70
71 // vIndex: 2
72 virtual void write(::BinaryStream& stream) const /*override*/;
73
74 // vIndex: 3
75 virtual void postLoadItems(::BlockPalette& blockPalette, bool isClientSide) /*override*/;
76
77 // vIndex: 5
78 virtual void onTransactionError(::Player& player, ::InventoryTransactionError error) const /*override*/;
79
80 // vIndex: 4
81 virtual ::InventoryTransactionError handle(::Player& player, bool isSenderAuthority) const /*override*/;
82 // NOLINTEND
83
84public:
85 // member functions
86 // NOLINTBEGIN
88
90
91 MCAPI explicit ItemUseInventoryTransaction(::InventoryTransaction const& transaction);
92
93 MCAPI ::InventoryTransactionError handle(
96 bool isSenderAuthority
97 ) const;
98
99 MCAPI ::ItemUseInventoryTransaction& operator=(::ItemUseInventoryTransaction const&);
100
101 MCAPI ::ItemUseInventoryTransaction& setSelectedItem(::ItemStack const& item);
102 // NOLINTEND
103
104public:
105 // static functions
106 // NOLINTBEGIN
107 MCAPI static void resendBlocksAroundArea(::Player& player, ::BlockPos const& pos, uchar facing);
108
109 MCAPI static void resendPlayerState(::Player& player);
110 // NOLINTEND
111
112public:
113 // static variables
114 // NOLINTBEGIN
115 MCAPI static ::BidirectionalUnorderedMap<::ItemUseInventoryTransaction::ActionType, ::std::string> const&
116 actionTypeMap();
117 // NOLINTEND
118
119public:
120 // constructor thunks
121 // NOLINTBEGIN
122 MCAPI void* $ctor();
123
124 MCAPI void* $ctor(::ItemUseInventoryTransaction const&);
125
126 MCAPI void* $ctor(::InventoryTransaction const& transaction);
127 // NOLINTEND
128
129public:
130 // destructor thunk
131 // NOLINTBEGIN
132 MCAPI void $dtor();
133 // NOLINTEND
134
135public:
136 // virtual function thunks
137 // NOLINTBEGIN
138 MCAPI ::Bedrock::Result<void> $read(::ReadOnlyBinaryStream& stream);
139
140 MCAPI void $write(::BinaryStream& stream) const;
141
142 MCFOLD void $postLoadItems(::BlockPalette& blockPalette, bool isClientSide);
143
144 MCAPI void $onTransactionError(::Player& player, ::InventoryTransactionError error) const;
145
146 MCAPI ::InventoryTransactionError $handle(::Player& player, bool isSenderAuthority) const;
147 // NOLINTEND
148
149public:
150 // vftables
151 // NOLINTBEGIN
152 MCNAPI static void** $vftable();
153 // NOLINTEND
154};
Definition BinaryStream.h:10
Definition BlockPalette.h:18
Definition BlockPos.h:18
Definition ComplexInventoryTransaction.h:20
Definition IItemUseTransactionSubject.h:23
Definition ILegacyItemUseTransactionSubject.h:10
Definition InventoryTransaction.h:21
Definition ItemStack.h:25
Definition ItemUseInventoryTransaction.h:27
static MCAPI void ** $vftable()
Definition Player.h:119
Definition ReadOnlyBinaryStream.h:8