LeviLamina
Loading...
Searching...
No Matches
CommonBlockUtilityServiceProvider.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/editor/ContiguousSelectionType.h"
7#include "mc/legacy/facing/Name.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
12class Block;
13class BlockPos;
14class BlockVolumeBase;
15class BoundingBox;
16class ChunkPos;
18class Dimension;
19class Vec3;
20namespace Editor { class RelativeVolumeListBlockVolume; }
21namespace Editor::BlockMask { class BlockMaskList; }
22// clang-format on
23
24namespace Editor::BlockUtils {
25
27public:
28 // virtual functions
29 // NOLINTBEGIN
30 virtual ~CommonBlockUtilityServiceProvider() = default;
31
32 virtual ::std::set<::ChunkPos> getChunksFromAABB(::AABB const& aabb) const = 0;
33
34 virtual bool isChunkLoaded(::ChunkPos const& pos) const = 0;
35
36 virtual bool isChunkFullyLoaded(::ChunkPos const& pos) const = 0;
37
38 virtual bool areChunksLoaded(::std::set<::ChunkPos> const& chunks) const = 0;
39
40 virtual bool isAreaLoaded(::AABB const& aabb) const = 0;
41
42 virtual ::Editor::RelativeVolumeListBlockVolume trimVolumeToFitContents(
43 ::std::variant<::BlockVolumeBase const*, ::Editor::RelativeVolumeListBlockVolume const*> const inVolume,
44 bool retainMarqueeAfterTrimming,
45 bool ignoreLiquid,
46 bool ignoreNoCollision,
48 ) = 0;
49
50 virtual ::Editor::RelativeVolumeListBlockVolume findObscuredBlocksWithinVolume(
51 ::std::variant<::BlockVolumeBase const*, ::Editor::RelativeVolumeListBlockVolume const*> const inVolume
52 ) = 0;
53
54 virtual ::Editor::RelativeVolumeListBlockVolume shrinkWrapVolume(
55 ::std::variant<::BlockVolumeBase const*, ::Editor::RelativeVolumeListBlockVolume const*> const
56 ) = 0;
57
58 virtual bool isLocationInsideDimensionBounds(
59 ::std::variant<
60 ::BlockVolumeBase const*,
62 ::Vec3 const*,
63 ::BoundingBox const*,
64 ::BlockPos const*> const test
65 ) = 0;
66
67 virtual ::CompoundBlockVolume getContiguousSelection(
68 int const size,
69 ::Facing::Name const& selectionDirection,
70 ::Vec3 const& startingLocation,
71 bool const isFace,
72 int const fullSelectionToleranceLevel,
73 bool const checkForAdjacentFaceBlocks,
74 ::Editor::BlockUtils::ContiguousSelectionType const& contiguousSelectionType,
75 ::std::vector<::std::string> const& contiguousSelectionBlockList
76 ) const = 0;
77
78 virtual bool areBlocksContiguous(
79 ::Editor::BlockUtils::ContiguousSelectionType const& contiguousSelectionType,
80 ::Block const& blockToTest,
81 ::Block const& blockToFollow,
82 ::std::vector<::std::string> const& allowList
83 ) const = 0;
84
85 virtual ::Vec3 getDeltaFromDirection(::Facing::Name const& selectionDirection) const = 0;
86
87 virtual ::Vec3 getDimensionMinLocation() const = 0;
88
89 virtual ::Vec3 getDimensionMaxLocation() const = 0;
90
91 virtual ::BoundingBox getDimensionLocationBoundingBox() const = 0;
92
93 virtual ::AABB getBoundForContiguousSelection(
94 ::Vec3 const& initialLocation,
95 ::Facing::Name const& selectionDirection,
96 int const size,
97 bool const isFace
98 ) const = 0;
99
100 virtual bool isBlockExposedInDirection(
101 ::Dimension const& dimension,
102 ::Vec3 const& targetLocation,
103 ::Facing::Name const& direction
104 ) const = 0;
105
106 virtual bool isSameBlockType(::Block const& blockA, ::Block const& blockB) const = 0;
107
108 virtual bool isSameBlockAndProperties(::Block const& blockA, ::Block const& blockB) const = 0;
109
110 virtual bool
111 isBlockTypeInSelectionList(::Block const& block, ::std::vector<::std::string> const& allowList) const = 0;
112 // NOLINTEND
113
114public:
115 // virtual function thunks
116 // NOLINTBEGIN
117
118 // NOLINTEND
119};
120
121} // namespace Editor::BlockUtils
Definition AABB.h:18
Definition BlockPos.h:19
Definition BlockVolumeBase.h:16
Definition Block.h:43
Definition BoundingBox.h:13
Definition ChunkPos.h:11
Definition CompoundBlockVolume.h:18
Definition Dimension.h:86
Definition BlockMaskList.h:14
Definition CommonBlockUtilityServiceProvider.h:26
Definition RelativeVolumeListBlockVolume.h:22
Definition Vec3.h:10