LeviLamina
Loading...
Searching...
No Matches
Weather.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/LevelEvent.h"
7#include "mc/world/level/LevelListener.h"
8#include "mc/world/level/levelgen/synth/PerlinSimplexNoise.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockPos;
13class BlockSource;
14class Dimension;
15class IRandom;
16class Vec3;
17// clang-format on
18
19class Weather : public ::LevelListener {
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<8, 40, ::PerlinSimplexNoise> mNoise;
24 ::ll::TypedStorage<4, 4, int> mTick;
25 ::ll::TypedStorage<4, 4, float> mOldRainLevel;
26 ::ll::TypedStorage<4, 4, float> mRainLevel;
27 ::ll::TypedStorage<4, 4, float> mTargetRainLevel;
28 ::ll::TypedStorage<4, 4, float> mOldLightningLevel;
29 ::ll::TypedStorage<4, 4, float> mLightningLevel;
30 ::ll::TypedStorage<4, 4, float> mTargetLightningLevel;
31 ::ll::TypedStorage<4, 4, float> mFogLevel;
32 ::ll::TypedStorage<4, 4, int> mSkyFlashTime;
33 ::ll::TypedStorage<8, 8, ::Dimension&> mDimension;
34 ::ll::TypedStorage<8, 8, ::IRandom&> mRandom;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 Weather& operator=(Weather const&);
40 Weather(Weather const&);
41 Weather();
42
43public:
44 // virtual functions
45 // NOLINTBEGIN
46 // vIndex: 0
47 virtual ~Weather() /*override*/ = default;
48
49 // vIndex: 26
50 virtual void levelEvent(::SharedTypes::Legacy::LevelEvent type, ::Vec3 const&, int data) /*override*/;
51 // NOLINTEND
52
53public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI int calcSnowBlockDepth(::BlockSource& region, ::BlockPos const& pos, int maxLayerDepth) const;
57
58 MCAPI bool canPlaceTopSnow(
59 ::BlockSource& region,
60 ::BlockPos const& pos,
61 bool fromFallingSnow,
62 bool checkSnowDepthLevel,
63 int* newHeightAfterPlacement
64 ) const;
65
66 MCAPI bool isPrecipitatingAt(::BlockSource& region, ::BlockPos const& pos) const;
67
68 MCAPI bool isRainingAt(::BlockSource& region, ::BlockPos const& pos) const;
69
70 MCAPI void serverTick();
71
72 MCAPI void stop();
73
74 MCAPI bool
75 tryToPlaceTopSnow(::BlockSource& region, ::BlockPos const& pos, bool fromFallingSnow, bool fillLowerNeighborsFirst);
76 // NOLINTEND
77
78public:
79 // static functions
80 // NOLINTBEGIN
81 MCFOLD static int calcLightningCycleTime(::IRandom& random);
82
83 MCFOLD static int calcRainCycleTime(::IRandom& random);
84
85 MCAPI static void rebuildTopSnowToDepth(::BlockSource& region, ::BlockPos const& testPos, int desiredDepth);
86 // NOLINTEND
87
88public:
89 // virtual function thunks
90 // NOLINTBEGIN
91 MCAPI void $levelEvent(::SharedTypes::Legacy::LevelEvent type, ::Vec3 const&, int data);
92 // NOLINTEND
93
94public:
95 // vftables
96 // NOLINTBEGIN
97 MCNAPI static void** $vftable();
98 // NOLINTEND
99};
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Dimension.h:83
Definition IRandom.h:10
Definition LevelListener.h:28
Definition Vec3.h:10
Definition Weather.h:19
static MCAPI void ** $vftable()