LeviLamina
Loading...
Searching...
No Matches
Potion.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/effect/MobEffectInstance.h"
7#include "mc/world/item/alchemy/PotionType.h"
8#include "mc/world/item/alchemy/PotionVariant.h"
9
10// auto generated forward declare list
11// clang-format off
12class BaseGameVersion;
13class Experiments;
14class Player;
15namespace Bedrock::Safety { class RedactableString; }
16// clang-format on
17
18class Potion {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<4, 4, int> mId;
23 ::ll::TypedStorage<8, 32, ::std::string> mNameId;
24 ::ll::TypedStorage<8, 32, ::std::string> mPrefix;
25 ::ll::TypedStorage<8, 24, ::std::vector<::MobEffectInstance>> mEffects;
26 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mDescriptionIds;
27 ::ll::TypedStorage<4, 4, ::PotionVariant> mVar;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 Potion();
33
34public:
35 // member functions
36 // NOLINTBEGIN
37 MCAPI Potion(::std::string_view const nameId, ::std::string_view const prefix);
38
39 MCAPI Potion(
40 ::std::string_view const nameId,
41 ::std::string_view const descriptionID,
42 ::MobEffectInstance const& mobEffect,
43 ::PotionVariant var
44 );
45
46 MCAPI Potion(
47 ::std::string_view const nameId,
48 ::std::vector<::std::string> descriptionIDs,
49 ::std::vector<::MobEffectInstance> mobEffects,
50 ::PotionVariant var
51 );
52
53 MCAPI void appendFormattedPotionText(
55 ::PotionType potionType,
56 ::PotionVariant potionVariant,
57 ::Player const& player,
58 float timeMod
59 ) const;
60
61 MCAPI ::std::string getDescriptionId() const;
62
63 MCAPI ::std::string getDescriptionId(::PotionType potionType) const;
64
65 MCFOLD ::std::string getNameId() const;
66
67 MCAPI ::std::string getPotencyDescription(::PotionType potionType, float timeMod) const;
68
69 MCFOLD ::std::string getPrefix() const;
70 // NOLINTEND
71
72public:
73 // static functions
74 // NOLINTBEGIN
75 MCAPI static void addPotion(::std::shared_ptr<::Potion const> const potion);
76
77 MCAPI static void appendMobEffectText(
79 ::PotionVariant potionVariant,
80 uint mobEffectId,
81 int amplifier,
82 ::Player const& player
83 );
84
85 MCAPI static ::std::string
86 effectDurationToString(::PotionType potionType, float timeMod, ::MobEffectInstance const& effect);
87
88 MCAPI static ::std::string effectPotencyToString(::MobEffectInstance const& effect);
89
90 MCAPI static ::std::string getBasePotion(::PotionType type);
91
92 MCAPI static ::std::string getPotencyDescription(
93 ::PotionType potionType,
94 float timeMod,
95 ::std::string_view const descID,
96 ::MobEffectInstance const& effect
97 );
98
99 MCAPI static ::std::shared_ptr<::Potion const> getPotion(::std::string_view potionNameId);
100
101 MCAPI static void initPotions(::BaseGameVersion const& baseGameVersion, ::Experiments const& experiments);
102 // NOLINTEND
103
104public:
105 // static variables
106 // NOLINTBEGIN
107 MCAPI static ::std::shared_ptr<::Potion const> const& Awkward();
108
109 MCAPI static ::std::shared_ptr<::Potion const> const& FireResistance();
110
111 MCAPI static ::std::shared_ptr<::Potion const> const& Healing();
112
113 MCAPI static ::std::shared_ptr<::Potion const> const& Poison();
114
115 MCAPI static ::std::shared_ptr<::Potion const> const& Slowness();
116
117 MCAPI static ::std::shared_ptr<::Potion const> const& Swiftness();
118
119 MCAPI static ::std::shared_ptr<::Potion const> const& Water();
120
121 MCAPI static ::std::shared_ptr<::Potion const> const& WaterBreathing();
122
123 MCAPI static ::std::shared_ptr<::Potion const> const& Weakness();
124
125 MCAPI static int& mLastId();
126
127 MCAPI static ::std::array<::std::shared_ptr<::Potion const>, 64>& mPotionsById();
128
129 MCAPI static ::std::unordered_map<::std::string, int>& mPotionsByName();
130 // NOLINTEND
131
132public:
133 // constructor thunks
134 // NOLINTBEGIN
135 MCAPI void* $ctor(::std::string_view const nameId, ::std::string_view const prefix);
136
137 MCAPI void* $ctor(
138 ::std::string_view const nameId,
139 ::std::string_view const descriptionID,
140 ::MobEffectInstance const& mobEffect,
141 ::PotionVariant var
142 );
143
144 MCAPI void* $ctor(
145 ::std::string_view const nameId,
146 ::std::vector<::std::string> descriptionIDs,
147 ::std::vector<::MobEffectInstance> mobEffects,
148 ::PotionVariant var
149 );
150 // NOLINTEND
151};
Definition BaseGameVersion.h:8
Definition RedactableString.h:10
Definition Experiments.h:14
Definition MobEffectInstance.h:16
Definition Player.h:129