LeviLamina
Loading...
Searching...
No Matches
Item.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/WeakPtr.h"
7#include "mc/deps/core/string/HashedString.h"
8#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
9#include "mc/deps/shared_types/legacy/actor/ActorLocation.h"
10#include "mc/deps/shared_types/legacy/item/UseAnimation.h"
11#include "mc/gameplayhandlers/CoordinatorResult.h"
12#include "mc/resources/BaseGameVersion.h"
13#include "mc/resources/JsonBetaState.h"
14#include "mc/world/interactions/mining/MineBlockItemEffectType.h"
15#include "mc/world/item/CreativeItemCategory.h"
16#include "mc/world/item/InHandUpdateType.h"
17#include "mc/world/item/ItemAcquisitionMethod.h"
18#include "mc/world/item/ItemColor.h"
19#include "mc/world/item/ItemCommandVisibility.h"
20#include "mc/world/item/ItemUseMethod.h"
21#include "mc/world/item/Rarity.h"
22#include "mc/world/item/registry/ItemVersion.h"
23#include "mc/world/level/block/BlockShape.h"
24
25// auto generated forward declare list
26// clang-format off
27class Actor;
28class Block;
29class BlockLegacy;
30class BlockPos;
31class BlockSource;
33class CompoundTag;
34class Container;
36class IDataInput;
37class IDataOutput;
39class ILevel;
42class ItemComponent;
43class ItemDescriptor;
44class ItemStack;
45class ItemStackBase;
46class Level;
47class Mob;
48class Player;
50class RenderParams;
52class SemVersion;
53class Vec3;
55struct Brightness;
56struct CommandName;
57struct ItemTag;
60namespace Bedrock::Safety { class RedactableString; }
61namespace Json { class Value; }
62namespace mce { class Color; }
63// clang-format on
64
65class Item {
66public:
67 // Item inner types declare
68 // clang-format off
69 class Tier;
70 // clang-format on
71
72 // Item inner types define
73 class Tier {
74 public:
75 // member variables
76 // NOLINTBEGIN
77 ::ll::TypedStorage<4, 4, int const> mLevel;
78 ::ll::TypedStorage<4, 4, int const> mUses;
79 ::ll::TypedStorage<4, 4, float const> mSpeed;
80 ::ll::TypedStorage<4, 4, int const> mDamage;
81 ::ll::TypedStorage<4, 4, int const> mEnchantmentValue;
82 // NOLINTEND
83 };
84
85public:
86 // member variables
87 // NOLINTBEGIN
88 ::ll::TypedStorage<4, 4, ::ItemVersion> mItemParseVersion;
89 ::ll::TypedStorage<8, 32, ::std::string> mTextureAtlasFile;
90 ::ll::TypedStorage<4, 4, int> mFrameCount;
91 ::ll::TypedStorage<1, 1, bool> mAnimatesInToolbar;
92 ::ll::TypedStorage<1, 1, bool> mIsMirroredArt;
93 ::ll::TypedStorage<1, 1, ::SharedTypes::Legacy::UseAnimation> mUseAnim;
94 ::ll::TypedStorage<8, 32, ::std::string> mHoverTextColorFormat;
95 ::ll::TypedStorage<4, 4, int> mIconFrame;
96 ::ll::TypedStorage<4, 4, int> mAtlasFrame;
97 ::ll::TypedStorage<4, 4, int> mAtlasTotalFrames;
98 ::ll::TypedStorage<8, 32, ::std::string> mIconName;
99 ::ll::TypedStorage<8, 32, ::std::string> mAtlasName;
100 ::ll::TypedStorage<1, 1, uchar> mMaxStackSize;
101 ::ll::TypedStorage<2, 2, short> mId;
102 ::ll::TypedStorage<8, 32, ::std::string> mDescriptionId;
103 ::ll::TypedStorage<8, 48, ::HashedString> mRawNameId;
104 ::ll::TypedStorage<8, 32, ::std::string> mNamespace;
105 ::ll::TypedStorage<8, 48, ::HashedString> mFullName;
106 ::ll::TypedStorage<2, 2, short> mMaxDamage;
107 bool mIsGlint : 1;
108 bool mHandEquipped : 1;
109 bool mIsStackedByData : 1;
110 bool mRequiresWorldBuilder : 1;
111 bool mExplodable : 1;
112 bool mFireResistant : 1;
113 bool mShouldDespawn : 1;
114 bool mAllowOffhand : 1;
115 bool mIgnoresPermissions : 1;
116 ::ll::TypedStorage<4, 4, int> mMaxUseDuration;
117 ::ll::TypedStorage<8, 32, ::BaseGameVersion> mMinRequiredBaseGameVersion;
118 ::ll::TypedStorage<8, 8, ::WeakPtr<::BlockLegacy const>> mLegacyBlock;
119 ::ll::TypedStorage<4, 4, ::CreativeItemCategory> mCreativeCategory;
120 ::ll::TypedStorage<8, 8, ::Item*> mCraftingRemainingItem;
121 ::ll::TypedStorage<8, 32, ::std::string> mCreativeGroup;
122 ::ll::TypedStorage<4, 4, float> mFurnaceBurnIntervalModifier;
123 ::ll::TypedStorage<4, 4, float> mFurnaceXPmultiplier;
124 ::ll::TypedStorage<1, 1, ::ItemCommandVisibility> mIsHiddenInCommands;
125 ::ll::TypedStorage<4, 4, ::Rarity> mBaseRarity;
126 ::ll::TypedStorage<4, 4, ::Interactions::Mining::MineBlockItemEffectType> mMineBlockType;
127 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::FoodItemComponentLegacy>> mFoodComponentLegacy;
128 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SeedItemComponentLegacy>> mSeedComponent;
129 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CameraItemComponentLegacy>> mCameraComponentLegacy;
130 ::ll::TypedStorage<8, 24, ::std::vector<::std::function<void()>>> mOnResetBAIcallbacks;
131 ::ll::TypedStorage<8, 24, ::std::vector<::ItemTag>> mTags;
132 // NOLINTEND
133
134public:
135 // prevent constructor by default
136 Item();
137
138public:
139 // virtual functions
140 // NOLINTBEGIN
141 // vIndex: 0
142 virtual ~Item();
143
144 // vIndex: 1
145 virtual bool initServer(::Json::Value const&, ::SemVersion const&, ::IPackLoadContext&, ::JsonBetaState const);
146
147 // vIndex: 2
148 virtual void tearDown();
149
150 // vIndex: 3
151 virtual ::Item& setDescriptionId(::std::string const& description);
152
153 // vIndex: 4
154 virtual ::std::string const& getDescriptionId() const;
155
156 // vIndex: 5
157 virtual int getMaxUseDuration(::ItemStack const*) const;
158
159 // vIndex: 6
160 virtual ::WeakPtr<::BlockLegacy const> const& getLegacyBlockForRendering() const;
161
162 // vIndex: 7
163 virtual bool isMusicDisk() const;
164
165 // vIndex: 8
166 virtual void executeEvent(::ItemStackBase&, ::std::string const&, ::RenderParams&) const;
167
168 // vIndex: 9
169 virtual bool isComponentBased() const;
170
171 // vIndex: 10
172 virtual bool isHumanoidArmor() const;
173
174 // vIndex: 11
175 virtual bool isBlockPlanterItem() const;
176
177 // vIndex: 12
178 virtual bool isBucket() const;
179
180 // vIndex: 13
181 virtual bool isCandle() const;
182
183 // vIndex: 14
184 virtual bool isDamageable() const;
185
186 // vIndex: 15
187 virtual bool isDyeable() const;
188
189 // vIndex: 16
190 virtual bool isDye() const;
191
192 // vIndex: 17
193 virtual ::ItemColor getItemColor() const;
194
195 // vIndex: 18
196 virtual bool isFertilizer() const;
197
198 // vIndex: 19
199 virtual bool isFood() const;
200
201 // vIndex: 20
202 virtual bool isThrowable() const;
203
204 // vIndex: 21
205 virtual bool isUseable() const;
206
207 // vIndex: 22
208 virtual bool isTrimAllowed() const;
209
210 // vIndex: 23
211 virtual ::ItemComponent* getComponent(::HashedString const&) const;
212
213 // vIndex: 24
214 virtual ::IFoodItemComponent* getFood() const;
215
216 // vIndex: 25
217 virtual ::Item& setMaxDamage(int maxDamage);
218
219 // vIndex: 26
220 virtual ::Item& setMaxUseDuration(int maxUseDuration);
221
222 // vIndex: 27
223 virtual ::std::unique_ptr<::CompoundTag> buildNetworkTag() const;
224
225 // vIndex: 28
226 virtual void initializeFromNetwork(::CompoundTag const& tag);
227
228 // vIndex: 29
229 virtual ::std::vector<::std::string> validateFromNetwork(::CompoundTag const&);
230
231 // vIndex: 30
232 virtual ::BlockShape getBlockShape() const;
233
234 // vIndex: 31
235 virtual bool canBeDepleted() const;
236
237 // vIndex: 32
238 virtual bool canDestroySpecial(::Block const&) const;
239
240 // vIndex: 33
241 virtual int getLevelDataForAuxValue(int) const;
242
243 // vIndex: 34
244 virtual bool isStackedByData() const;
245
246 // vIndex: 35
247 virtual short getMaxDamage() const;
248
249 // vIndex: 36
250 virtual int getAttackDamage() const;
251
252 // vIndex: 37
253 virtual float getAttackDamageBonus(::Actor const&, float) const;
254
255 // vIndex: 38
256 virtual bool isHandEquipped() const;
257
258 // vIndex: 39
259 virtual bool isGlint(::ItemStackBase const& stack) const;
260
261 // vIndex: 40
262 virtual bool isPattern() const;
263
264 // vIndex: 41
265 virtual int getPatternIndex() const;
266
267 // vIndex: 42
268 virtual ::Rarity getBaseRarity() const;
269
270 // vIndex: 43
271 virtual ::Rarity getRarity(::ItemStackBase const& stack) const;
272
273 // vIndex: 44
274 virtual bool showsDurabilityInCreative() const;
275
276 // vIndex: 45
277 virtual bool isWearableThroughLootTable(::CompoundTag const*) const;
278
279 // vIndex: 46
280 virtual bool canDestroyInCreative() const;
281
282 // vIndex: 47
283 virtual bool isDestructive(int) const;
284
285 // vIndex: 48
286 virtual bool isLiquidClipItem() const;
287
288 // vIndex: 49
289 virtual bool shouldInteractionWithBlockBypassLiquid(::Block const&) const;
290
291 // vIndex: 50
292 virtual bool requiresInteract() const;
293
294 // vIndex: 51
295 virtual ::std::string getHoverTextColor(::ItemStackBase const& stack) const;
296
297 // vIndex: 52
298 virtual void appendFormattedHovertext(
299 ::ItemStackBase const& stack,
300 ::Level& level,
302 bool showCategory
303 ) const;
304
305 // vIndex: 53
306 virtual bool isValidRepairItem(::ItemStackBase const&, ::ItemStackBase const&, ::BaseGameVersion const&) const;
307
308 // vIndex: 54
309 virtual int getEnchantSlot() const;
310
311 // vIndex: 55
312 virtual int getEnchantValue() const;
313
314 // vIndex: 56
315 virtual int getArmorValue() const;
316
317 // vIndex: 57
318 virtual int getToughnessValue() const;
319
320 // vIndex: 58
321 virtual ::SharedTypes::Legacy::LevelSoundEvent getBreakSound() const;
322
323 // vIndex: 59
324 virtual bool isComplex() const;
325
326 // vIndex: 60
327 virtual bool isValidAuxValue(int) const;
328
329 // vIndex: 61
330 virtual int getDamageChance(int unbreaking) const;
331
332 // vIndex: 62
333 virtual float getViewDamping() const;
334
335 // vIndex: 63
336 virtual bool uniqueAuxValues() const;
337
338 // vIndex: 64
339 virtual bool isActorPlacerItem() const;
340
341 // vIndex: 65
342 virtual bool isMultiColorTinted(::ItemStack const&) const;
343
344 // vIndex: 66
345 virtual ::mce::Color getColor(::CompoundTag const*, ::ItemDescriptor const&) const;
346
347 // vIndex: 68
348 virtual bool hasCustomColor(::ItemStackBase const&) const;
349
350 // vIndex: 67
351 virtual bool hasCustomColor(::CompoundTag const*) const;
352
353 // vIndex: 69
354 virtual void clearColor(::ItemStackBase&) const;
355
356 // vIndex: 70
357 virtual void setColor(::ItemStackBase&, ::mce::Color const&) const;
358
359 // vIndex: 71
360 virtual ::mce::Color getBaseColor(::ItemStack const&) const;
361
362 // vIndex: 72
363 virtual ::mce::Color getSecondaryColor(::ItemStack const&) const;
364
365 // vIndex: 73
366 virtual ::ActorDefinitionIdentifier getActorIdentifier(::ItemStack const&) const;
367
368 // vIndex: 74
369 virtual int buildIdAux(short auxValue, ::CompoundTag const*) const;
370
371 // vIndex: 75
372 virtual bool canUseOnSimTick() const;
373
374 // vIndex: 76
375 virtual ::ItemStack& use(::ItemStack& item, ::Player& player) const;
376
377 // vIndex: 77
378 virtual ::Actor* createProjectileActor(::BlockSource&, ::ItemStack const&, ::Vec3 const&, ::Vec3 const&) const;
379
380 // vIndex: 78
381 virtual bool dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const;
382
383 // vIndex: 79
384 virtual ::ItemUseMethod useTimeDepleted(::ItemStack& inoutInstance, ::Level* level, ::Player* player) const;
385
386 // vIndex: 80
387 virtual void releaseUsing(::ItemStack& item, ::Player* player, int durationLeft) const;
388
389 // vIndex: 81
390 virtual float getDestroySpeed(::ItemStackBase const&, ::Block const&) const;
391
392 // vIndex: 82
393 virtual void hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const;
394
395 // vIndex: 83
396 virtual void hitActor(::ItemStack&, ::Actor&, ::Mob&) const;
397
398 // vIndex: 84
399 virtual void hitBlock(::ItemStack&, ::Block const&, ::BlockPos const&, ::Mob&) const;
400
401 // vIndex: 85
402 virtual ::std::string buildDescriptionName(::ItemStackBase const& stack) const;
403
404 // vIndex: 86
405 virtual ::Bedrock::Safety::RedactableString const buildRedactedDescriptionName(::ItemStackBase const& stack) const;
406
407 // vIndex: 87
408 virtual ::std::string buildDescriptionId(::ItemDescriptor const&, ::CompoundTag const*) const;
409
410 // vIndex: 88
411 virtual ::std::string buildEffectDescriptionName(::ItemStackBase const& stack) const;
412
413 // vIndex: 89
414 virtual void
415 readUserData(::ItemStackBase& stack, ::IDataInput& input, ::ReadOnlyBinaryStream& underlyingStream) const;
416
417 // vIndex: 90
418 virtual void writeUserData(::ItemStackBase const& stack, ::IDataOutput& output) const;
419
420 // vIndex: 91
421 virtual uchar getMaxStackSize(::ItemDescriptor const&) const;
422
423 // vIndex: 92
424 virtual bool inventoryTick(::ItemStack&, ::Level&, ::Actor&, int, bool) const;
425
426 // vIndex: 93
427 virtual void refreshedInContainer(::ItemStackBase const&, ::Level&) const;
428
429 // vIndex: 94
430 virtual ::HashedString const& getCooldownType() const;
431
432 // vIndex: 95
433 virtual int getCooldownTime() const;
434
435 // vIndex: 97
436 virtual void fixupCommon(::ItemStackBase& stack) const;
437
438 // vIndex: 96
439 virtual void fixupCommon(::ItemStackBase& stack, ::ILevel&) const;
440
441 // vIndex: 98
442 virtual ::InHandUpdateType getInHandUpdateType(
443 ::Player const&,
444 ::ItemStack const& oldItem,
445 ::ItemStack const& newItem,
446 bool const,
447 bool const slotChanged
448 ) const;
449
450 // vIndex: 99
451 virtual bool validFishInteraction(int) const;
452
453 // vIndex: 100
454 virtual void enchantProjectile(::ItemStackBase const&, ::Actor&) const;
455
456 // vIndex: 101
457 virtual ::SharedTypes::Legacy::ActorLocation getEquipLocation() const;
458
459 // vIndex: 102
460 virtual ::SharedTypes::Legacy::LevelSoundEvent getEquipSound() const;
461
462 // vIndex: 103
463 virtual bool shouldSendInteractionGameEvents() const;
464
465 // vIndex: 104
466 virtual bool useInterruptedByAttacking() const;
467
468 // vIndex: 105
469 virtual bool hasSameRelevantUserData(::ItemStackBase const&, ::ItemStackBase const&) const;
470
471 // vIndex: 106
472 virtual void initClient(::Json::Value const&, ::SemVersion const&, ::JsonBetaState const, ::IPackLoadContext&);
473
474 // vIndex: 107
475 virtual ::Item& setIconInfo(::std::string const& name, int index);
476
477 // vIndex: 108
478 virtual ::ResolvedItemIconInfo getIconInfo(::ItemStackBase const& item, int, bool) const;
479
480 // vIndex: 109
481 virtual ::std::string getInteractText(::Player const& player) const;
482
483 // vIndex: 110
484 virtual int getAnimationFrameFor(::Mob*, bool, ::ItemStack const*, bool) const;
485
486 // vIndex: 111
487 virtual bool isEmissive(int auxValue) const;
488
489 // vIndex: 112
490 virtual ::Brightness getLightEmission(int) const;
491
492 // vIndex: 113
493 virtual bool canBeCharged() const;
494
495 // vIndex: 114
496 virtual void playSoundIncrementally(::ItemStack const&, ::Mob&) const;
497
498 // vIndex: 115
499 virtual float getFurnaceXPmultiplier(::ItemStackBase const&) const;
500
501 // vIndex: 116
502 virtual bool calculatePlacePos(::ItemStackBase& instance, ::Actor& entity, uchar& face, ::BlockPos& pos) const;
503
504 // vIndex: 117
505 virtual bool
506 _checkUseOnPermissions(::Actor& entity, ::ItemStackBase& item, uchar const& face, ::BlockPos const& pos) const;
507
508 // vIndex: 118
509 virtual bool _calculatePlacePos(::ItemStackBase&, ::Actor&, uchar&, ::BlockPos&) const;
510
511 // vIndex: 119
512 virtual bool _shouldAutoCalculatePlacePos() const;
513
514 // vIndex: 120
515 virtual ::InteractionResult
516 _useOn(::ItemStack& instance, ::Actor& entity, ::BlockPos pos, uchar face, ::Vec3 const& clickPos) const;
517 // NOLINTEND
518
519public:
520 // member functions
521 // NOLINTBEGIN
522 MCAPI Item(::std::string const& nameId, short id);
523
524 MCAPI bool _dispenseHoneycombItem(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos) const;
525
526 MCAPI void _helpChangeInventoryItemInPlace(
527 ::Actor& actor,
528 ::ItemStack& startingItem,
529 ::ItemStack& replacementItem,
530 ::ItemAcquisitionMethod acquisitionMethod
531 ) const;
532
533 MCAPI ::CoordinatorResult _sendTryPlaceBlockEvent(
534 ::Block const& block,
535 ::BlockSource const& region,
536 ::Actor const& actor,
537 ::BlockPos const& pos,
538 uchar face,
539 ::Vec3 const& clickPos
540 ) const;
541
542 MCAPI ::Item& addTag(::HashedString const& tag);
543
544 MCAPI ::Item& addTag(::ItemTag const& tag);
545
546 MCAPI ::Item& addTags(::std::initializer_list<::std::reference_wrapper<::ItemTag const>> tags);
547
548 MCAPI ::std::string buildCategoryDescriptionName() const;
549
550 MCAPI bool canBeUsedInCommands(::BaseGameVersion const& baseGameVersion) const;
551
552 MCAPI void clearTags();
553
554 MCAPI ::std::vector<::CommandName> getCommandNames() const;
555
556 MCAPI ::std::string getSerializedName() const;
557
558 MCAPI bool hasTag(::HashedString const& tag) const;
559
560 MCAPI bool isCommandOnly(::BaseGameVersion const& baseGameVersion) const;
561
562 MCAPI bool isElytra() const;
563
564 MCAPI bool operator==(::Item const& rhs) const;
565
566 MCAPI void removeDamageValue(::ItemStackBase& stack) const;
567
568 MCAPI ::Item& setAllowOffhand(bool offhand);
569
570 MCAPI ::Item& setCreativeGroup(::std::string const& group);
571
572 MCAPI void setDamageValue(::ItemStackBase& stack, short newDamage) const;
573
574 MCAPI ::Item& setIsGlint(bool glint);
575
576 MCAPI ::Item& setMinRequiredBaseGameVersion(::BaseGameVersion const& baseGameVersion);
577
578 MCAPI ::Item& setShouldDespawn(bool despawn);
579
580 MCAPI ::Item& setStackedByData(bool isStackedByData);
581
582 MCAPI bool
583 updateCustomBlockEntityTag(::BlockSource& region, ::ItemStackBase& instance, ::BlockPos const& pos) const;
584
585 MCAPI ::InteractionResult useOn(
586 ::ItemStack& item,
587 ::Actor& entity,
588 int x,
589 int y,
590 int z,
591 uchar face,
592 ::Vec3 const& clickPos,
593 ::ItemUsedOnEventContext itemUsedOnEventContext
594 ) const;
595 // NOLINTEND
596
597public:
598 // static functions
599 // NOLINTBEGIN
600 MCAPI static bool isElytra(::ItemDescriptor const& itemDescriptor);
601
602 MCAPI static bool isElytraBroken(int value);
603
604 MCAPI static bool isSameTypeAndItem(::ItemStackBase const& firstItem, ::ItemStackBase const& secondItem);
605 // NOLINTEND
606
607public:
608 // static variables
609 // NOLINTBEGIN
610 MCAPI static ::std::string const& ICON_DESCRIPTION_PREFIX();
611
612 MCAPI static ::std::string const& TAG_DAMAGE();
613
614 MCAPI static bool const& mGenerateDenyParticleEffect();
615 // NOLINTEND
616
617public:
618 // constructor thunks
619 // NOLINTBEGIN
620 MCAPI void* $ctor(::std::string const& nameId, short id);
621 // NOLINTEND
622
623public:
624 // destructor thunk
625 // NOLINTBEGIN
626 MCAPI void $dtor();
627 // NOLINTEND
628
629public:
630 // virtual function thunks
631 // NOLINTBEGIN
632 MCFOLD void $tearDown();
633
634 MCAPI ::Item& $setDescriptionId(::std::string const& description);
635
636 MCFOLD ::std::string const& $getDescriptionId() const;
637
638 MCAPI int $getMaxUseDuration(::ItemStack const*) const;
639
640 MCFOLD ::WeakPtr<::BlockLegacy const> const& $getLegacyBlockForRendering() const;
641
642 MCFOLD bool $isMusicDisk() const;
643
644 MCFOLD void $executeEvent(::ItemStackBase&, ::std::string const&, ::RenderParams&) const;
645
646 MCFOLD bool $isComponentBased() const;
647
648 MCFOLD bool $isHumanoidArmor() const;
649
650 MCFOLD bool $isBlockPlanterItem() const;
651
652 MCFOLD bool $isBucket() const;
653
654 MCFOLD bool $isCandle() const;
655
656 MCAPI bool $isDamageable() const;
657
658 MCFOLD bool $isDyeable() const;
659
660 MCFOLD bool $isDye() const;
661
662 MCFOLD bool $isFertilizer() const;
663
664 MCFOLD bool $isFood() const;
665
666 MCFOLD bool $isThrowable() const;
667
668 MCFOLD bool $isUseable() const;
669
670 MCFOLD bool $isTrimAllowed() const;
671
672 MCFOLD ::ItemComponent* $getComponent(::HashedString const&) const;
673
674 MCAPI ::IFoodItemComponent* $getFood() const;
675
676 MCAPI ::Item& $setMaxDamage(int maxDamage);
677
678 MCAPI ::Item& $setMaxUseDuration(int maxUseDuration);
679
680 MCAPI ::std::unique_ptr<::CompoundTag> $buildNetworkTag() const;
681
682 MCAPI void $initializeFromNetwork(::CompoundTag const& tag);
683
684 MCFOLD ::std::vector<::std::string> $validateFromNetwork(::CompoundTag const&);
685
686 MCFOLD ::BlockShape $getBlockShape() const;
687
688 MCAPI bool $canBeDepleted() const;
689
690 MCFOLD bool $canDestroySpecial(::Block const&) const;
691
692 MCFOLD int $getLevelDataForAuxValue(int) const;
693
694 MCAPI bool $isStackedByData() const;
695
696 MCFOLD short $getMaxDamage() const;
697
698 MCFOLD int $getAttackDamage() const;
699
700 MCFOLD float $getAttackDamageBonus(::Actor const&, float) const;
701
702 MCAPI bool $isHandEquipped() const;
703
704 MCFOLD bool $isGlint(::ItemStackBase const& stack) const;
705
706 MCFOLD bool $isPattern() const;
707
708 MCFOLD int $getPatternIndex() const;
709
710 MCAPI ::Rarity $getBaseRarity() const;
711
712 MCAPI ::Rarity $getRarity(::ItemStackBase const& stack) const;
713
714 MCFOLD bool $showsDurabilityInCreative() const;
715
716 MCFOLD bool $isWearableThroughLootTable(::CompoundTag const*) const;
717
718 MCFOLD bool $canDestroyInCreative() const;
719
720 MCFOLD bool $isDestructive(int) const;
721
722 MCFOLD bool $isLiquidClipItem() const;
723
724 MCFOLD bool $shouldInteractionWithBlockBypassLiquid(::Block const&) const;
725
726 MCFOLD bool $requiresInteract() const;
727
728 MCAPI ::std::string $getHoverTextColor(::ItemStackBase const& stack) const;
729
730 MCAPI void $appendFormattedHovertext(
731 ::ItemStackBase const& stack,
732 ::Level& level,
734 bool showCategory
735 ) const;
736
737 MCFOLD bool $isValidRepairItem(::ItemStackBase const&, ::ItemStackBase const&, ::BaseGameVersion const&) const;
738
739 MCFOLD int $getEnchantSlot() const;
740
741 MCFOLD int $getEnchantValue() const;
742
743 MCFOLD int $getArmorValue() const;
744
745 MCFOLD int $getToughnessValue() const;
746
747 MCFOLD ::SharedTypes::Legacy::LevelSoundEvent $getBreakSound() const;
748
749 MCFOLD bool $isComplex() const;
750
751 MCFOLD bool $isValidAuxValue(int) const;
752
753 MCAPI int $getDamageChance(int unbreaking) const;
754
755 MCFOLD float $getViewDamping() const;
756
757 MCFOLD bool $uniqueAuxValues() const;
758
759 MCFOLD bool $isActorPlacerItem() const;
760
761 MCFOLD bool $isMultiColorTinted(::ItemStack const&) const;
762
763 MCFOLD ::mce::Color $getColor(::CompoundTag const*, ::ItemDescriptor const&) const;
764
765 MCFOLD bool $hasCustomColor(::ItemStackBase const&) const;
766
767 MCFOLD bool $hasCustomColor(::CompoundTag const*) const;
768
769 MCFOLD void $clearColor(::ItemStackBase&) const;
770
771 MCFOLD void $setColor(::ItemStackBase&, ::mce::Color const&) const;
772
773 MCFOLD ::mce::Color $getBaseColor(::ItemStack const&) const;
774
775 MCFOLD ::mce::Color $getSecondaryColor(::ItemStack const&) const;
776
777 MCAPI ::ActorDefinitionIdentifier $getActorIdentifier(::ItemStack const&) const;
778
779 MCAPI int $buildIdAux(short auxValue, ::CompoundTag const*) const;
780
781 MCFOLD bool $canUseOnSimTick() const;
782
783 MCAPI ::ItemStack& $use(::ItemStack& item, ::Player& player) const;
784
785 MCFOLD ::Actor* $createProjectileActor(::BlockSource&, ::ItemStack const&, ::Vec3 const&, ::Vec3 const&) const;
786
787 MCAPI bool $dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar) const;
788
789 MCAPI ::ItemUseMethod $useTimeDepleted(::ItemStack& inoutInstance, ::Level* level, ::Player* player) const;
790
791 MCFOLD void $releaseUsing(::ItemStack& item, ::Player* player, int durationLeft) const;
792
793 MCFOLD float $getDestroySpeed(::ItemStackBase const&, ::Block const&) const;
794
795 MCAPI void $hurtActor(::ItemStack& item, ::Actor& actor, ::Mob& attacker) const;
796
797 MCFOLD void $hitActor(::ItemStack&, ::Actor&, ::Mob&) const;
798
799 MCFOLD void $hitBlock(::ItemStack&, ::Block const&, ::BlockPos const&, ::Mob&) const;
800
801 MCAPI ::std::string $buildDescriptionName(::ItemStackBase const& stack) const;
802
803 MCAPI ::Bedrock::Safety::RedactableString const $buildRedactedDescriptionName(::ItemStackBase const& stack) const;
804
805 MCAPI ::std::string $buildDescriptionId(::ItemDescriptor const&, ::CompoundTag const*) const;
806
807 MCAPI ::std::string $buildEffectDescriptionName(::ItemStackBase const& stack) const;
808
809 MCAPI void
810 $readUserData(::ItemStackBase& stack, ::IDataInput& input, ::ReadOnlyBinaryStream& underlyingStream) const;
811
812 MCAPI void $writeUserData(::ItemStackBase const& stack, ::IDataOutput& output) const;
813
814 MCFOLD uchar $getMaxStackSize(::ItemDescriptor const&) const;
815
816 MCFOLD bool $inventoryTick(::ItemStack&, ::Level&, ::Actor&, int, bool) const;
817
818 MCFOLD void $refreshedInContainer(::ItemStackBase const&, ::Level&) const;
819
820 MCAPI ::HashedString const& $getCooldownType() const;
821
822 MCAPI int $getCooldownTime() const;
823
824 MCAPI void $fixupCommon(::ItemStackBase& stack) const;
825
826 MCFOLD void $fixupCommon(::ItemStackBase& stack, ::ILevel&) const;
827
828 MCAPI ::InHandUpdateType $getInHandUpdateType(
829 ::Player const&,
830 ::ItemStack const& oldItem,
831 ::ItemStack const& newItem,
832 bool const,
833 bool const slotChanged
834 ) const;
835
836 MCFOLD bool $validFishInteraction(int) const;
837
838 MCFOLD void $enchantProjectile(::ItemStackBase const&, ::Actor&) const;
839
840 MCAPI ::SharedTypes::Legacy::LevelSoundEvent $getEquipSound() const;
841
842 MCFOLD bool $shouldSendInteractionGameEvents() const;
843
844 MCFOLD bool $useInterruptedByAttacking() const;
845
846 MCFOLD bool $hasSameRelevantUserData(::ItemStackBase const&, ::ItemStackBase const&) const;
847
848 MCFOLD ::Item& $setIconInfo(::std::string const& name, int index);
849
850 MCAPI ::ResolvedItemIconInfo $getIconInfo(::ItemStackBase const& item, int, bool) const;
851
852 MCAPI ::std::string $getInteractText(::Player const& player) const;
853
854 MCFOLD int $getAnimationFrameFor(::Mob*, bool, ::ItemStack const*, bool) const;
855
856 MCAPI bool $isEmissive(int auxValue) const;
857
858 MCFOLD ::Brightness $getLightEmission(int) const;
859
860 MCFOLD bool $canBeCharged() const;
861
862 MCFOLD void $playSoundIncrementally(::ItemStack const&, ::Mob&) const;
863
864 MCAPI float $getFurnaceXPmultiplier(::ItemStackBase const&) const;
865
866 MCAPI bool $calculatePlacePos(::ItemStackBase& instance, ::Actor& entity, uchar& face, ::BlockPos& pos) const;
867
868 MCFOLD bool
869 $_checkUseOnPermissions(::Actor& entity, ::ItemStackBase& item, uchar const& face, ::BlockPos const& pos) const;
870
871 MCFOLD bool $_calculatePlacePos(::ItemStackBase&, ::Actor&, uchar&, ::BlockPos&) const;
872
873 MCFOLD bool $_shouldAutoCalculatePlacePos() const;
874
875 MCAPI ::InteractionResult
876 $_useOn(::ItemStack& instance, ::Actor& entity, ::BlockPos pos, uchar face, ::Vec3 const& clickPos) const;
877 // NOLINTEND
878
879public:
880 // vftables
881 // NOLINTBEGIN
882 MCNAPI static void** $vftable();
883 // NOLINTEND
884};
Definition Actor.h:103
Definition BaseGameVersion.h:8
Definition RedactableString.h:10
Definition BlockLegacy.h:86
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:38
Definition CameraItemComponentLegacy.h:20
Definition CompoundTag.h:13
Definition Container.h:30
Definition FoodItemComponentLegacy.h:21
Definition HashedString.h:5
Definition IDataInput.h:8
Definition IDataOutput.h:5
Definition IFoodItemComponent.h:17
Definition ILevel.h:204
Definition IPackLoadContext.h:20
Definition InteractionResult.h:5
Definition ItemComponent.h:16
Definition ItemDescriptor.h:22
Definition ItemStackBase.h:35
Definition ItemStack.h:25
Definition Item.h:73
Definition Item.h:65
static MCAPI void ** $vftable()
Definition Value.h:16
Definition Level.h:239
Definition Mob.h:47
Definition Player.h:120
Definition ReadOnlyBinaryStream.h:8
Definition RenderParams.h:30
Definition SeedItemComponentLegacy.h:18
Definition SemVersion.h:16
Definition Vec3.h:10
Definition Color.h:13
Definition ActorDefinitionIdentifier.h:15
Definition Brightness.h:8
Definition CommandName.h:5
Definition ItemTag.h:8
Definition ItemUsedOnEventContext.h:8
Definition ResolvedItemIconInfo.h:8