Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
PotionItem.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/item/HandSlot.h"
7#include "mc/world/item/Item.h"
8#include "mc/world/item/ItemUseMethod.h"
9#include "mc/world/item/alchemy/PotionType.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BlockPos;
15class BlockSource;
16class CompoundTag;
17class Container;
19class ItemDescriptor;
20class ItemStack;
21class ItemStackBase;
22class Level;
23class Player;
24class Vec3;
26namespace Bedrock::Safety { class RedactableString; }
27// clang-format on
28
29class PotionItem : public ::Item {
30public:
31 // virtual functions
32 // NOLINTBEGIN
33 virtual ::PotionType getPotionType() const;
34
35 virtual ::Item& setIconInfo(::std::string const& name, int id) /*override*/;
36
37 virtual ::std::string buildDescriptionId(::ItemDescriptor const& itemDescriptor, ::CompoundTag const*) const
38 /*override*/;
39
40 virtual void appendFormattedHovertext(
41 ::ItemStackBase const& stack,
42 ::Level& level,
44 bool showCategory
45 ) const /*override*/;
46
47 virtual ::std::string buildEffectDescriptionName(::ItemStackBase const& stack, bool) const /*override*/;
48
49 virtual bool uniqueAuxValues() const /*override*/;
50
51 virtual ::ResolvedItemIconInfo getIconInfo(::ItemStackBase const& item, int, bool) const /*override*/;
52
53 virtual ::ItemStack& use(::ItemStack& instance, ::Player& player, ::HandSlot handSlot) const /*override*/;
54
55 virtual ::ItemUseMethod useTimeDepleted(::ItemStack& instance, ::Level* level, ::Player* player) const /*override*/;
56
57 virtual bool dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar face) const
58 /*override*/;
59
60 virtual bool isValidAuxValue(int auxValue) const /*override*/;
61
62 virtual bool isDestructive(int auxValue) const /*override*/;
63
64 virtual ::InteractionResult _useOn(
65 ::ItemStack& instance,
66 ::Actor& entity,
67 ::BlockPos pos,
68 uchar face,
69 ::HandSlot handSlot,
70 ::Vec3 const& clickPos
71 ) const /*override*/;
72 // NOLINTEND
73
74public:
75 // virtual function thunks
76 // NOLINTBEGIN
77 MCNAPI ::PotionType $getPotionType() const;
78
79 MCNAPI ::Item& $setIconInfo(::std::string const& name, int id);
80
81 MCNAPI ::std::string $buildDescriptionId(::ItemDescriptor const& itemDescriptor, ::CompoundTag const*) const;
82
83 MCAPI void $appendFormattedHovertext(
84 ::ItemStackBase const& stack,
85 ::Level& level,
87 bool showCategory
88 ) const;
89
90 MCNAPI ::std::string $buildEffectDescriptionName(::ItemStackBase const& stack, bool) const;
91
92 MCNAPI bool $uniqueAuxValues() const;
93
94 MCNAPI ::ResolvedItemIconInfo $getIconInfo(::ItemStackBase const& item, int, bool) const;
95
96 MCNAPI ::ItemStack& $use(::ItemStack& instance, ::Player& player, ::HandSlot handSlot) const;
97
98 MCNAPI ::ItemUseMethod $useTimeDepleted(::ItemStack& instance, ::Level* level, ::Player* player) const;
99
100 MCNAPI bool $dispense(::BlockSource& region, ::Container& container, int slot, ::Vec3 const& pos, uchar face) const;
101
102 MCNAPI bool $isValidAuxValue(int auxValue) const;
103
104 MCNAPI bool $isDestructive(int auxValue) const;
105
106 MCNAPI ::InteractionResult $_useOn(
107 ::ItemStack& instance,
108 ::Actor& entity,
109 ::BlockPos pos,
110 uchar face,
111 ::HandSlot handSlot,
112 ::Vec3 const& clickPos
113 ) const;
114
115
116 // NOLINTEND
117
118public:
119 // vftables
120 // NOLINTBEGIN
121 MCNAPI static void** $vftable();
122 // NOLINTEND
123};
Definition Actor.h:116
Definition RedactableString.h:10
Definition BlockPos.h:14
Definition BlockSource.h:72
Definition CompoundTag.h:18
Definition Container.h:36
Definition InteractionResult.h:5
Definition ItemDescriptor.h:24
Definition ItemStackBase.h:45
Definition ItemStack.h:26
Definition Level.h:255
Definition Player.h:131
Definition PotionItem.h:29
MCAPI::std::string $buildEffectDescriptionName(::ItemStackBase const &stack, bool) const
MCAPI::PotionType $getPotionType() const
MCAPI::ResolvedItemIconInfo $getIconInfo(::ItemStackBase const &item, int, bool) const
MCAPI::std::string $buildDescriptionId(::ItemDescriptor const &itemDescriptor, ::CompoundTag const *) const
MCAPI bool $isDestructive(int auxValue) const
MCAPI::ItemUseMethod $useTimeDepleted(::ItemStack &instance, ::Level *level, ::Player *player) const
MCAPI bool $dispense(::BlockSource &region, ::Container &container, int slot, ::Vec3 const &pos, uchar face) const
MCAPI::ItemStack & $use(::ItemStack &instance, ::Player &player, ::HandSlot handSlot) const
static MCAPI void ** $vftable()
MCAPI bool $isValidAuxValue(int auxValue) const
MCAPI bool $uniqueAuxValues() const
MCAPI::InteractionResult $_useOn(::ItemStack &instance, ::Actor &entity, ::BlockPos pos, uchar face, ::HandSlot handSlot, ::Vec3 const &clickPos) const
MCAPI::Item & $setIconInfo(::std::string const &name, int id)
Definition Vec3.h:10
Definition ResolvedItemIconInfo.h:8