LeviLamina
Loading...
Searching...
No Matches
FoodItemComponentLegacy.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/molang/MolangVersion.h"
7#include "mc/world/item/ItemUseMethod.h"
8#include "mc/world/item/components/IFoodItemComponent.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class CompoundTag;
14class Item;
15class ItemStack;
16class Level;
17class Player;
18namespace Json { class Value; }
19// clang-format on
20
22public:
23 // FoodItemComponentLegacy inner types declare
24 // clang-format off
25 struct Effect;
26 // clang-format on
27
28 // FoodItemComponentLegacy inner types define
29 enum class OnUseAction : int {
30 None = -1,
31 ChorusTeleport = 0,
32 SuspiciousStewEffect = 1,
33 };
34
35 struct Effect {
36 public:
37 // member variables
38 // NOLINTBEGIN
45 // NOLINTEND
46
47 public:
48 // prevent constructor by default
49 Effect& operator=(Effect const&);
50 Effect(Effect const&);
51 Effect();
52
53 public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI ~Effect();
57 // NOLINTEND
58
59 public:
60 // destructor thunk
61 // NOLINTBEGIN
62 MCFOLD void $dtor();
63 // NOLINTEND
64 };
65
66public:
67 // member variables
68 // NOLINTBEGIN
80 // NOLINTEND
81
82public:
83 // prevent constructor by default
87
88public:
89 // virtual functions
90 // NOLINTBEGIN
91 // vIndex: 1
92 virtual int getNutrition() const /*override*/;
93
94 // vIndex: 2
95 virtual float getSaturationModifier() const /*override*/;
96
97 // vIndex: 3
98 virtual bool canAlwaysEat() const /*override*/;
99
100 // vIndex: 4
101 virtual ::Item const* eatItem(::ItemStack& instance, ::Actor& actor, ::Level& level) /*override*/;
102
103 // vIndex: 5
104 virtual void use(bool& result, ::ItemStack& item, ::Player& player) /*override*/;
105
106 // vIndex: 6
107 virtual ::Item const* useTimeDepleted(
108 ::ItemUseMethod& itemUseMethod,
109 ::ItemStack const&,
110 ::ItemStack& instance,
111 ::Player& player,
112 ::Level& level
113 ) /*override*/;
114
115 // vIndex: 0
116 virtual ~FoodItemComponentLegacy() /*override*/;
117 // NOLINTEND
118
119public:
120 // member functions
121 // NOLINTBEGIN
122 MCAPI void _applyEatEffects(::ItemStack const& actor, ::Actor& level, ::Level&);
123
124 MCAPI void _loadEffects(::Json::Value const& effectsData);
125
126 MCAPI void _loadRemoveEffects(::Json::Value const& removeEffectsData);
127
128 MCAPI ::std::unique_ptr<::CompoundTag> buildNetworkTag() const;
129
130 MCAPI bool init(::Json::Value const& data, ::MolangVersion);
131 // NOLINTEND
132
133public:
134 // static functions
135 // NOLINTBEGIN
136 MCAPI static ::Json::Value initializeFromNetwork(::CompoundTag const& tag);
137 // NOLINTEND
138
139public:
140 // destructor thunk
141 // NOLINTBEGIN
142 MCAPI void $dtor();
143 // NOLINTEND
144
145public:
146 // virtual function thunks
147 // NOLINTBEGIN
148 MCFOLD int $getNutrition() const;
149
150 MCFOLD float $getSaturationModifier() const;
151
152 MCAPI bool $canAlwaysEat() const;
153
154 MCAPI ::Item const* $eatItem(::ItemStack& instance, ::Actor& actor, ::Level& level);
155
156 MCAPI void $use(bool& result, ::ItemStack& item, ::Player& player);
157
158 MCAPI ::Item const* $useTimeDepleted(
159 ::ItemUseMethod& itemUseMethod,
160 ::ItemStack const&,
161 ::ItemStack& instance,
162 ::Player& player,
163 ::Level& level
164 );
165 // NOLINTEND
166
167public:
168 // vftables
169 // NOLINTBEGIN
170 MCAPI static void** $vftable();
171 // NOLINTEND
172};
Definition Actor.h:104
Definition CompoundTag.h:13
Definition FoodItemComponentLegacy.h:21
Definition IFoodItemComponent.h:17
Definition ItemStack.h:25
Definition Item.h:65
Definition Level.h:234
Definition Player.h:119
STL namespace.
Definition FoodItemComponentLegacy.h:35
Definition Alias.h:14