LeviLamina
Loading...
Searching...
No Matches
BlockStateGroup.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/util/BidirectionalUnorderedMap.h"
7
8// auto generated forward declare list
9// clang-format off
10class BlockState;
11class BlockStateMeta;
12class BlockType;
15namespace Json { class Value; }
16// clang-format on
17
18class BlockStateGroup {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::CustomBlockStateVariant>>> mRegisteredBlockStates;
23 ::ll::TypedStorage<8, 128, ::BidirectionalUnorderedMap<uint64, ::std::string>> mHashNames;
24 ::ll::TypedStorage<8, 128, ::BidirectionalUnorderedMap<int, uint64>> mIdNames;
25 ::ll::TypedStorage<8, 16, ::std::map<int, ::std::unique_ptr<::BlockStateMeta>>> mBlockStates;
26 ::ll::TypedStorage<8, 16, ::std::map<int, ::std::unique_ptr<::BlockStateMeta>>> mJsonBlockStates;
27 ::ll::TypedStorage<8, 8, uint64> lastStateID;
28 // NOLINTEND
29
30public:
31 // member functions
32 // NOLINTBEGIN
33 MCAPI BlockStateGroup();
34
35 MCAPI ::BlockStateMeta const* getBlockStateFromHash(uint64 const& h) const;
36
37 MCAPI ::BlockStateMeta const* getBlockStateFromName(::std::string const& name) const;
38
39 MCAPI void registerBlockStateDefinition(::BlockStateDefinition const& def);
40
41 MCAPI void registerExistingBlockState(::BlockState const& state);
42
43 MCAPI void registerToBlock(::BlockType& block);
44
45 MCAPI ~BlockStateGroup();
46 // NOLINTEND
47
48public:
49 // static functions
50 // NOLINTBEGIN
51 MCAPI static bool
52 loadBlockStateFromJson(::BlockStateDefinition& blockState, ::std::string const& name, ::Json::Value const& root);
53 // NOLINTEND
54
55public:
56 // constructor thunks
57 // NOLINTBEGIN
58 MCAPI void* $ctor();
59 // NOLINTEND
60
61public:
62 // destructor thunk
63 // NOLINTBEGIN
64 MCAPI void $dtor();
65 // NOLINTEND
66};
Definition BlockStateMeta.h:16
Definition BlockState.h:14
Definition BlockType.h:84
Definition CustomBlockStateVariant.h:15
Definition Value.h:16
Definition BlockStateDefinition.h:13