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 ()
 
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 (bool &result, ::ItemStack &item, ::Player &player)
 
virtual::Item const * useTimeDepleted (::ItemUseMethod &, ::ItemStack const &, ::ItemStack &, ::Player &, ::Level &)
 
MCAPI FoodItemComponent (::SharedTypes::v1_20_50::FoodItemComponent component)
 
MCAPI ::Bedrock::PubSub::Connector< void(::ItemStack const &, ::ItemStack &, ::Actor &)> & onConsume ()
 
MCAPI void * $ctor (::SharedTypes::v1_20_50::FoodItemComponent component)
 
MCAPI void $_initializeComponent ()
 
MCFOLD int $getNutrition () const
 
MCFOLD float $getSaturationModifier () const
 
MCFOLD bool $canAlwaysEat () const
 
MCAPI::Item const * $eatItem (::ItemStack &instance, ::Actor &actor, ::Level &level)
 
MCAPI void $use (bool &result, ::ItemStack &item, ::Player &player)
 
bool isNetworkComponent () const override
 
std::unique_ptr< CompoundTagbuildNetworkTag (const cereal::ReflectionCtx &) const override
 
virtual ::std::unique_ptr<::CompoundTagbuildNetworkTag (::cereal::ReflectionCtx const &ctx) const
 
bool initializeFromNetwork (const CompoundTag &, const cereal::ReflectionCtx &) override
 
virtual bool initializeFromNetwork (::CompoundTag const &tag, ::cereal::ReflectionCtx const &ctx)
 
virtual bool checkComponentDataForContentErrors () const
 
virtual void writeSettings ()
 
virtual void handleVersionBasedInitialization (::SemVersion const &originalJsonVersion)
 
MCFOLD bool $checkComponentDataForContentErrors () const
 
MCFOLD void $writeSettings ()
 
MCFOLD bool $isNetworkComponent () const
 
MCFOLD ::std::unique_ptr<::CompoundTag$buildNetworkTag (::cereal::ReflectionCtx const &ctx) const
 
MCFOLD bool $initializeFromNetwork (::CompoundTag const &tag, ::cereal::ReflectionCtx const &ctx)
 
MCFOLD void $handleVersionBasedInitialization (::SemVersion const &originalJsonVersion)
 

Static Public Member Functions

static MCAPI ::HashedString const & getIdentifier ()
 
static MCAPI void ** $vftableForNetworkedItemComponent ()
 
static MCAPI void ** $vftableForIFoodItemComponent ()
 
static MCAPI void ** $vftable ()
 
static MCAPI ::std::add_lvalue_reference_t< char const[]> CAN_ALWAYS_EAT ()
 
static MCAPI ::std::add_lvalue_reference_t< char const[]> NUTRITION ()
 
static MCAPI ::std::add_lvalue_reference_t< char const[]> SATURATION_MODIFIER ()
 

Public Attributes

::ll::TypedStorage< 4, 4, int > mNutrition
 
::ll::TypedStorage< 4, 4, float > mSaturationModifier
 
::ll::TypedStorage< 8, 16, ::ItemDescriptormUsingConvertsTo
 
::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::SubscriptionmOnUseTimeDepletedSubscription
 
::ll::TypedStorage< 8, 16, ::Bedrock::PubSub::SubscriptionmOnUseSubscription
 
::ll::TypedStorage< 8, 8, ::ComponentItem * > mOwner
 

Member Function Documentation

◆ _initializeComponent()

virtual void FoodItemComponent::_initializeComponent ( )
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 ( bool & result,
::ItemStack & item,
::Player & player )
virtual

Implements IFoodItemComponent.

◆ useTimeDepleted()

virtual::Item const * FoodItemComponent::useTimeDepleted ( ::ItemUseMethod & ,
::ItemStack const & ,
::ItemStack & ,
::Player & ,
::Level &  )
virtual

Implements IFoodItemComponent.

◆ $vftableForNetworkedItemComponent()

static 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()

static 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.

◆ $vftable()

static 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()

static MCAPI ::std::add_lvalue_reference_t< char const []> 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()

static MCAPI ::std::add_lvalue_reference_t< char const []> 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()

static MCAPI ::std::add_lvalue_reference_t< char const []> 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: