LeviLamina
Loading...
Searching...
No Matches
IFoodItemComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/item/ItemUseMethod.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
11class Item;
12class ItemStack;
13class Level;
14class Player;
15struct ItemOnUseResult;
16// clang-format on
17
19public:
20 // virtual functions
21 // NOLINTBEGIN
22 virtual ~IFoodItemComponent() = default;
23
24 virtual int getNutrition() const = 0;
25
26 virtual float getSaturationModifier() const = 0;
27
28 virtual bool canAlwaysEat() const = 0;
29
30 virtual ::Item const* eatItem(::ItemStack& instance, ::Actor& actor, ::Level& level) = 0;
31
32 virtual void use(::ItemOnUseResult& result, ::ItemStack& instance, ::Player& player) = 0;
33
34 virtual ::Item const* useTimeDepleted(
35 ::ItemUseMethod& itemUseMethod,
36 ::ItemStack const& initialInstance,
37 ::ItemStack& instance,
38 ::Player& player,
39 ::Level& level
40 ) = 0;
41 // NOLINTEND
42
43public:
44 // static variables
45 // NOLINTBEGIN
46 MCAPI static ::std::add_lvalue_reference_t<char const[15]> CAN_ALWAYS_EAT();
47
48 MCAPI static ::std::add_lvalue_reference_t<char const[10]> NUTRITION();
49
50 MCAPI static ::std::add_lvalue_reference_t<char const[20]> SATURATION_MODIFIER();
51 // NOLINTEND
52};
Definition Actor.h:113
Definition IFoodItemComponent.h:18
Definition ItemStack.h:26
Definition Item.h:71
Definition Level.h:254
Definition Player.h:129
Definition ItemOnUseResult.h:5