15class BreathableComponent {
18 enum class BreathableState :
int {
23 InBreathableOverrideBlock = 4,
24 InNonBreathableOverrideBlock = 5,
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;
47 BreathableComponent& operator=(BreathableComponent
const&);
48 BreathableComponent(BreathableComponent
const&);
53 MCAPI BreathableComponent();
57 MCAPI
bool canBreathe(
::Actor const& owner)
const;
59 MCFOLD
bool canBreatheWater()
const;
61 MCFOLD
bool generatesBubbles()
const;
63 MCFOLD
int getAirRegenPerTick()
const;
65 MCAPI
short getAirSupply()
const;
67 MCFOLD ::BreathableComponent::BreathableState
const& getBreathableState()
const;
69 MCFOLD
float getInhaleTime()
const;
71 MCAPI
short getMaxAirSupply()
const;
73 MCFOLD
int getSuffocateTime()
const;
75 MCAPI ::BreathableComponent& operator=(::BreathableComponent&&);
79 MCAPI
void setAirSupply(
short supply);
81 MCAPI
void updateBreathableState(
::Actor& owner);
83 MCAPI ~BreathableComponent();