50class ComponentItem :
public ::Item {
54 bool mExcludeUserDataDiffCheck : 1;
55 bool mCanDestroyInCreative : 1;
56 bool mRequiresInteract : 1;
57 bool mIsLiquidClipped : 1;
58 ::ll::TypedStorage<4, 4, float> mSpeed;
59 ::ll::TypedStorage<4, 4, int> mDamage;
60 ::ll::TypedStorage<4, 4, ::SharedTypes::EnchantSlot> mEnchantSlot;
61 ::ll::TypedStorage<4, 4, int> mEnchantValue;
62 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mAlias;
63 ::ll::TypedStorage<1, 1, bool> mIsAttachable;
64 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::std::shared_ptr<::ItemComponent>>> mItemComponents;
65 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::IconItemComponent>> mIcon;
66 ::ll::TypedStorage<8, 8, ::BlockType const*> mBlockTypeForRendering;
67 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::std::shared_ptr<::ItemComponent>>>
68 mRegisteredCerealComponents;
69 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::cereal::ReflectionCtx const>> mCtx;
79 virtual ~ComponentItem() ;
81 virtual void initServer(
85 ::std::optional<::LegacyEventItemComponentData> legacyEventData
88 virtual void tearDown() ;
90 virtual bool isComponentBased()
const ;
92 virtual bool isHumanoidArmor()
const ;
94 virtual bool isBlockPlanterItem()
const ;
96 virtual bool isDamageable()
const ;
98 virtual bool isDyeable()
const ;
100 virtual bool isFood()
const ;
102 virtual bool isThrowable()
const ;
104 virtual bool isUseable()
const ;
106 virtual bool isMusicDisk()
const ;
108 virtual bool isTrimAllowed()
const ;
110 virtual ::BlockType
const* getBlockTypeForRendering()
const ;
112 virtual ::ItemComponent* getComponent(
::HashedString const&
id)
const ;
114 virtual ::IFoodItemComponent* getFood()
const ;
116 virtual ::Item& setMaxDamage(
int maxDamage) ;
118 virtual ::std::string
const& getDescriptionId()
const ;
120 virtual ::BlockShape getBlockShape()
const ;
122 virtual bool canBeDepleted()
const ;
124 virtual bool canDestroySpecial(
::Block const& block)
const ;
126 virtual int getLevelDataForAuxValue(
int)
const ;
128 virtual short getMaxDamage()
const ;
130 virtual int getAttackDamage()
const ;
134 virtual bool canDestroyInCreative()
const ;
136 virtual bool isDestructive(
int)
const ;
138 virtual bool isLiquidClipItem()
const ;
140 virtual bool requiresInteract()
const ;
142 virtual void appendFormattedHovertext(
146 bool const showCategory
153 virtual int getEnchantSlot()
const ;
155 virtual int getEnchantValue()
const ;
157 virtual int getArmorValue()
const ;
159 virtual int getDamageChance(
int unbreaking)
const ;
161 virtual uint getSwingDuration()
const ;
163 virtual bool shouldEmitInUseGameEvents()
const ;
173 virtual ::std::optional<::SoundEventIdentifier> getAttackMissSound()
const ;
175 virtual ::std::optional<::SoundEventIdentifier> getAttackHitSound()
const ;
177 virtual ::std::optional<::SoundEventIdentifier> getAttackCriticalHitSound()
const ;
179 virtual ::SharedTypes::Legacy::LevelSoundEvent getEquipSound()
const ;
183 virtual bool canUseAsAttack()
const ;
189 virtual ::Actor* createProjectileActor(
193 ::Vec3 const& aimDirection
213 virtual ::std::string
216 virtual ::std::string buildEffectDescriptionName(
::ItemStackBase const& stack,
bool playerIsCreative)
const
221 virtual ::HashedString
const& getCooldownCategory()
const ;
223 virtual int getCooldownDuration()
const ;
225 virtual ::SharedTypes::ItemCooldownType getCooldownType()
const ;
227 virtual ::SharedTypes::Legacy::ActorLocation getEquipLocation()
const ;
229 virtual bool useVariant(
int,
int,
bool)
const;
231 virtual int getVariant(
int,
int,
bool)
const;
233 virtual void initClient(
237 ::std::optional<::ItemIconInfo> (*)(::std::string
const&,
int)
240 virtual ::std::string getInteractText(
::Player const& player)
const ;
242 virtual int getAnimationFrameFor(
::Mob*,
bool,
::ItemStack const*,
bool)
const ;
244 virtual bool isEmissive(
int auxValue)
const ;
246 virtual ::ResolvedItemIconInfo
247 getIconInfo(
::ItemStackBase const& item,
int newAnimationFrame,
bool inInventoryPane)
const ;
249 virtual ::Item& setIconInfo(::std::string
const& name,
int frame) ;
251 virtual bool canBeCharged()
const ;
253 virtual ::ComponentItem& setDescriptionId(::std::string
const& descriptionId) ;
255 virtual bool shouldUseJsonForRenderMatrix()
const;
257 virtual ::std::unique_ptr<::CompoundTag> buildNetworkTag()
const ;
259 virtual void initializeFromNetwork(
::CompoundTag const& tag) ;
261 virtual ::std::vector<::std::string> validateFromNetwork(
::CompoundTag const& tag) ;
270 virtual bool _shouldAutoCalculatePlacePos()
const ;
272 virtual ::InteractionResult _useOn(
287 MCAPI
void _initializeLoadedComponents(
288 ::std::optional<::SemVersion> documentVersion,
289 ::std::optional<::Experiments> _experiments
294 MCAPI
float getMovementModifier()
const;
299 ::std::optional<::LegacyEventItemComponentData> legacyEventData,
309 MCAPI static ::std::tuple<
311 ::rapidjson::GenericDocument<
312 ::rapidjson::UTF8<char>,
313 ::rapidjson::MemoryPoolAllocator<::rapidjson::CrtAllocator>,
314 ::rapidjson::CrtAllocator>,
318 ::std::string_view document,
320 ::std::optional<::SemVersion> minVersion
339 MCAPI
void $initServer(
343 ::std::optional<::LegacyEventItemComponentData> legacyEventData
346 MCFOLD
void $tearDown();
348 MCFOLD
bool $isComponentBased()
const;
350 MCAPI
bool $isHumanoidArmor()
const;
352 MCAPI
bool $isBlockPlanterItem()
const;
354 MCAPI
bool $isDamageable()
const;
356 MCAPI
bool $isDyeable()
const;
358 MCFOLD
bool $isFood()
const;
360 MCAPI
bool $isThrowable()
const;
362 MCAPI
bool $isUseable()
const;
364 MCAPI
bool $isMusicDisk()
const;
366 MCAPI
bool $isTrimAllowed()
const;
368 MCAPI ::BlockType
const* $getBlockTypeForRendering()
const;
370 MCAPI ::ItemComponent* $getComponent(
::HashedString const&
id)
const;
372 MCAPI ::IFoodItemComponent* $getFood()
const;
374 MCAPI ::Item& $setMaxDamage(
int maxDamage);
376 MCAPI ::std::string
const& $getDescriptionId()
const;
378 MCFOLD ::BlockShape $getBlockShape()
const;
380 MCAPI
bool $canBeDepleted()
const;
382 MCAPI
bool $canDestroySpecial(
::Block const& block)
const;
384 MCFOLD
int $getLevelDataForAuxValue(
int)
const;
386 MCAPI
short $getMaxDamage()
const;
388 MCAPI
int $getAttackDamage()
const;
392 MCAPI
bool $canDestroyInCreative()
const;
394 MCFOLD
bool $isDestructive(
int)
const;
396 MCAPI
bool $isLiquidClipItem()
const;
398 MCAPI
bool $requiresInteract()
const;
400 MCAPI
void $appendFormattedHovertext(
404 bool const showCategory
410 MCAPI
int $getEnchantSlot()
const;
412 MCFOLD
int $getEnchantValue()
const;
414 MCAPI
int $getArmorValue()
const;
416 MCAPI
int $getDamageChance(
int unbreaking)
const;
418 MCAPI uint $getSwingDuration()
const;
420 MCAPI
bool $shouldEmitInUseGameEvents()
const;
430 MCAPI ::std::optional<::SoundEventIdentifier> $getAttackMissSound()
const;
432 MCAPI ::std::optional<::SoundEventIdentifier> $getAttackHitSound()
const;
434 MCAPI ::std::optional<::SoundEventIdentifier> $getAttackCriticalHitSound()
const;
436 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound()
const;
440 MCAPI
bool $canUseAsAttack()
const;
445 MCAPI ::Actor* $createProjectileActor(
449 ::Vec3 const& aimDirection
469 MCAPI ::std::string $buildEffectDescriptionName(
::ItemStackBase const& stack,
bool playerIsCreative)
const;
473 MCAPI ::HashedString
const& $getCooldownCategory()
const;
475 MCAPI
int $getCooldownDuration()
const;
477 MCAPI ::SharedTypes::ItemCooldownType $getCooldownType()
const;
479 MCAPI ::SharedTypes::Legacy::ActorLocation $getEquipLocation()
const;
481 MCFOLD
bool $useVariant(
int,
int,
bool)
const;
483 MCFOLD
int $getVariant(
int,
int,
bool)
const;
485 MCAPI
void $initClient(
489 ::std::optional<::ItemIconInfo> (*)(::std::string
const&,
int)
492 MCAPI ::std::string $getInteractText(
::Player const& player)
const;
494 MCFOLD
int $getAnimationFrameFor(
::Mob*,
bool,
::ItemStack const*,
bool)
const;
496 MCFOLD
bool $isEmissive(
int auxValue)
const;
498 MCAPI ::ResolvedItemIconInfo
499 $getIconInfo(
::ItemStackBase const& item,
int newAnimationFrame,
bool inInventoryPane)
const;
501 MCAPI ::Item& $setIconInfo(::std::string
const& name,
int frame);
503 MCAPI
bool $canBeCharged()
const;
505 MCAPI ::ComponentItem& $setDescriptionId(::std::string
const& descriptionId);
507 MCAPI
bool $shouldUseJsonForRenderMatrix()
const;
509 MCAPI ::std::unique_ptr<::CompoundTag> $buildNetworkTag()
const;
513 MCAPI ::std::vector<::std::string> $validateFromNetwork(
::CompoundTag const& tag);
520 MCAPI
bool $_shouldAutoCalculatePlacePos()
const;
522 MCAPI ::InteractionResult $_useOn(