LeviLamina
Loading...
Searching...
No Matches
MapItem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/item/ComplexItem.h"
7#include "mc/world/level/saveddata/maps/MapItemSavedData.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class BlockPos;
13class BlockSource;
14class CompoundTag;
15class Dimension;
16class ILevel;
17class Item;
18class ItemDescriptor;
19class ItemStack;
20class ItemStackBase;
21class Level;
23class Packet;
24struct ActorUniqueID;
26struct MapSample;
28namespace Bedrock::Safety { class RedactableString; }
29// clang-format on
30
31class MapItem : public ::ComplexItem {
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 // vIndex: 92
36 virtual bool inventoryTick(::ItemStack& item, ::Level& level, ::Actor& owner, int slot, bool selected) const
37 /*override*/;
38
39 // vIndex: 93
40 virtual void refreshedInContainer(::ItemStackBase const& stack, ::Level& level) const /*override*/;
41
42 // vIndex: 121
43 virtual ::std::unique_ptr<::Packet> getUpdatePacket(::ItemStack const& item, ::Level& level, ::Actor& player) const
44 /*override*/;
45
46 // vIndex: 87
47 virtual ::std::string
48 buildDescriptionId(::ItemDescriptor const& itemDescriptor, ::CompoundTag const* userData) const /*override*/;
49
50 // vIndex: 52
51 virtual void appendFormattedHovertext(
52 ::ItemStackBase const& stack,
53 ::Level& level,
55 bool const showCategory
56 ) const /*override*/;
57
58 // vIndex: 105
59 virtual bool hasSameRelevantUserData(::ItemStackBase const& stack, ::ItemStackBase const& other) const /*override*/;
60
61 // vIndex: 108
62 virtual ::ResolvedItemIconInfo getIconInfo(::ItemStackBase const& item, int, bool) const /*override*/;
63
64 // vIndex: 107
65 virtual ::Item& setIconInfo(::std::string const& name, int index) /*override*/;
66
67 // vIndex: 96
68 virtual void fixupCommon(::ItemStackBase& stack, ::ILevel& level) const /*override*/;
69
70 // vIndex: 0
71 virtual ~MapItem() /*override*/ = default;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCAPI void updateMap(::Level& level, ::Actor& player, ::MapItemSavedData& map) const;
78 // NOLINTEND
79
80public:
81 // static functions
82 // NOLINTBEGIN
83 MCAPI static void _scheduleMapChunkRendering(
84 ::Dimension& dimension,
85 ::MapItemSavedData const& original,
87 ::std::shared_ptr<bool> chunksRefCount
88 );
89
90 MCAPI static bool doesDisplayPlayerMarkers(::ItemStack const& item);
91
92 MCAPI static ::ActorUniqueID getMapId(::CompoundTag const* tag);
93
94 MCAPI static void markForRegeneration(::ItemStackBase& item);
95
96 MCAPI static void renderBiomePreviewMap(::Dimension& dimension, ::MapItemSavedData& data);
97
98 MCAPI static bool sampleMapData(
99 ::BlockSource& region,
100 int blocksPerTexel,
101 ::BlockPos const& worldOrigin,
102 ::BlockPos const& updateOrigin,
103 int imageWidth,
104 int imageHeight,
105 ::std::vector<::MapSample>* output,
106 ::MapItemSavedData* mapData,
107 ::std::vector<::ClientTerrainPixel>* clientPixels
108 );
109
110 MCAPI static void serializeMapData(::std::vector<::MapSample> const& mapSamples, ::std::string& output);
111 // NOLINTEND
112
113public:
114 // static variables
115 // NOLINTBEGIN
116 MCAPI static ::std::string const& TAG_MAP_INIT();
117
118 MCAPI static ::std::string const& TAG_MAP_NAME_INDEX();
119
120 MCAPI static ::std::string const& TAG_MAP_PLAYER_DISPLAY();
121
122 MCAPI static ::std::string const& TAG_MAP_REGENERATE();
123
124 MCAPI static ::std::string const& TAG_MAP_SCALE();
125
126 MCAPI static ::std::string const& TAG_MAP_SCALING();
127
128 MCAPI static ::std::string const& TAG_MAP_UUID();
129 // NOLINTEND
130
131public:
132 // destructor thunk
133 // NOLINTBEGIN
134
135 // NOLINTEND
136
137public:
138 // virtual function thunks
139 // NOLINTBEGIN
140 MCAPI bool $inventoryTick(::ItemStack& item, ::Level& level, ::Actor& owner, int slot, bool selected) const;
141
142 MCAPI void $refreshedInContainer(::ItemStackBase const& stack, ::Level& level) const;
143
144 MCAPI ::std::unique_ptr<::Packet> $getUpdatePacket(::ItemStack const& item, ::Level& level, ::Actor& player) const;
145
146 MCAPI ::std::string
147 $buildDescriptionId(::ItemDescriptor const& itemDescriptor, ::CompoundTag const* userData) const;
148
149 MCAPI void $appendFormattedHovertext(
150 ::ItemStackBase const& stack,
151 ::Level& level,
153 bool const showCategory
154 ) const;
155
156 MCAPI bool $hasSameRelevantUserData(::ItemStackBase const& stack, ::ItemStackBase const& other) const;
157
158 MCFOLD ::ResolvedItemIconInfo $getIconInfo(::ItemStackBase const& item, int, bool) const;
159
160 MCFOLD ::Item& $setIconInfo(::std::string const& name, int index);
161
162 MCAPI void $fixupCommon(::ItemStackBase& stack, ::ILevel& level) const;
163 // NOLINTEND
164
165public:
166 // vftables
167 // NOLINTBEGIN
168 MCAPI static void** $vftable();
169 // NOLINTEND
170};
Definition Actor.h:104
Definition RedactableString.h:10
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition ComplexItem.h:16
Definition CompoundTag.h:13
Definition Dimension.h:83
Definition ILevel.h:203
Definition ItemDescriptor.h:22
Definition ItemStackBase.h:35
Definition ItemStack.h:25
Definition Item.h:65
Definition Level.h:234
Definition MapItemSavedData.h:31
Definition MapItem.h:31
Definition Packet.h:26
Definition ActorUniqueID.h:5
Definition ClientTerrainPixel.h:5
Definition MapItemSavedData.h:41
Definition MapSample.h:5
Definition ResolvedItemIconInfo.h:8