55class ComponentItem :
public ::Item {
59 bool mExcludeUserDataDiffCheck : 1;
60 bool mCanDestroyInCreative : 1;
61 bool mRequiresInteract : 1;
62 bool mIsLiquidClipped : 1;
63 ::ll::TypedStorage<4, 4, float> mSpeed;
64 ::ll::TypedStorage<4, 4, int> mDamage;
65 ::ll::TypedStorage<4, 4, ::SharedTypes::EnchantSlot> mEnchantSlot;
66 ::ll::TypedStorage<4, 4, int> mEnchantValue;
67 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mAlias;
68 ::ll::TypedStorage<1, 1, bool> mIsAttachable;
69 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::std::shared_ptr<::ItemComponent>>> mItemComponents;
70 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::IconItemComponent>> mIcon;
71 ::ll::TypedStorage<8, 8, ::WeakPtr<::BlockType const>> mBlockTypeForRendering;
72 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::std::shared_ptr<::ItemComponent>>>
73 mRegisteredCerealComponents;
74 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::cereal::ReflectionCtx const>> mCtx;
84 virtual ~ComponentItem() ;
86 virtual void initServer(
92 virtual void tearDown() ;
94 virtual bool isComponentBased()
const ;
96 virtual bool isHumanoidArmor()
const ;
98 virtual bool isBlockPlanterItem()
const ;
100 virtual bool isDamageable()
const ;
102 virtual bool isDyeable()
const ;
104 virtual bool isFood()
const ;
106 virtual bool isThrowable()
const ;
108 virtual bool isUseable()
const ;
110 virtual bool isMusicDisk()
const ;
112 virtual bool isTrimAllowed()
const ;
114 virtual ::WeakPtr<::BlockType const>
const& getBlockTypeForRendering()
const ;
116 virtual ::ItemComponent* getComponent(
::HashedString const&
id)
const ;
118 virtual ::IFoodItemComponent* getFood()
const ;
120 virtual ::Item& setMaxDamage(
int maxDamage) ;
122 virtual ::std::string
const& getDescriptionId()
const ;
124 virtual ::BlockShape getBlockShape()
const ;
126 virtual bool canBeDepleted()
const ;
128 virtual bool canDestroySpecial(
::Block const& block)
const ;
130 virtual int getLevelDataForAuxValue(
int)
const ;
132 virtual short getMaxDamage()
const ;
134 virtual int getAttackDamage()
const ;
138 virtual bool canDestroyInCreative()
const ;
140 virtual bool isDestructive(
int)
const ;
142 virtual bool isLiquidClipItem()
const ;
144 virtual bool requiresInteract()
const ;
146 virtual void appendFormattedHovertext(
150 bool const showCategory
157 virtual int getEnchantSlot()
const ;
159 virtual int getEnchantValue()
const ;
161 virtual int getArmorValue()
const ;
163 virtual int getDamageChance(
int unbreaking)
const ;
165 virtual uint getSwingDuration()
const ;
167 virtual bool shouldEmitInUseGameEvents()
const ;
177 virtual ::std::optional<::SharedTypes::Legacy::LevelSoundEvent> getAttackMissSound()
const ;
179 virtual ::std::optional<::SharedTypes::Legacy::LevelSoundEvent> getAttackHitSound()
const ;
181 virtual ::std::optional<::SharedTypes::Legacy::LevelSoundEvent> getAttackCriticalHitSound()
const ;
183 virtual ::SharedTypes::Legacy::LevelSoundEvent getEquipSound()
const ;
187 virtual bool canUseAsAttack()
const ;
192 virtual ::Actor* createProjectileActor(
196 ::Vec3 const& aimDirection
216 virtual ::std::string
219 virtual ::std::string buildEffectDescriptionName(
::ItemStackBase const& stack,
bool playerIsCreative)
const
224 virtual ::HashedString
const& getCooldownCategory()
const ;
226 virtual int getCooldownDuration()
const ;
228 virtual ::SharedTypes::ItemCooldownType getCooldownType()
const ;
230 virtual ::SharedTypes::Legacy::ActorLocation getEquipLocation()
const ;
232 virtual bool useVariant(
int,
int,
bool)
const;
234 virtual int getVariant(
int,
int,
bool)
const;
236 virtual void initClient(
240 ::std::optional<::ItemIconInfo> (*)(::std::string
const&,
int)
243 virtual ::std::string getInteractText(
::Player const& player)
const ;
245 virtual int getAnimationFrameFor(
::Mob*,
bool,
::ItemStack const*,
bool)
const ;
247 virtual bool isEmissive(
int auxValue)
const ;
249 virtual ::ResolvedItemIconInfo
250 getIconInfo(
::ItemStackBase const& item,
int newAnimationFrame,
bool inInventoryPane)
const ;
252 virtual ::Item& setIconInfo(::std::string
const& name,
int frame) ;
254 virtual bool canBeCharged()
const ;
256 virtual ::ComponentItem& setDescriptionId(::std::string
const& descriptionId) ;
258 virtual bool shouldUseJsonForRenderMatrix()
const;
260 virtual ::std::unique_ptr<::CompoundTag> buildNetworkTag()
const ;
262 virtual void initializeFromNetwork(
::CompoundTag const& tag) ;
264 virtual ::std::vector<::std::string> validateFromNetwork(
::CompoundTag const& tag) ;
273 virtual bool _shouldAutoCalculatePlacePos()
const ;
275 virtual ::InteractionResult
285 MCAPI
void _addRegisteredCerealComponent(
286 ::std::pair<::std::string
const, ::std::shared_ptr<::ItemComponent>>& cerealComponent
291 MCAPI ::std::unique_ptr<::ListTag> _buildItemTagsNetworkTag()
const;
293 MCAPI
bool _doesNotTakeDurabilityDamage()
const;
295 MCAPI
void _initializeLoadedComponents(
296 ::std::optional<::SemVersion> documentVersion,
297 ::std::optional<::Experiments> _experiments
300 MCAPI
void _loadComponentsFromNetworkTag(
301 ::std::string
const& componentName,
308 MCAPI
void _loadItemTagsNetworkTag(
::ListTag const& listTag);
312 MCAPI
bool checkComponentDataForContentErrors()
const;
314 MCAPI ::IconItemComponent
const* getIconComponent()
const;
316 MCAPI
float getMovementModifier()
const;
321 ::std::optional<::LegacyEventItemComponentData> legacyEventData,
340 MCAPI ::Bedrock::PubSub::Connector<
349 MCAPI
void setEnchantSlot(::SharedTypes::EnchantSlot enchantSlot);
351 MCAPI
void setEnchantValue(
int enchantValue);
354 MCAPI
void setIsAttachable(
bool value);
357 MCAPI
void setIsLiquidClipped(
bool isLiquidClipped);
359 MCAPI
void setRequiresInteract(
bool requiresInteract);
367 MCAPI static ::std::optional<::LegacyEventItemComponentData>
372 MCAPI static ::std::tuple<
374 ::rapidjson::GenericDocument<
375 ::rapidjson::UTF8<char>,
376 ::rapidjson::MemoryPoolAllocator<::rapidjson::CrtAllocator>,
377 ::rapidjson::CrtAllocator>,
381 ::std::string_view document,
385 ::std::optional<::SemVersion> minVersion
404 MCAPI
void $initServer(
410 MCFOLD
void $tearDown();
412 MCFOLD
bool $isComponentBased()
const;
414 MCAPI
bool $isHumanoidArmor()
const;
416 MCAPI
bool $isBlockPlanterItem()
const;
418 MCAPI
bool $isDamageable()
const;
420 MCAPI
bool $isDyeable()
const;
422 MCFOLD
bool $isFood()
const;
424 MCAPI
bool $isThrowable()
const;
426 MCAPI
bool $isUseable()
const;
428 MCAPI
bool $isMusicDisk()
const;
430 MCAPI
bool $isTrimAllowed()
const;
432 MCAPI ::WeakPtr<::BlockType const>
const& $getBlockTypeForRendering()
const;
434 MCAPI ::ItemComponent* $getComponent(
::HashedString const&
id)
const;
436 MCAPI ::IFoodItemComponent* $getFood()
const;
438 MCAPI ::Item& $setMaxDamage(
int maxDamage);
440 MCAPI ::std::string
const& $getDescriptionId()
const;
442 MCFOLD ::BlockShape $getBlockShape()
const;
444 MCAPI
bool $canBeDepleted()
const;
446 MCAPI
bool $canDestroySpecial(
::Block const& block)
const;
448 MCFOLD
int $getLevelDataForAuxValue(
int)
const;
450 MCAPI
short $getMaxDamage()
const;
452 MCAPI
int $getAttackDamage()
const;
456 MCAPI
bool $canDestroyInCreative()
const;
458 MCFOLD
bool $isDestructive(
int)
const;
460 MCAPI
bool $isLiquidClipItem()
const;
462 MCAPI
bool $requiresInteract()
const;
464 MCAPI
void $appendFormattedHovertext(
468 bool const showCategory
474 MCAPI
int $getEnchantSlot()
const;
476 MCFOLD
int $getEnchantValue()
const;
478 MCAPI
int $getArmorValue()
const;
480 MCAPI
int $getDamageChance(
int unbreaking)
const;
482 MCAPI uint $getSwingDuration()
const;
484 MCAPI
bool $shouldEmitInUseGameEvents()
const;
494 MCAPI ::std::optional<::SharedTypes::Legacy::LevelSoundEvent> $getAttackMissSound()
const;
496 MCAPI ::std::optional<::SharedTypes::Legacy::LevelSoundEvent> $getAttackHitSound()
const;
498 MCAPI ::std::optional<::SharedTypes::Legacy::LevelSoundEvent> $getAttackCriticalHitSound()
const;
500 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound()
const;
504 MCAPI
bool $canUseAsAttack()
const;
508 MCAPI ::Actor* $createProjectileActor(
512 ::Vec3 const& aimDirection
532 MCAPI ::std::string $buildEffectDescriptionName(
::ItemStackBase const& stack,
bool playerIsCreative)
const;
536 MCAPI ::HashedString
const& $getCooldownCategory()
const;
538 MCAPI
int $getCooldownDuration()
const;
540 MCAPI ::SharedTypes::ItemCooldownType $getCooldownType()
const;
542 MCAPI ::SharedTypes::Legacy::ActorLocation $getEquipLocation()
const;
544 MCFOLD
bool $useVariant(
int,
int,
bool)
const;
546 MCFOLD
int $getVariant(
int,
int,
bool)
const;
548 MCAPI
void $initClient(
552 ::std::optional<::ItemIconInfo> (*)(::std::string
const&,
int)
555 MCAPI ::std::string $getInteractText(
::Player const& player)
const;
557 MCFOLD
int $getAnimationFrameFor(
::Mob*,
bool,
::ItemStack const*,
bool)
const;
559 MCFOLD
bool $isEmissive(
int auxValue)
const;
561 MCAPI ::ResolvedItemIconInfo
562 $getIconInfo(
::ItemStackBase const& item,
int newAnimationFrame,
bool inInventoryPane)
const;
564 MCAPI ::Item& $setIconInfo(::std::string
const& name,
int frame);
566 MCAPI
bool $canBeCharged()
const;
568 MCAPI ::ComponentItem& $setDescriptionId(::std::string
const& descriptionId);
570 MCAPI
bool $shouldUseJsonForRenderMatrix()
const;
572 MCAPI ::std::unique_ptr<::CompoundTag> $buildNetworkTag()
const;
576 MCAPI ::std::vector<::std::string> $validateFromNetwork(
::CompoundTag const& tag);
583 MCAPI
bool $_shouldAutoCalculatePlacePos()
const;
585 MCAPI ::InteractionResult
594 MCAPI
static void** $vftable();