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 MCAPI int calcSnowBlockDepth(::BlockSource& region, ::BlockPos const& pos, int maxLayerDepth) const;
55
56 MCAPI bool canPlaceTopSnow(
57 ::BlockSource& region,
58 ::BlockPos const& pos,
59 bool fromFallingSnow,
60 bool checkSnowDepthLevel,
61 int* newHeightAfterPlacement
62 ) const;
63
64 MCAPI bool isPrecipitatingAt(::BlockSource& region, ::BlockPos const& pos) const;
65
66 MCAPI bool isRainingAt(::BlockSource& region, ::BlockPos const& pos) const;
67
68 MCAPI void serverTick();
69
70 MCAPI void stop();
71
72 MCAPI bool
73 tryToPlaceTopSnow(::BlockSource& region, ::BlockPos const& pos, bool fromFallingSnow, bool fillLowerNeighborsFirst);
74 // NOLINTEND
75
76public:
77 // static functions
78 // NOLINTBEGIN
79 MCFOLD static int calcLightningCycleTime(::IRandom& random);
80
81 MCFOLD static int calcRainCycleTime(::IRandom& random);
82
83 MCAPI static void rebuildTopSnowToDepth(::BlockSource& region, ::BlockPos const& testPos, int desiredDepth);
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCAPI void $levelEvent(::SharedTypes::Legacy::LevelEvent type, ::Vec3 const&, int data);
90
91
92 // NOLINTEND
93
94public:
95 // vftables
96 // NOLINTBEGIN
97 MCNAPI static void** $vftable();
98 // NOLINTEND
99};
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Dimension.h:85
Definition IRandom.h:13
Definition LevelListener.h:28
Definition Vec3.h:10
static MCAPI void ** $vftable()