3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/utility/pub_sub/Publisher.h"
7#include "mc/deps/core/utility/pub_sub/Subscription.h"
8#include "mc/world/item/HandSlot.h"
9#include "mc/world/item/ItemDescriptor.h"
10#include "mc/world/item/ItemUseMethod.h"
11#include "mc/world/item/components/IFoodItemComponent.h"
12#include "mc/world/item/components/NetworkedItemComponent.h"
13#include "mc/world/level/storage/AllExperiments.h"
25namespace Bedrock::PubSub::ThreadModel {
struct MultiThreaded; }
38 ::ll::TypedStorage<4, 4, int> mNutrition;
39 ::ll::TypedStorage<4, 4, float> mSaturationModifier;
40 ::ll::TypedStorage<8, 16, ::ItemDescriptor> mUsingConvertsTo;
41 ::ll::TypedStorage<1, 1, bool> mCanAlwaysEat;
50 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseTimeDepletedSubscription;
51 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnUseSubscription;
61 virtual ~FoodItemComponent() =
default;
65 virtual int getNutrition()
const ;
67 virtual float getSaturationModifier()
const ;
69 virtual bool canAlwaysEat()
const ;
76 virtual ::Item
const* useTimeDepleted(
77 ::ItemUseMethod& itemUseMethod,
96 ::std::vector<::AllExperiments>
const& requiredToggles,
97 ::std::optional<::SemVersion> releasedMinFormatVersion
122 MCAPI ::Item
const* $useTimeDepleted(
123 ::ItemUseMethod& itemUseMethod,
Definition Publisher.h:25
Definition ComponentItem.h:52
MCAPI int $getNutrition() const
static MCAPI void bindType(::cereal::ReflectionCtx &ctx, ::std::vector<::AllExperiments > const &requiredToggles, ::std::optional<::SemVersion > releasedMinFormatVersion)
MCAPI void $_initializeComponent(::ComponentItem &owner)
MCAPI void $use(::ItemOnUseResult &result, ::ItemStack &instance, ::Player &player, ::HandSlot handSlot)
static MCAPI void ** $vftableForIFoodItemComponent()
MCAPI void * $ctor(::SharedTypes::v1_20_50::FoodItemComponent component)
MCAPI FoodItemComponent(::SharedTypes::v1_20_50::FoodItemComponent component)
static MCAPI void ** $vftableForNetworkedItemComponent()
MCAPI bool $canAlwaysEat() const
MCAPI float $getSaturationModifier() const
Definition IFoodItemComponent.h:19
Definition ItemStack.h:26
Definition NetworkedItemComponent.h:7
Definition SemVersion.h:15
Definition MultiThreaded.h:7
Definition ItemOnUseResult.h:5
Definition FoodItemComponent.h:15
Definition ReflectionCtx.h:11