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 virtual ~Weather() /*override*/ = default;
47
48 virtual void levelEvent(::SharedTypes::Legacy::LevelEvent type, ::Vec3 const&, int data) /*override*/;
49 // NOLINTEND
50
51public:
52 // member functions
53 // NOLINTBEGIN
54#ifdef LL_PLAT_C
55 MCAPI Weather(::Dimension& d, ::IRandom& random);
56#endif
57
58 MCAPI int calcSnowBlockDepth(::BlockSource& region, ::BlockPos const& pos, int maxLayerDepth) const;
59
60 MCAPI bool canPlaceTopSnow(
61 ::BlockSource& region,
62 ::BlockPos const& pos,
63 bool fromFallingSnow,
64 bool checkSnowDepthLevel,
65 int* newHeightAfterPlacement
66 ) const;
67
68 MCAPI bool isPrecipitatingAt(::BlockSource& region, ::BlockPos const& pos) const;
69
70 MCAPI bool isRainingAt(::BlockSource& region, ::BlockPos const& pos) const;
71
72 MCAPI void serverTick();
73
74 MCAPI void tick();
75
76 MCAPI bool
77 tryToPlaceTopSnow(::BlockSource& region, ::BlockPos const& pos, bool fromFallingSnow, bool fillLowerNeighborsFirst);
78 // NOLINTEND
79
80public:
81 // static functions
82 // NOLINTBEGIN
83 MCAPI static void rebuildTopSnowToDepth(::BlockSource& region, ::BlockPos const& testPos, int desiredDepth);
84 // NOLINTEND
85
86public:
87 // constructor thunks
88 // NOLINTBEGIN
89#ifdef LL_PLAT_C
90 MCAPI void* $ctor(::Dimension& d, ::IRandom& random);
91#endif
92 // NOLINTEND
93
94public:
95 // virtual function thunks
96 // NOLINTBEGIN
97 MCAPI void $levelEvent(::SharedTypes::Legacy::LevelEvent type, ::Vec3 const&, int data);
98
99
100 // NOLINTEND
101
102public:
103 // vftables
104 // NOLINTBEGIN
105 MCNAPI static void** $vftable();
106 // NOLINTEND
107};
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition Dimension.h:86
Definition IRandom.h:10
Definition LevelListener.h:28
Definition Vec3.h:10
static MCAPI void ** $vftable()