Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
OreFeature.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/world/level/block/Block.h"
5#include "mc/world/level/block/BlockType.h"
6#include "mc/world/level/levelgen/feature/ReplaceRule.h"
7
8// auto generated inclusion list
9#include "mc/deps/core/math/Vec3.h"
10#include "mc/platform/brstd/once_flag.h"
11#include "mc/world/level/levelgen/feature/IFeature.h"
12
13// auto generated forward declare list
14// clang-format off
15class Block;
16class BlockPos;
17class BlockType;
18struct ReplaceRule;
19// clang-format on
20
21class OreFeature : public ::IFeature {
22public:
23 // OreFeature inner types declare
24 // clang-format off
25 struct AcceleratedRule;
27 struct SphereData;
28 struct ScratchData;
29 // clang-format on
30
31 // OreFeature inner types define
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 8, ::Block const*> mBlock;
37 ::ll::TypedStorage<8, 24, ::std::vector<::BlockType const*>> mReplaceableTypes;
38 ::ll::TypedStorage<1, 1, bool> mReplaceAny;
39 // NOLINTEND
40 };
41
43 public:
44 // member variables
45 // NOLINTBEGIN
46 ::ll::TypedStorage<8, 24, ::std::vector<::OreFeature::AcceleratedRule>> mRules;
47 // NOLINTEND
48 };
49
50 struct SphereData {
51 public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<4, 12, ::Vec3> mCenter;
55 ::ll::TypedStorage<4, 4, float> mHalfRSqr;
56 ::ll::TypedStorage<4, 4, float> mHalfR;
57 // NOLINTEND
58 };
59
60 struct ScratchData {
61 public:
62 // member variables
63 // NOLINTBEGIN
64 ::ll::TypedStorage<8, 24, ::std::vector<::OreFeature::SphereData>> mAllSpheres;
65 ::ll::TypedStorage<8, 24, ::std::vector<::OreFeature::SphereData*>> mSpheres;
66 ::ll::TypedStorage<4, 4, uint> mActiveSpheres;
67 // NOLINTEND
68 };
69
70public:
71 // member variables
72 // NOLINTBEGIN
73 ::ll::TypedStorage<4, 4, int> mCount;
74 ::ll::TypedStorage<4, 4, float> mCountf;
75 ::ll::TypedStorage<4, 4, float> mCountfInv;
76 ::ll::TypedStorage<4, 4, float> mDiscardChanceOnAirExposure;
77 ::ll::TypedStorage<8, 24, ::std::vector<::ReplaceRule>> mReplaceRules;
78 ::ll::TypedStorage<4, 4, ::brstd::once_flag> mRulesAcceleratorInitFlag;
79 ::ll::TypedStorage<8, 24, ::OreFeature::ReplaceRulesAccelerator> mRulesAccelerator;
80 // NOLINTEND
81
82public:
83 // virtual functions
84 // NOLINTBEGIN
85 virtual ~OreFeature() /*override*/ = default;
86
87 virtual ::std::optional<::BlockPos> place(::IFeature::PlacementContext const& context) const /*override*/;
88 // NOLINTEND
89
90public:
91 // virtual function thunks
92 // NOLINTBEGIN
93 MCAPI ::std::optional<::BlockPos> $place(::IFeature::PlacementContext const& context) const;
94
95
96 // NOLINTEND
97
98public:
99 // vftables
100 // NOLINTBEGIN
101 MCNAPI static void** $vftable();
102 // NOLINTEND
103};
Definition BlockPos.h:14
Definition BlockType.h:79
Definition Block.h:42
Definition IFeature.h:18
Definition OreFeature.h:21
static MCAPI void ** $vftable()
Definition IFeature.h:26
Definition OreFeature.h:32
Definition OreFeature.h:42
Definition OreFeature.h:60
Definition OreFeature.h:50
Definition ReplaceRule.h:8
Definition context.h:5