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