LeviLamina
Loading...
Searching...
No Matches
BlockPalette.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/platform/threading/Mutex.h"
8
9// auto generated forward declare list
10// clang-format off
11class Block;
12class BlockType;
14class Level;
15struct BlockID;
16struct NewBlockID;
17// clang-format on
18
19class BlockPalette {
20public:
21 // BlockPalette inner types declare
22 // clang-format off
23 struct ConstructorToken;
24 // clang-format on
25
26 // BlockPalette inner types define
27 enum class PaletteType : int {
28 Sequential = 0,
29 Hashed = 1,
30 };
31
33
34public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mBlockTypeStatesConversionWarningMutex;
38 ::ll::TypedStorage<8, 16, ::std::set<::std::pair<int, int>>> mBlockTypeStatesConversionWarningSet;
39 ::ll::TypedStorage<8, 24, ::std::vector<::Block const*>> mBlockFromNetworkId;
40 ::ll::TypedStorage<8, 8, ::Level*> mLevel;
41 // NOLINTEND
42
43public:
44 // prevent constructor by default
45 BlockPalette();
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual ~BlockPalette();
51
52 virtual ::BlockPalette::PaletteType getPaletteType();
53
54 virtual void appendBlock(::Block const& blockState);
55
56 virtual ::Block const& getBlock(uint const& networkId) const;
57
58 virtual void assignBlockNetworkId(::Block const& block, uint64 networkId) const;
59 // NOLINTEND
60
61public:
62 // member functions
63 // NOLINTBEGIN
64 MCAPI explicit BlockPalette(::Level& level);
65
66 MCAPI ::Block const& getBlockFromLegacyData(::NewBlockID id, uint data) const;
67
68 MCAPI ::Bedrock::NonOwnerPointer<::IUnknownBlockTypeRegistry> const getUnknownBlockTypeRegistry() const;
69
70 MCAPI bool shouldWarnFor(::NewBlockID id, ushort data) const;
71
72 MCAPI ::Block const& switchBlock(::Block const& oldBlock, ::BlockType const& newBlockType) const;
73 // NOLINTEND
74
75public:
76 // static functions
77 // NOLINTBEGIN
78 MCAPI static ::Block const& convertLegacyBlock(::BlockID id, ushort data);
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84 MCAPI void* $ctor(::Level& level);
85 // NOLINTEND
86
87public:
88 // destructor thunk
89 // NOLINTBEGIN
90 MCAPI void $dtor();
91 // NOLINTEND
92
93public:
94 // virtual function thunks
95 // NOLINTBEGIN
96 MCFOLD ::BlockPalette::PaletteType $getPaletteType();
97
98 MCAPI void $appendBlock(::Block const& blockState);
99
100 MCAPI ::Block const& $getBlock(uint const& networkId) const;
101
102 MCAPI void $assignBlockNetworkId(::Block const& block, uint64 networkId) const;
103
104
105 // NOLINTEND
106
107public:
108 // vftables
109 // NOLINTBEGIN
110 MCAPI static void** $vftable();
111 // NOLINTEND
112};
Definition BlockType.h:84
Definition Block.h:43
Definition IUnknownBlockTypeRegistry.h:14
Definition Level.h:249
Definition BlockID.h:8
Definition BlockPalette.h:32
Definition NewBlockID.h:8