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