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;
14namespace Json { class Value; }
15// clang-format on
16
17class BlockStateGroup {
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::CustomBlockStateVariant>>> mRegisteredBlockStates;
22 ::ll::TypedStorage<8, 128, ::BidirectionalUnorderedMap<uint64, ::std::string>> mHashNames;
23 ::ll::TypedStorage<8, 128, ::BidirectionalUnorderedMap<int, uint64>> mIdNames;
24 ::ll::TypedStorage<8, 16, ::std::map<int, ::std::unique_ptr<::BlockStateMeta>>> mBlockStates;
25 ::ll::TypedStorage<8, 16, ::std::map<int, ::std::unique_ptr<::BlockStateMeta>>> mJsonBlockStates;
26 ::ll::TypedStorage<8, 8, uint64> lastStateID;
27 // NOLINTEND
28
29public:
30 // member functions
31 // NOLINTBEGIN
32 MCAPI BlockStateGroup();
33
34 MCAPI ::BlockStateMeta const* getBlockStateFromHash(uint64 const& h) const;
35
36 MCAPI ::BlockStateMeta const* getBlockStateFromName(::std::string const& name) const;
37
38 MCAPI void registerBlockStateDefinition(::BlockStateDefinition const& def);
39
40 MCAPI void registerExistingBlockState(::BlockState const& state);
41
42 MCAPI ~BlockStateGroup();
43 // NOLINTEND
44
45public:
46 // static functions
47 // NOLINTBEGIN
48 MCAPI static bool
49 loadBlockStateFromJson(::BlockStateDefinition& blockState, ::std::string const& name, ::Json::Value const& root);
50 // NOLINTEND
51
52public:
53 // static variables
54 // NOLINTBEGIN
55 MCAPI static int const& MAX_ENUM_SIZE();
56 // NOLINTEND
57
58public:
59 // constructor thunks
60 // NOLINTBEGIN
61 MCAPI void* $ctor();
62 // NOLINTEND
63
64public:
65 // destructor thunk
66 // NOLINTBEGIN
67 MCAPI void $dtor();
68 // NOLINTEND
69};
Definition BlockStateMeta.h:15
Definition BlockState.h:13
Definition CustomBlockStateVariant.h:15
Definition Value.h:16
Definition BlockStateDefinition.h:13