LeviLamina
Loading...
Searching...
No Matches
IFeature.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/BlockPos.h"
7#include "mc/world/level/levelgen/feature/FeaturePlacementFailureLogProxy.h"
8
9// auto generated forward declare list
10// clang-format off
11class BlockDescriptor;
13class Random;
14class RenderParams;
15class SemVersion;
16// clang-format on
17
18class IFeature {
19public:
20 // IFeature inner types declare
21 // clang-format off
22 struct PlacementContext;
23 // clang-format on
24
25 // IFeature inner types define
26 struct PlacementContext {
27 public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 8, ::IBlockWorldGenAPI&> mTarget;
31 ::ll::TypedStorage<4, 12, ::BlockPos> mPos;
32 ::ll::TypedStorage<8, 8, ::Random&> mRandom;
33 ::ll::TypedStorage<8, 8, ::RenderParams&> mRenderParams;
34 ::ll::TypedStorage<8, 8, ::FeaturePlacementFailureLogProxy> mLogger;
35 // NOLINTEND
36
37 public:
38 // prevent constructor by default
39 PlacementContext& operator=(PlacementContext const&);
40 PlacementContext(PlacementContext const&);
41 PlacementContext();
42 };
43
44public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<1, 1, bool> mInternal;
48 ::ll::TypedStorage<1, 1, bool> mCanUseInternalFeature;
49 // NOLINTEND
50
51public:
52 // virtual functions
53 // NOLINTBEGIN
54 virtual ~IFeature() = default;
55
56 virtual ::std::optional<::BlockPos> place(::IFeature::PlacementContext const& context) const = 0;
57
58 virtual bool isValidPlacement(::std::string const& pass);
59
60 virtual void upgradeFormat(::SemVersion const&);
61 // NOLINTEND
62
63public:
64 // static functions
65 // NOLINTBEGIN
66 MCAPI static bool
67 isExposedTo(::IBlockWorldGenAPI const& target, ::BlockPos const& candidatePos, ::BlockDescriptor const& exposedTo);
68 // NOLINTEND
69
70public:
71 // virtual function thunks
72 // NOLINTBEGIN
73 MCAPI bool $isValidPlacement(::std::string const& pass);
74
75 MCFOLD void $upgradeFormat(::SemVersion const&);
76
77
78 // NOLINTEND
79};
80
81// clang-format off
82template <>
83MCAPI ::ll::type_id_ref Bedrock::typeid_storage_impl<class CommandRegistry, ::IFeature const *>();
84// clang-format on
Definition BlockDescriptor.h:21
Definition BlockPos.h:17
Definition IBlockWorldGenAPI.h:25
Definition IFeature.h:18
Definition Random.h:10
Definition RenderParams.h:29
Definition SemVersion.h:15
Definition IFeature.h:26
Definition context.h:5