LeviLamina
Loading...
Searching...
No Matches
CachedChunkBlockSource.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/ChunkPos.h"
7
8// auto generated forward declare list
9// clang-format off
10class Block;
11class BlockPos;
12class BlockSource;
13class LevelChunk;
14class Material;
15struct SubChunk;
16// clang-format on
17
18class CachedChunkBlockSource {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<8, 8, ::BlockSource&> mBlockSource;
23 ::ll::TypedStorage<2, 2, short> mMinHeight;
24 ::ll::TypedStorage<8, 8, ::ChunkPos> mPreviousChunkPos;
25 ::ll::TypedStorage<2, 2, short> mPreviousSubChunkHeight;
26 ::ll::TypedStorage<8, 8, ::LevelChunk const*> mPreviousLevelChunk;
27 ::ll::TypedStorage<8, 8, ::SubChunk const*> mPreviousSubChunk;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 CachedChunkBlockSource& operator=(CachedChunkBlockSource const&);
33 CachedChunkBlockSource(CachedChunkBlockSource const&);
34 CachedChunkBlockSource();
35
36public:
37 // member functions
38 // NOLINTBEGIN
39 MCAPI explicit CachedChunkBlockSource(::BlockSource& region);
40
41 MCAPI ushort _updateCacheAndGetIndex(::BlockPos const& position);
42
43 MCAPI ::Block const& getBlock(::BlockPos const& position);
44
45 MCFOLD ::BlockSource& getBlockSource();
46
47 MCAPI ::Block const& getLiquidBlock(::BlockPos const& position);
48
49 MCAPI ::Material const& getMaterial(::BlockPos const& pos);
50
51 MCAPI void prefetchForPosition(::BlockPos const& pos);
52 // NOLINTEND
53
54public:
55 // constructor thunks
56 // NOLINTBEGIN
57 MCAPI void* $ctor(::BlockSource& region);
58 // NOLINTEND
59};
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition LevelChunk.h:87
Definition Material.h:8
Definition SubChunk.h:28