LeviLamina
Loading...
Searching...
No Matches
SparseContainerClient.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/network/SparseContainer.h"
8#include "mc/world/inventory/network/TypedClientNetId.h"
9#include "mc/world/inventory/network/TypedServerNetId.h"
10#include "mc/world/inventory/simulation/SparseContainerBackingSetType.h"
11
12// auto generated forward declare list
13// clang-format off
14class Container;
17class ItemStack;
18class Player;
21namespace Bedrock::Safety { class RedactableString; }
22// clang-format on
23
24class SparseContainerClient : public ::SparseContainer {
25public:
26 // SparseContainerClient inner types define
27 enum class PushSlotPredictionResult : int {
28 Succeeded = 0,
29 FailedWithFuturePrediction = 1,
30 FailedWithError = 2,
31 };
32
33#ifdef LL_PLAT_S
34#else // LL_PLAT_C
35public:
36 // prevent constructor by default
37 SparseContainerClient();
38
39#endif
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 virtual ~SparseContainerClient() /*override*/ = default;
44 // NOLINTEND
45
46public:
47 // member functions
48 // NOLINTBEGIN
49#ifdef LL_PLAT_C
50 MCNAPI SparseContainerClient(
51 ::Container& backingContainer,
52 ::SparseContainerBackingSetType backingSetType,
53 bool isItemStackNetManagerEnabled,
54 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
55 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
56 );
57#endif
58
59 MCNAPI void _networkUpdateItem(int slot, ::ItemStack const& newItem);
60
61#ifdef LL_PLAT_C
62 MCNAPI void _pushHistoricPredictionItem(
63 int slot,
64 int amount,
65 ::ItemStackNetId const& itemStackNetId,
67 short durabilityCorrection,
68 ::ItemStack&& item
69 );
70
71 MCNAPI ::ItemStack const&
72 _setCreatedItem(::ItemStackRequestId const& currentRequestId, int slot, ::ItemStack const& item);
73
74 MCNAPI void clearAllPredictions(::ItemStackRequestId const& requestId, bool shouldBeEmpty, ::Player& player);
75
76 MCNAPI ::SparseContainerClient::PushSlotPredictionResult tryPushSlotPrediction(
77 ::ItemStackRequestId const& requestId,
78 int requestedSlot,
79 int backingSlot,
80 int amount,
81 ::ItemStackNetId const& itemStackNetId,
83 ::ItemStack* zeroedOutItem,
84 short durabilityCorrection
85 );
86#endif
87 // NOLINTEND
88
89public:
90 // static variables
91 // NOLINTBEGIN
92 MCNAPI static ::BidirectionalUnorderedMap<::SparseContainerClient::PushSlotPredictionResult, ::std::string> const&
94 // NOLINTEND
95
96public:
97 // constructor thunks
98 // NOLINTBEGIN
99#ifdef LL_PLAT_C
100 MCNAPI void* $ctor(
101 ::Container& backingContainer,
102 ::SparseContainerBackingSetType backingSetType,
103 bool isItemStackNetManagerEnabled,
104 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
105 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
106 );
107#endif
108 // NOLINTEND
109
110public:
111 // vftables
112 // NOLINTBEGIN
114
115 MCNAPI static void** $vftableForContainer();
116 // NOLINTEND
117};
Definition RedactableString.h:10
Definition Container.h:33
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStack.h:26
Definition Player.h:129
static MCAPI ::BidirectionalUnorderedMap<::SparseContainerClient::PushSlotPredictionResult, ::std::string > const & pushSlotPredictionResultMap()
static MCAPI void ** $vftableForContainer()
MCAPI void _networkUpdateItem(int slot, ::ItemStack const &newItem)
static MCAPI void ** $vftableForContainerContentChangeListener()
Definition ItemStackNetIdTag.h:5
Definition ItemStackRequestIdTag.h:5