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
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual ~SparseContainerClient() /*override*/ = default;
37 // NOLINTEND
38
39public:
40 // member functions
41 // NOLINTBEGIN
42 MCNAPI void _networkUpdateItem(int slot, ::ItemStack const& newItem);
43
44 MCNAPI_C void _pushHistoricPredictionItem(
45 int slot,
46 int amount,
47 ::ItemStackNetId const& itemStackNetId,
49 short durabilityCorrection,
50 ::ItemStack&& item
51 );
52
53 MCNAPI_C ::ItemStack const&
54 _setCreatedItem(::ItemStackRequestId const& currentRequestId, int slot, ::ItemStack const& item);
55
56 MCNAPI_C void clearAllPredictions(::ItemStackRequestId const& requestId, bool shouldBeEmpty, ::Player& player);
57
58 MCNAPI_C ::SparseContainerClient::PushSlotPredictionResult tryPushSlotPrediction(
59 ::ItemStackRequestId const& requestId,
60 int requestedSlot,
61 int backingSlot,
62 int amount,
63 ::ItemStackNetId const& itemStackNetId,
65 ::ItemStack* zeroedOutItem,
66 short durabilityCorrection
67 );
68 // NOLINTEND
69
70public:
71 // static variables
72 // NOLINTBEGIN
73 MCNAPI static ::BidirectionalUnorderedMap<::SparseContainerClient::PushSlotPredictionResult, ::std::string> const&
75 // NOLINTEND
76
77public:
78 // constructor thunks
79 // NOLINTBEGIN
80 MCNAPI_C void* $ctor(
81 ::Container& backingContainer,
82 ::SparseContainerBackingSetType backingSetType,
83 bool isItemStackNetManagerEnabled,
84 ::std::unique_ptr<::ISparseContainerSetListener> netManagerSetter,
85 ::std::unique_ptr<::IPlayerContainerSetter> playerSetter
86 );
87 // NOLINTEND
88
89public:
90 // vftables
91 // NOLINTBEGIN
93
94 MCNAPI static void** $vftableForContainer();
95 // NOLINTEND
96};
Definition RedactableString.h:10
Definition Container.h:33
Definition IPlayerContainerSetter.h:10
Definition ISparseContainerSetListener.h:11
Definition ItemStack.h:26
Definition Player.h:125
Definition SparseContainerClient.h:24
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