LeviLamina
Loading...
Searching...
No Matches
VoxelShapeRegistry.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class HashedString;
8namespace VoxelShapes { class RegistryHandle; }
9namespace VoxelShapes { class VoxelShape; }
10// clang-format on
11
12namespace VoxelShapes {
13
14class VoxelShapeRegistry {
15public:
16 // member variables
17 // NOLINTBEGIN
25 // NOLINTEND
26
27public:
28 // prevent constructor by default
29 VoxelShapeRegistry& operator=(VoxelShapeRegistry const&);
30 VoxelShapeRegistry(VoxelShapeRegistry const&);
31 VoxelShapeRegistry();
32
33public:
34 // member functions
35 // NOLINTBEGIN
36 MCNAPI ::VoxelShapes::RegistryHandle _insertOrFindDuplicate(::VoxelShapes::VoxelShape&& shape, bool isVanillaShape);
37
38 MCNAPI ::VoxelShapes::RegistryHandle addShape(::VoxelShapes::VoxelShape&& shape, bool isVanillaShape);
39
40 MCNAPI ::VoxelShapes::RegistryHandle
41 addShapeForIdentifier(::HashedString const& name, ::VoxelShapes::VoxelShape&& shape, bool isVanillaShape);
42
43 MCNAPI uint64 getCustomShapeCount() const;
44
45 MCNAPI ::VoxelShapes::RegistryHandle getEmptyShapeHandle() const;
46
47 MCNAPI ::VoxelShapes::RegistryHandle getHandleByName(::HashedString const& name) const;
48
49 MCNAPI ::std::unordered_map<::HashedString, ::VoxelShapes::RegistryHandle> const&
51
52 MCNAPI ::VoxelShapes::VoxelShape const* getShapeByHandle(::VoxelShapes::RegistryHandle registryHandle) const;
53
54 MCNAPI ::std::vector<::VoxelShapes::VoxelShape> const& getShapesForSerialization() const;
55
56 MCNAPI ::VoxelShapes::RegistryHandle getUnitCubeHandle() const;
57
58 MCNAPI void initialize();
59
60#ifdef LL_PLAT_C
61 MCNAPI void initializeFromNetwork(
62 ::std::vector<::VoxelShapes::VoxelShape> const& shapes,
63 ::std::unordered_map<::HashedString, ::VoxelShapes::RegistryHandle> const& nameMap,
64 ushort customShapeCount
65 );
66#endif
67
68 MCNAPI bool isInitialized() const;
69 // NOLINTEND
70
71public:
72 // static functions
73 // NOLINTBEGIN
75 // NOLINTEND
76
77public:
78 // static variables
79 // NOLINTBEGIN
80 MCNAPI static ::HashedString const& EMPTY_ID();
81
82 MCNAPI static ::HashedString const& UNIT_CUBE_ID();
83 // NOLINTEND
84};
85
86} // namespace VoxelShapes
Definition HashedString.h:5
Definition RegistryHandle.h:7
static MCAPI bool _computeIsCubeShapeEquivalent(::VoxelShapes::VoxelShape const &shape)
MCAPI::VoxelShapes::VoxelShape const * getShapeByHandle(::VoxelShapes::RegistryHandle registryHandle) const
MCAPI bool isInitialized() const
MCAPI ::std::unordered_map<::HashedString, ::VoxelShapes::RegistryHandle > const & getNameMapForSerialization() const
MCAPI uint64 getCustomShapeCount() const
MCAPI::VoxelShapes::RegistryHandle getEmptyShapeHandle() const
MCAPI ::std::vector<::VoxelShapes::VoxelShape > const & getShapesForSerialization() const
MCAPI::VoxelShapes::RegistryHandle addShapeForIdentifier(::HashedString const &name, ::VoxelShapes::VoxelShape &&shape, bool isVanillaShape)
MCAPI::VoxelShapes::RegistryHandle getHandleByName(::HashedString const &name) const
MCAPI::VoxelShapes::RegistryHandle getUnitCubeHandle() const
MCAPI::VoxelShapes::RegistryHandle addShape(::VoxelShapes::VoxelShape &&shape, bool isVanillaShape)
static MCAPI ::HashedString const & EMPTY_ID()
static MCAPI ::HashedString const & UNIT_CUBE_ID()
MCAPI::VoxelShapes::RegistryHandle _insertOrFindDuplicate(::VoxelShapes::VoxelShape &&shape, bool isVanillaShape)
Definition VoxelShape.h:19
Definition Alias.h:14