LeviLamina
Loading...
Searching...
No Matches
DimensionType.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5struct DimensionType {
6public:
7 // member variables
8 // NOLINTBEGIN
9 ::ll::TypedStorage<4, 4, int> mValue;
10 // NOLINTEND
11
12public:
13 operator int() const { return mValue; }
14 DimensionType(int const value) : mValue(value) {}
15 DimensionType() { mValue = 0; }
16
17public:
18 // member functions
19 // NOLINTBEGIN
20 MCAPI bool isCustom() const;
21
22 MCFOLD int value() const;
23 // NOLINTEND
24};
25
26template <>
27struct std::hash<DimensionType> {
28 size_t operator()(DimensionType const& dimensionType) const noexcept {
29 return std::hash<int>()(dimensionType.value());
30 }
31};
32
33// clang-format off
34template <>
35MCAPI ::ll::type_id_ref Bedrock::typeid_storage_impl<class CommandRegistry, ::DimensionType>();
36// clang-format on
Definition DimensionType.h:5