LeviLamina
Loading...
Searching...
No Matches
ItemContext.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/ecs/WeakEntityRef.h"
7#include "mc/deps/shared_types/legacy/item/EquipmentSlot.h"
8#include "mc/world/item/ItemContextType.h"
9#include "mc/world/item/ItemLockMode.h"
10#include "mc/world/item/ItemStack.h"
11#include "mc/world/level/BlockPos.h"
12
13// auto generated forward declare list
14// clang-format off
15class BlockSource;
16class Container;
17class Mob;
18class Vec3;
19struct ItemTag;
20// clang-format on
21
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<4, 4, ::ItemContextType> mItemContextType;
27 ::ll::TypedStorage<8, 8, ::Container*> mContainer;
28 ::ll::TypedStorage<4, 4, int> mSlot;
29 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::EquipmentSlot> mEquipmentSlot;
30 ::ll::TypedStorage<8, 8, ::BlockSource*> mBlockSource;
31 ::ll::TypedStorage<4, 12, ::BlockPos> mBlockPos;
32 ::ll::TypedStorage<8, 24, ::WeakEntityRef> mEntityRef;
33 ::ll::TypedStorage<8, 160, ::std::optional<::ItemStack>> mItemStackContainer;
34 // NOLINTEND
35
36public:
37 // prevent constructor by default
38 ItemContext& operator=(ItemContext const&);
41
42public:
43 // member functions
44 // NOLINTBEGIN
46
47 MCAPI ::ItemStack const& _getItem() const;
48
49 MCAPI void _setItem(::ItemStack const& item);
50
51 MCAPI ::Container* _tryGetChestContainer() const;
52
53 MCAPI ::Container* _tryGetContainerFromEntity() const;
54
55 MCAPI ::Container* _tryGetContainerFromItem() const;
56
57 MCAPI bool clearAllDynamicProperties(::std::string const& collection);
58
59 MCAPI ::std::optional<int> getAmount() const;
60
61 MCAPI ::std::optional<::std::vector<::std::string>> getCanDestroy() const;
62
63 MCAPI ::std::optional<::std::vector<::std::string>> getCanPlaceOn() const;
64
65 MCAPI ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>>
66 getDynamicProperty(::std::string const& collection, ::std::string const& key) const;
67
68 MCAPI ::std::optional<::std::vector<::std::string>> getDynamicPropertyIds(::std::string const& collection) const;
69
70 MCAPI ::std::optional<uint64> getDynamicPropertyTotalByteCount(::std::string const& collection) const;
71
72 MCAPI ::std::optional<::std::string> getId() const;
73
74 MCAPI ::std::optional<::ItemStack> getItem() const;
75
76 MCAPI ::std::optional<::std::vector<::std::string>> getLore() const;
77
78 MCAPI ::std::optional<::std::string> getNameTag() const;
79
80 MCAPI ::std::optional<::std::vector<::ItemTag>> getTags() const;
81
82 MCAPI ::std::optional<bool> hasTag(::ItemTag const& tag) const;
83
84 MCAPI ::std::optional<bool> isStackable() const;
85
86 MCAPI bool setAmount(int amount);
87
88 MCAPI ::std::optional<bool> setCanDestroy(::std::vector<::std::string> const& blockIdentifiers);
89
90 MCAPI ::std::optional<bool> setCanPlaceOn(::std::vector<::std::string> const& blockIdentifiers);
91
92 MCAPI bool setDynamicProperty(
93 ::std::string const& collection,
94 ::std::string const& key,
95 ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>> const& optionalValue
96 );
97
98 MCAPI bool setKeepOnDeath(bool value);
99
100 MCAPI bool setLockMode(::ItemLockMode lockMode);
101
102 MCAPI bool setLore(::std::optional<::std::vector<::std::string>> const& loreList);
103
104 MCAPI bool setNameTag(::std::optional<::std::string> nameTag);
105
106 MCAPI ~ItemContext();
107 // NOLINTEND
108
109public:
110 // static functions
111 // NOLINTBEGIN
112 MCAPI static bool
113 setEquipment(::ItemStack const& item, ::SharedTypes::Legacy::EquipmentSlot equipmentSlot, ::Mob& mob);
114 // NOLINTEND
115
116public:
117 // constructor thunks
118 // NOLINTBEGIN
119 MCAPI void* $ctor(::ItemContext&&);
120 // NOLINTEND
121
122public:
123 // destructor thunk
124 // NOLINTBEGIN
125 MCAPI void $dtor();
126 // NOLINTEND
127};
Definition BlockSource.h:66
Definition Container.h:31
Definition ItemContext.h:22
Definition ItemStack.h:23
Definition Mob.h:47
Definition Vec3.h:10
Definition ItemTag.h:8