Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
FoodItemComponent Class Reference
Inheritance diagram for FoodItemComponent:

Public Types

using ConsumeSignature = void(::ItemStack const&, ::ItemStack&, ::Actor&)

Public Member Functions

virtual void _initializeComponent (::ComponentItem &owner)
virtual int getNutrition () const
virtual float getSaturationModifier () const
virtual bool canAlwaysEat () const
virtual::Item const * eatItem (::ItemStack &instance, ::Actor &actor, ::Level &level)
virtual void use (::ItemOnUseResult &result, ::ItemStack &instance, ::Player &player, ::HandSlot handSlot)
virtual::Item const * useTimeDepleted (::ItemUseMethod &itemUseMethod, ::ItemStack const &initialInstance, ::ItemStack &instance, ::Player &player, ::Level &level)
MCAPI FoodItemComponent (::SharedTypes::v1_20_50::FoodItemComponent component)
MCAPI void * $ctor (::SharedTypes::v1_20_50::FoodItemComponent component)
MCAPI void $_initializeComponent (::ComponentItem &owner)
MCAPI int $getNutrition () const
MCAPI float $getSaturationModifier () const
MCAPI bool $canAlwaysEat () const
MCAPI::Item const * $eatItem (::ItemStack &instance, ::Actor &actor, ::Level &level)
MCAPI void $use (::ItemOnUseResult &result, ::ItemStack &instance, ::Player &player, ::HandSlot handSlot)
MCAPI::Item const * $useTimeDepleted (::ItemUseMethod &itemUseMethod, ::ItemStack const &initialInstance, ::ItemStack &instance, ::Player &player, ::Level &level)
bool isNetworkComponent () const override
std::unique_ptr< CompoundTag > buildNetworkTag (cereal::ReflectionCtx const &) const override
virtual ::std::unique_ptr<::CompoundTag > buildNetworkTag (::cereal::ReflectionCtx const &ctx) const
bool initializeFromNetwork (CompoundTag const &, cereal::ReflectionCtx const &) override
virtual bool initializeFromNetwork (::CompoundTag const &tag, ::cereal::ReflectionCtx const &ctx)
virtual bool checkComponentDataForContentErrors () const
virtual void writeSettings ()
virtual void handleVersionBasedInitialization (::SemVersion const &originalJsonVersion)
MCAPI bool $checkComponentDataForContentErrors () const
MCAPI void $writeSettings ()
MCAPI bool $isNetworkComponent () const
MCAPI ::std::unique_ptr<::CompoundTag > $buildNetworkTag (::cereal::ReflectionCtx const &ctx) const
MCAPI bool $initializeFromNetwork (::CompoundTag const &tag, ::cereal::ReflectionCtx const &ctx)
MCAPI void $handleVersionBasedInitialization (::SemVersion const &originalJsonVersion)

Static Public Member Functions

static MCAPI void bindType (::cereal::ReflectionCtx &ctx, ::std::vector<::AllExperiments > const &requiredToggles, ::std::optional<::SemVersion > releasedMinFormatVersion)
static MCAPI void ** $vftableForNetworkedItemComponent ()
static MCAPI void ** $vftableForIFoodItemComponent ()
static MCAPI void ** $vftable ()
static MCAPI ::std::add_lvalue_reference_t< char const[15]> CAN_ALWAYS_EAT ()
static MCAPI ::std::add_lvalue_reference_t< char const[10]> NUTRITION ()
static MCAPI ::std::add_lvalue_reference_t< char const[20]> SATURATION_MODIFIER ()

Public Attributes

::ll::TypedStorage< 4, 4, int > mNutrition
::ll::TypedStorage< 4, 4, float > mSaturationModifier
::ll::TypedStorage< 8, 16, ::ItemDescriptor > mUsingConvertsTo
::ll::TypedStorage< 1, 1, bool > mCanAlwaysEat
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Bedrock::PubSub::Publisher< void(::ItemStack const &, ::ItemStack &, ::Actor &), ::Bedrock::PubSub::ThreadModel::MultiThreaded, 0 > > > mOnConsumePublisher
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::Subscription > mOnUseTimeDepletedSubscription
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::Subscription > mOnUseSubscription
::ll::TypedStorage< 8, 8, ::ComponentItem * > mOwner

Constructor & Destructor Documentation

