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 functions
91 // NOLINTBEGIN
92#ifdef LL_PLAT_C
93 MCNAPI static ::std::string const
94 getPushSlotPredictionResultName(::SparseContainerClient::PushSlotPredictionResult result);
95#endif
96 // NOLINTEND
97
98public:
99 // static variables
100 // NOLINTBEGIN
101 MCNAPI static ::BidirectionalUnorderedMap<::SparseContainerClient::PushSlotPredictionResult, ::std::string> const&
103 // NOLINTEND
104
105public:
106 // constructor thunks
107 // NOLINTBEGIN
108#ifdef LL_PLAT_C
109 MCNAPI void* $ctor(
110 ::Container& backingContainer,
111 ::SparseContainerBackingSetType backingSetType,
112 bool isItemStackNetManagerEnabled,
113 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
114 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
115 );
116#endif
117 // NOLINTEND
118
119public:
120 // vftables
121 // NOLINTBEGIN
123
124 MCNAPI static void** $vftableForContainer();
125 // NOLINTEND
126};
Definition RedactableString.h:10
Definition Container.h:34
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStack.h:35
Definition Player.h:137
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