Skip to content
LeviMC
English
AutoLightDark
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/HandSlot.h"
7#include "mc/world/item/ItemUseMethod.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class Item;
13class ItemStack;
14class Level;
15class Player;
16struct ItemOnUseResult;
17// clang-format on
18
20public:
21 // virtual functions
22 // NOLINTBEGIN
23 virtual ~IFoodItemComponent() = default;
24
25 virtual int getNutrition() const = 0;
26
27 virtual float getSaturationModifier() const = 0;
28
29 virtual bool canAlwaysEat() const = 0;
30
31 virtual ::Item const* eatItem(::ItemStack& instance, ::Actor& actor, ::Level& level) = 0;
32
33 virtual void use(::ItemOnUseResult& result, ::ItemStack& instance, ::Player& player, ::HandSlot handSlot) = 0;
34
35 virtual ::Item const* useTimeDepleted(
36 ::ItemUseMethod& itemUseMethod,
37 ::ItemStack const& initialInstance,
38 ::ItemStack& instance,
39 ::Player& player,
40 ::Level& level
41 ) = 0;
42 // NOLINTEND
43
44public:
45 // static variables
46 // NOLINTBEGIN
47 MCNAPI static ::std::add_lvalue_reference_t<char const[15]> CAN_ALWAYS_EAT();
48
49 MCNAPI static ::std::add_lvalue_reference_t<char const[10]> NUTRITION();
50
51 MCNAPI static ::std::add_lvalue_reference_t<char const[20]> SATURATION_MODIFIER();
52 // NOLINTEND
53};
Definition Actor.h:116
Definition IFoodItemComponent.h:19
static MCAPI ::std::add_lvalue_reference_t< char const[15]> CAN_ALWAYS_EAT()
static MCAPI ::std::add_lvalue_reference_t< char const[20]> SATURATION_MODIFIER()
static MCAPI ::std::add_lvalue_reference_t< char const[10]> NUTRITION()
Definition ItemStack.h:26
Definition Item.h:73
Definition Level.h:255
Definition Player.h:131
Definition ItemOnUseResult.h:5