LeviLamina
Loading...
Searching...
No Matches
BreathableComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/BlockDescriptor.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
11class CompoundTag;
12class DataLoadHelper;
13// clang-format on
14
15class BreathableComponent {
16public:
17 // BreathableComponent inner types define
18 enum class BreathableState : int {
19 InAir = 0,
20 InWater = 1,
21 InLava = 2,
22 InSolids = 3,
23 InBreathableOverrideBlock = 4,
24 InNonBreathableOverrideBlock = 5,
25 };
26
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<4, 4, int> mSuffocateTime;
31 ::ll::TypedStorage<4, 4, float> mInhaleTime;
32 ::ll::TypedStorage<4, 4, int> mAirRegenPerTick;
33 ::ll::TypedStorage<1, 1, bool> mBreathesAir;
34 ::ll::TypedStorage<1, 1, bool> mBreathesWater;
35 ::ll::TypedStorage<1, 1, bool> mBreathesLava;
36 ::ll::TypedStorage<1, 1, bool> mBreathesSolids;
37 ::ll::TypedStorage<1, 1, bool> mGeneratesBubbles;
38 ::ll::TypedStorage<2, 2, short> mAirSupply;
39 ::ll::TypedStorage<2, 2, short> mAirSupplyMax;
40 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mBreathableBlocks;
41 ::ll::TypedStorage<8, 24, ::std::vector<::BlockDescriptor>> mNonBreathableBlocks;
42 ::ll::TypedStorage<4, 4, ::BreathableComponent::BreathableState> mBreathableState;
43 // NOLINTEND
44
45public:
46 // prevent constructor by default
47 BreathableComponent& operator=(BreathableComponent const&);
48 BreathableComponent(BreathableComponent const&);
49
50public:
51 // member functions
52 // NOLINTBEGIN
53 MCAPI BreathableComponent();
54
55 MCAPI void addAdditionalSaveData(::CompoundTag& tag) const;
56
57 MCAPI bool canBreathe(::Actor const& owner) const;
58
59 MCFOLD bool canBreatheWater() const;
60
61 MCFOLD bool generatesBubbles() const;
62
63 MCFOLD int getAirRegenPerTick() const;
64
65 MCAPI short getAirSupply() const;
66
67 MCFOLD ::BreathableComponent::BreathableState const& getBreathableState() const;
68
69 MCFOLD float getInhaleTime() const;
70
71 MCAPI short getMaxAirSupply() const;
72
73 MCFOLD int getSuffocateTime() const;
74
75 MCAPI ::BreathableComponent& operator=(::BreathableComponent&&);
76
77 MCAPI void readAdditionalSaveData(::Actor&, ::CompoundTag const& tag, ::DataLoadHelper&);
78
79 MCAPI void setAirSupply(short supply);
80
81 MCAPI void updateBreathableState(::Actor& owner);
82
83 MCAPI ~BreathableComponent();
84 // NOLINTEND
85
86public:
87 // constructor thunks
88 // NOLINTBEGIN
89 MCAPI void* $ctor();
90 // NOLINTEND
91
92public:
93 // destructor thunk
94 // NOLINTBEGIN
95 MCFOLD void $dtor();
96 // NOLINTEND
97};
Definition Actor.h:125
Definition CompoundTag.h:23
Definition DataLoadHelper.h:20