Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
SingleBlockFeature.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/container/DenseEnumMap.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;
13// clang-format on
14
16public:
17 // SingleBlockFeature inner types declare
18 // clang-format off
20 // clang-format on
21
22 // SingleBlockFeature inner types define
23 enum class AttachCondition : uchar {
24 MayAttachTo = 0,
25 MayNotAttachTo = 1,
26 };
27
28 enum class CheckDirection : uchar {
29 Top = 0,
30 Bottom = 1,
31 North = 2,
32 East = 3,
33 South = 4,
34 West = 5,
35 All = 6,
36 Sides = 7,
37 Diagonal = 8,
38 Count = 9,
39 };
40
42 public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<8, 176, ::BlockDescriptor> mBlockDescriptor;
46 ::ll::TypedStorage<4, 4, float> mWeight;
47 // NOLINTEND
48 };
49
50 using PlacementConditions =
52
53public:
54 // member variables
55 // NOLINTBEGIN
56 ::ll::TypedStorage<8, 24, ::std::vector<::SingleBlockFeature::WeightedBlockDescriptor>> mPossibleBlocks;
57 ::ll::TypedStorage<
58 8,
59 216,
61 mMayAttachTo;
62 ::ll::TypedStorage<
63 8,
64 216,
66 mMayNotAttachTo;
67 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mMayReplace;
68 ::ll::TypedStorage<4, 4, int> mMinAttachedSides;
69 ::ll::TypedStorage<1, 1, bool> mEnforcePlacementRules;
70 ::ll::TypedStorage<1, 1, bool> mEnforceSurvivabilityRules;
71 ::ll::TypedStorage<1, 1, bool> mAutoRotate;
72 ::ll::TypedStorage<1, 1, bool> mRandomRotation;
73 ::ll::TypedStorage<1, 1, bool> mEnforceAttachmentRules;
74 // NOLINTEND
75
76public:
77 // virtual functions
78 // NOLINTBEGIN
79 virtual ~SingleBlockFeature() /*override*/ = default;
80
81 virtual ::std::optional<::BlockPos> place(::IFeature::PlacementContext const& context) const /*override*/;
82 // NOLINTEND
83
84public:
85 // virtual function thunks
86 // NOLINTBEGIN
87 MCNAPI ::std::optional<::BlockPos> $place(::IFeature::PlacementContext const& context) const;
88
89
90 // NOLINTEND
91};
Definition DenseEnumMap.h:9
Definition BlockPos.h:14
Definition IFeature.h:18
Definition SingleBlockFeature.h:15
MCAPI ::std::optional<::BlockPos > $place(::IFeature::PlacementContext const &context) const
Definition IFeature.h:26
Definition SingleBlockFeature.h:41
Definition context.h:5