Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
SnapToSurfaceFeature.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/WeakRef.h"
7#include "mc/world/level/block/BlockDescriptor.h"
8#include "mc/world/level/levelgen/feature/IFeature.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPos;
14// clang-format on
15
17public:
18 // SnapToSurfaceFeature inner types define
19 enum class Surface : int {
20 Ceiling = 0,
21 Floor = 1,
22 Wall = 2,
23 RandomHorizontal = 3,
24 };
25
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 24, ::WeakRef<::IFeature>> mFeatureToSnap;
30 ::ll::TypedStorage<4, 4, int> mSearchRange;
31 ::ll::TypedStorage<4, 4, ::SnapToSurfaceFeature::Surface> mSurface;
32 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mAllowedSurfaceBlocks;
33 ::ll::TypedStorage<1, 1, bool> mAllowAirPlacement;
34 ::ll::TypedStorage<1, 1, bool> mAllowNonAirPlacement;
35 ::ll::TypedStorage<1, 1, bool> mAllowUnderwaterPlacement;
36 ::ll::TypedStorage<1, 1, bool> mEmbedInSurface;
37 // NOLINTEND
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~SnapToSurfaceFeature() /*override*/ = default;
43
44 virtual ::std::optional<::BlockPos> place(::IFeature::PlacementContext const& context) const /*override*/;
45 // NOLINTEND
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCNAPI ::std::optional<::BlockPos>
51 _findSnapPosInDirection(::IBlockWorldGenAPI& target, ::BlockPos const& pos, uchar direction) const;
52 // NOLINTEND
53
54public:
55 // virtual function thunks
56 // NOLINTBEGIN
57 MCNAPI ::std::optional<::BlockPos> $place(::IFeature::PlacementContext const& context) const;
58
59
60 // NOLINTEND
61
62public:
63 // vftables
64 // NOLINTBEGIN
65 MCNAPI static void** $vftable();
66 // NOLINTEND
67};
Definition BlockPos.h:14
Definition IBlockWorldGenAPI.h:25
Definition IFeature.h:18
Definition SnapToSurfaceFeature.h:16
MCAPI ::std::optional<::BlockPos > _findSnapPosInDirection(::IBlockWorldGenAPI &target, ::BlockPos const &pos, uchar direction) const
MCAPI ::std::optional<::BlockPos > $place(::IFeature::PlacementContext const &context) const
static MCAPI void ** $vftable()
Definition IFeature.h:26
Definition context.h:5
Definition Floor.h:9