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