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, ::WeakPtr<::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 ::WeakPtr<::BlockType const>
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 ;
188 virtual ::Actor* createProjectileActor(
192 ::Vec3 const& aimDirection
212 virtual ::std::string
215 virtual ::std::string buildEffectDescriptionName(
::ItemStackBase const& stack,
bool playerIsCreative)
const
220 virtual ::HashedString
const& getCooldownCategory()
const ;
222 virtual int getCooldownDuration()
const ;
224 virtual ::SharedTypes::ItemCooldownType getCooldownType()
const ;
226 virtual ::SharedTypes::Legacy::ActorLocation getEquipLocation()
const ;
228 virtual bool useVariant(
int,
int,
bool)
const;
230 virtual int getVariant(
int,
int,
bool)
const;
232 virtual void initClient(
236 ::std::optional<::ItemIconInfo> (*)(::std::string
const&,
int)
239 virtual ::std::string getInteractText(
::Player const& player)
const ;
241 virtual int getAnimationFrameFor(
::Mob*,
bool,
::ItemStack const*,
bool)
const ;
243 virtual bool isEmissive(
int auxValue)
const ;
245 virtual ::ResolvedItemIconInfo
246 getIconInfo(
::ItemStackBase const& item,
int newAnimationFrame,
bool inInventoryPane)
const ;
248 virtual ::Item& setIconInfo(::std::string
const& name,
int frame) ;
250 virtual bool canBeCharged()
const ;
252 virtual ::ComponentItem& setDescriptionId(::std::string
const& descriptionId) ;
254 virtual bool shouldUseJsonForRenderMatrix()
const;
256 virtual ::std::unique_ptr<::CompoundTag> buildNetworkTag()
const ;
258 virtual void initializeFromNetwork(
::CompoundTag const& tag) ;
260 virtual ::std::vector<::std::string> validateFromNetwork(
::CompoundTag const& tag) ;
269 virtual bool _shouldAutoCalculatePlacePos()
const ;
271 virtual ::InteractionResult
281 MCAPI
void _initializeLoadedComponents(
282 ::std::optional<::SemVersion> documentVersion,
283 ::std::optional<::Experiments> _experiments
288 MCAPI
float getMovementModifier()
const;
293 ::std::optional<::LegacyEventItemComponentData> legacyEventData,
303 MCAPI static ::std::tuple<
305 ::rapidjson::GenericDocument<
306 ::rapidjson::UTF8<char>,
307 ::rapidjson::MemoryPoolAllocator<::rapidjson::CrtAllocator>,
308 ::rapidjson::CrtAllocator>,
312 ::std::string_view document,
314 ::std::optional<::SemVersion> minVersion
333 MCAPI
void $initServer(
337 ::std::optional<::LegacyEventItemComponentData> legacyEventData
340 MCFOLD
void $tearDown();
342 MCFOLD
bool $isComponentBased()
const;
344 MCAPI
bool $isHumanoidArmor()
const;
346 MCAPI
bool $isBlockPlanterItem()
const;
348 MCAPI
bool $isDamageable()
const;
350 MCAPI
bool $isDyeable()
const;
352 MCFOLD
bool $isFood()
const;
354 MCAPI
bool $isThrowable()
const;
356 MCAPI
bool $isUseable()
const;
358 MCAPI
bool $isMusicDisk()
const;
360 MCAPI
bool $isTrimAllowed()
const;
362 MCAPI ::WeakPtr<::BlockType const>
const& $getBlockTypeForRendering()
const;
364 MCAPI ::ItemComponent* $getComponent(
::HashedString const&
id)
const;
366 MCAPI ::IFoodItemComponent* $getFood()
const;
368 MCAPI ::Item& $setMaxDamage(
int maxDamage);
370 MCAPI ::std::string
const& $getDescriptionId()
const;
372 MCFOLD ::BlockShape $getBlockShape()
const;
374 MCAPI
bool $canBeDepleted()
const;
376 MCAPI
bool $canDestroySpecial(
::Block const& block)
const;
378 MCFOLD
int $getLevelDataForAuxValue(
int)
const;
380 MCAPI
short $getMaxDamage()
const;
382 MCFOLD
int $getAttackDamage()
const;
386 MCAPI
bool $canDestroyInCreative()
const;
388 MCFOLD
bool $isDestructive(
int)
const;
390 MCAPI
bool $isLiquidClipItem()
const;
392 MCAPI
bool $requiresInteract()
const;
394 MCAPI
void $appendFormattedHovertext(
398 bool const showCategory
404 MCAPI
int $getEnchantSlot()
const;
406 MCFOLD
int $getEnchantValue()
const;
408 MCAPI
int $getArmorValue()
const;
410 MCAPI
int $getDamageChance(
int unbreaking)
const;
412 MCAPI uint $getSwingDuration()
const;
414 MCAPI
bool $shouldEmitInUseGameEvents()
const;
424 MCAPI ::std::optional<::SoundEventIdentifier> $getAttackMissSound()
const;
426 MCAPI ::std::optional<::SoundEventIdentifier> $getAttackHitSound()
const;
428 MCAPI ::std::optional<::SoundEventIdentifier> $getAttackCriticalHitSound()
const;
430 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound()
const;
434 MCAPI
bool $canUseAsAttack()
const;
438 MCAPI ::Actor* $createProjectileActor(
442 ::Vec3 const& aimDirection
462 MCAPI ::std::string $buildEffectDescriptionName(
::ItemStackBase const& stack,
bool playerIsCreative)
const;
466 MCAPI ::HashedString
const& $getCooldownCategory()
const;
468 MCAPI
int $getCooldownDuration()
const;
470 MCAPI ::SharedTypes::ItemCooldownType $getCooldownType()
const;
472 MCAPI ::SharedTypes::Legacy::ActorLocation $getEquipLocation()
const;
474 MCFOLD
bool $useVariant(
int,
int,
bool)
const;
476 MCFOLD
int $getVariant(
int,
int,
bool)
const;
478 MCAPI
void $initClient(
482 ::std::optional<::ItemIconInfo> (*)(::std::string
const&,
int)
485 MCAPI ::std::string $getInteractText(
::Player const& player)
const;
487 MCFOLD
int $getAnimationFrameFor(
::Mob*,
bool,
::ItemStack const*,
bool)
const;
489 MCFOLD
bool $isEmissive(
int auxValue)
const;
491 MCAPI ::ResolvedItemIconInfo
492 $getIconInfo(
::ItemStackBase const& item,
int newAnimationFrame,
bool inInventoryPane)
const;
494 MCAPI ::Item& $setIconInfo(::std::string
const& name,
int frame);
496 MCAPI
bool $canBeCharged()
const;
498 MCAPI ::ComponentItem& $setDescriptionId(::std::string
const& descriptionId);
500 MCAPI
bool $shouldUseJsonForRenderMatrix()
const;
502 MCAPI ::std::unique_ptr<::CompoundTag> $buildNetworkTag()
const;
506 MCAPI ::std::vector<::std::string> $validateFromNetwork(
::CompoundTag const& tag);
513 MCAPI
bool $_shouldAutoCalculatePlacePos()
const;
515 MCAPI ::InteractionResult