Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
BlockPatternMatcher.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/brstd/function_ref.h"
7
8// auto generated forward declare list
9// clang-format off
10class Block;
11class BlockPos;
12class BlockSource;
13struct BlockPatternData;
14struct BuildMatch;
15// clang-format on
16
17class BlockPatternMatcher {
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::ll::TypedStorage<8, 8, ::BlockSource&> mRegion;
22 ::ll::TypedStorage<8, 8, ::BlockPatternData const&> mData;
23 // NOLINTEND
24
25public:
26 // prevent constructor by default
27 BlockPatternMatcher& operator=(BlockPatternMatcher const&);
28 BlockPatternMatcher(BlockPatternMatcher const&);
29 BlockPatternMatcher();
30
31public:
32 // member functions
33 // NOLINTBEGIN
34 MCNAPI ::BuildMatch match(::BlockPos const& pos) const;
35
36 MCNAPI ::BuildMatch match(::BlockPos const& pos, int subPattern, int rowIndex) const;
37
38 MCNAPI ::BuildMatch match(::BlockPos const& pos, int subPattern, int rowIndex, uchar forward, uchar up) const;
39
40 MCNAPI void replaceBlocks(
41 char subPattern,
42 ::BuildMatch const& buildMatch,
43 ::Block const& block,
44 ::brstd::function_ref<void(::Block const&, ::BlockPos const&)> preReplaceCallback
45 ) const;
46 // NOLINTEND
47
48public:
49 // static functions
50 // NOLINTBEGIN
51 MCNAPI static void noopCallback(::Block const&, ::BlockPos const&);
52 // NOLINTEND
53};
MCAPI::BuildMatch match(::BlockPos const &pos, int subPattern, int rowIndex) const
static MCAPI void noopCallback(::Block const &, ::BlockPos const &)
MCAPI::BuildMatch match(::BlockPos const &pos) const
MCAPI void replaceBlocks(char subPattern, ::BuildMatch const &buildMatch, ::Block const &block, ::brstd::function_ref< void(::Block const &, ::BlockPos const &)> preReplaceCallback) const
MCAPI::BuildMatch match(::BlockPos const &pos, int subPattern, int rowIndex, uchar forward, uchar up) const
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition Block.h:42
Definition function_ref.h:60
Definition BlockPatternData.h:16
Definition BuildMatch.h:9