LeviLamina
Loading...
Searching...
No Matches
BlockVolume.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Pos.h"
7
8// auto generated forward declare list
9// clang-format off
10class Block;
11class BlockPos;
12// clang-format on
13
14class BlockVolume {
15public:
16 // BlockVolume inner types declare
17 // clang-format off
18 struct BlockVolumeIter;
19 // clang-format on
20
21 // BlockVolume inner types define
23 public:
24 // BlockVolumeIter inner types define
25 using difference_type = int64;
26
27 using iterator_category = ::std::forward_iterator_tag;
28
29 using pointer = ::std::pair<::Block const*, ::Pos> const*;
30
31 using reference = ::std::pair<::Block const*, ::Pos> const&;
32
33 using value_type = ::std::pair<::Block const*, ::Pos> const;
34
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<4, 12, ::Pos> pos;
39 ::ll::TypedStorage<4, 12, ::Pos> dims;
40 ::ll::TypedStorage<8, 8, ::buffer_span_mut<::Block const*>::iterator> blockIter;
41 // NOLINTEND
42
43 public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI bool operator!=(::BlockVolume::BlockVolumeIter const& c) const;
47
48 MCAPI ::std::pair<::Block const*, ::Pos> const operator*();
49
50 MCAPI ::BlockVolume::BlockVolumeIter& operator++();
51 // NOLINTEND
52 };
53
54public:
55 // member variables
56 // NOLINTBEGIN
57 ::ll::TypedStorage<8, 16, ::buffer_span_mut<::Block const*>> mBlocks;
58 ::ll::TypedStorage<4, 4, uint> mWidth;
59 ::ll::TypedStorage<4, 4, uint> mHeight;
60 ::ll::TypedStorage<4, 4, uint> mDepth;
61 ::ll::TypedStorage<4, 4, int> mDimensionBottom;
62 ::ll::TypedStorage<8, 8, ::Block const*> mInitBlock;
63 // NOLINTEND
64
65public:
66 // prevent constructor by default
67 BlockVolume();
68
69public:
70 // member functions
71 // NOLINTBEGIN
72 MCAPI BlockVolume(
74 int width,
75 int height,
76 int depth,
77 ::Block const& initBlock,
78 int dimensionBottom
79 );
80
81 MCAPI ::BlockVolume::BlockVolumeIter begin() const;
82
83 MCAPI ::std::unique_ptr<::std::vector<short>> computeHeightMap() const;
84
85 MCAPI ::BlockVolume::BlockVolumeIter end() const;
86
87 MCAPI short findHighestNonAirBlock() const;
88
89 MCAPI short
90 getAboveTopSolidBlock(::BlockPos const& start, bool dimensionShowsSky, bool includeWater, bool includeLeaves) const;
91
92 MCAPI ::Pos getDimensions() const;
93
94 MCAPI uint getIndexBounds() const;
95
96 MCFOLD uint index(::BlockPos const& pos) const;
97
98 MCFOLD uint index(::Pos const& pos) const;
99
100 MCFOLD uint indexNoBoundsCheck(::BlockPos const& pos) const;
101
102 MCFOLD uint indexNoBoundsCheck(::Pos const& pos) const;
103
104 MCFOLD bool isInBounds(::BlockPos const& pos) const;
105
106 MCFOLD bool isInBounds(::Pos const& pos) const;
107 // NOLINTEND
108
109public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCAPI void* $ctor(
114 int width,
115 int height,
116 int depth,
117 ::Block const& initBlock,
118 int dimensionBottom
119 );
120 // NOLINTEND
121};
Definition BlockPos.h:21
Definition Block.h:69
Definition Pos.h:5
Definition _HeaderOutputPredefine.h:280
Definition BlockVolume.h:22
Definition buffer.h:5