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 Block;
12class BlockDescriptor;
14class Random;
15class RenderParams;
16class SemVersion;
17// clang-format on
18
19class IFeature {
20public:
21 // IFeature inner types declare
22 // clang-format off
23 struct PlacementContext;
24 // clang-format on
25
26 // IFeature inner types define
27 struct PlacementContext {
28 public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 8, ::IBlockWorldGenAPI&> mTarget;
32 ::ll::TypedStorage<4, 12, ::BlockPos> mPos;
33 ::ll::TypedStorage<8, 8, ::Random&> mRandom;
34 ::ll::TypedStorage<8, 8, ::RenderParams&> mRenderParams;
35 ::ll::TypedStorage<8, 8, ::FeaturePlacementFailureLogProxy> mLogger;
36 // NOLINTEND
37
38 public:
39 // prevent constructor by default
40 PlacementContext& operator=(PlacementContext const&);
41 PlacementContext(PlacementContext const&);
42 PlacementContext();
43 };
44
45public:
46 // member variables
47 // NOLINTBEGIN
48 ::ll::TypedStorage<1, 1, bool> mInternal;
49 ::ll::TypedStorage<1, 1, bool> mCanUseInternalFeature;
50 // NOLINTEND
51
52public:
53 // virtual functions
54 // NOLINTBEGIN
55 virtual ~IFeature();
56
57 virtual ::std::optional<::BlockPos> place(::IFeature::PlacementContext const& context) const = 0;
58
59 virtual bool isValidPlacement(::std::string const& pass);
60
61 virtual void upgradeFormat(::SemVersion const&);
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI bool isAllowedToPlaceFeature(::IFeature const& feature) const;
68
69 MCFOLD bool isInternal() const;
70
71 MCAPI bool operator==(::IFeature const& other) const;
72
73 MCAPI bool
74 setBlockSafe(::IBlockWorldGenAPI& target, ::BlockPos const& pos, ::Block const& block, int updateFlags) const;
75
76 MCAPI bool setBlockSafeSimple(::IBlockWorldGenAPI& target, ::BlockPos const& pos, ::Block const& block) const;
77
78 MCFOLD void setCanUseInternalFeature(bool canUseInternalFeature);
79
80 MCFOLD void setIsInternal(bool isInternal);
81 // NOLINTEND
82
83public:
84 // static functions
85 // NOLINTBEGIN
86 MCAPI static bool
87 isExposedTo(::IBlockWorldGenAPI const& target, ::BlockPos const& candidatePos, ::BlockDescriptor const& exposedTo);
88 // NOLINTEND
89
90public:
91 // destructor thunk
92 // NOLINTBEGIN
93 MCFOLD void $dtor();
94 // NOLINTEND
95
96public:
97 // virtual function thunks
98 // NOLINTBEGIN
99 MCAPI bool $isValidPlacement(::std::string const& pass);
100
101 MCFOLD void $upgradeFormat(::SemVersion const&);
102
103
104 // NOLINTEND
105};
Definition BlockDescriptor.h:21
Definition BlockPos.h:21
Definition Block.h:69
Definition IBlockWorldGenAPI.h:25
Definition IFeature.h:19
Definition Random.h:10
Definition RenderParams.h:30
Definition SemVersion.h:15
Definition IFeature.h:27
Definition context.h:5