◆ FoodItemComponent()

MCAPI FoodItemComponent::FoodItemComponent ( ::SharedTypes::v1_20_50::FoodItemComponent component)
explicit
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

Member Function Documentation

◆ _initializeComponent()

virtual void FoodItemComponent::_initializeComponent ( ::ComponentItem & owner)
virtual

Reimplemented from ItemComponent.

◆ getNutrition()

virtual int FoodItemComponent::getNutrition ( ) const
virtual

Implements IFoodItemComponent.

◆ getSaturationModifier()

virtual float FoodItemComponent::getSaturationModifier ( ) const
virtual

Implements IFoodItemComponent.

◆ canAlwaysEat()

virtual bool FoodItemComponent::canAlwaysEat ( ) const
virtual

Implements IFoodItemComponent.

◆ eatItem()

virtual::Item const * FoodItemComponent::eatItem ( ::ItemStack & instance,
::Actor & actor,
::Level & level )
virtual

Implements IFoodItemComponent.

◆ use()

virtual void FoodItemComponent::use ( ::ItemOnUseResult & result,
::ItemStack & instance,
::Player & player,
::HandSlot handSlot )
virtual

Implements IFoodItemComponent.

◆ useTimeDepleted()

virtual::Item const * FoodItemComponent::useTimeDepleted ( ::ItemUseMethod & itemUseMethod,
::ItemStack const & initialInstance,
::ItemStack & instance,
::Player & player,
::Level & level )
virtual

Implements IFoodItemComponent.

◆ bindType()

MCAPI void FoodItemComponent::bindType ( ::cereal::ReflectionCtx & ctx,
::std::vector<::AllExperiments > const & requiredToggles,
::std::optional<::SemVersion > releasedMinFormatVersion )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $ctor()

MCAPI void * FoodItemComponent::$ctor ( ::SharedTypes::v1_20_50::FoodItemComponent component)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $_initializeComponent()

MCAPI void FoodItemComponent::$_initializeComponent ( ::ComponentItem & owner)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getNutrition()

MCAPI int FoodItemComponent::$getNutrition ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $getSaturationModifier()

MCAPI float FoodItemComponent::$getSaturationModifier ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $canAlwaysEat()

MCAPI bool FoodItemComponent::$canAlwaysEat ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $use()

MCAPI void FoodItemComponent::$use ( ::ItemOnUseResult & result,
::ItemStack & instance,
::Player & player,
::HandSlot handSlot )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftableForNetworkedItemComponent()

MCAPI void ** FoodItemComponent::$vftableForNetworkedItemComponent ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftableForIFoodItemComponent()

MCAPI void ** FoodItemComponent::$vftableForIFoodItemComponent ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ isNetworkComponent()

bool NetworkedItemComponent< ::FoodItemComponent >::isNetworkComponent ( ) const
nodiscardoverridevirtualinherited

Reimplemented from ItemComponent.

◆ $checkComponentDataForContentErrors()

MCAPI bool ItemComponent::$checkComponentDataForContentErrors ( ) const
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $writeSettings()

MCAPI void ItemComponent::$writeSettings ( )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $isNetworkComponent()

MCAPI bool ItemComponent::$isNetworkComponent ( ) const
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $buildNetworkTag()

MCAPI ::std::unique_ptr<::CompoundTag > ItemComponent::$buildNetworkTag ( ::cereal::ReflectionCtx const & ctx) const
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $initializeFromNetwork()

MCAPI bool ItemComponent::$initializeFromNetwork ( ::CompoundTag const & tag,
::cereal::ReflectionCtx const & ctx )
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $handleVersionBasedInitialization()

MCAPI void ItemComponent::$handleVersionBasedInitialization ( ::SemVersion const & originalJsonVersion)
inherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $vftable()

MCAPI void ** ItemComponent::$vftable ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ CAN_ALWAYS_EAT()

MCAPI ::std::add_lvalue_reference_t< char const [15]> IFoodItemComponent::CAN_ALWAYS_EAT ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ NUTRITION()

MCAPI ::std::add_lvalue_reference_t< char const [10]> IFoodItemComponent::NUTRITION ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ SATURATION_MODIFIER()

MCAPI ::std::add_lvalue_reference_t< char const [20]> IFoodItemComponent::SATURATION_MODIFIER ( )
staticinherited
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following file: