LeviLamina
Loading...
Searching...
No Matches
ContainerComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/AutomaticID.h"
7#include "mc/deps/shared_types/legacy/ContainerType.h"
8#include "mc/world/ContainerCloseListener.h"
9#include "mc/world/ContainerContentChangeListener.h"
10#include "mc/world/inventory/FillingContainer.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class BlockSource;
16class CompoundTag;
17class DataLoadHelper;
18class Dimension;
20class ItemActor;
21class ItemStack;
22class Level;
23class Player;
24class Vec3;
26// clang-format on
27
29public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 440, ::FillingContainer> mContainer;
33 ::ll::TypedStorage<8, 8, ::Actor*> mListenerShim;
34 ::ll::TypedStorage<1, 1, bool> mCanBeSiphonedFrom;
35 ::ll::TypedStorage<1, 1, bool> mPrivate;
36 ::ll::TypedStorage<1, 1, bool> mRestrictToOwner;
37 ::ll::TypedStorage<8, 32, ::std::string> mLootTable;
38 ::ll::TypedStorage<4, 4, int> mLootTableSeed;
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
43 ContainerComponent& operator=(ContainerComponent const&);
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 // vIndex: 0
51 virtual void containerContentChanged(int iSlot) /*override*/;
52
53 // vIndex: 0
54 virtual void containerClosed(::Player& player) /*override*/;
55
56 // vIndex: 1
57 virtual ~ContainerComponent() /*override*/;
58 // NOLINTEND
59
60public:
61 // member functions
62 // NOLINTBEGIN
64
65 MCNAPI bool _tryMoveInItem(::ItemStack& item, int slot, int face, int itemCount);
66
67 MCNAPI void addAdditionalSaveData(::CompoundTag& tag) const;
68
69 MCNAPI bool addItem(::ItemActor& entity);
70
71 MCNAPI bool canOpenContainer(::Actor const& containerActor, ::Player& player) const;
72
73 MCNAPI int countItemsOfType(::ItemStack const& item) const;
74
75 MCNAPI void dropContents(::BlockSource& region, ::Vec3 const& pos, bool randomizeDrop);
76
77 MCNAPI void initFromDefinition(::Actor& actor, ::ContainerDescription const& desc);
78
79 MCNAPI bool isEmpty() const;
80
81 MCNAPI bool openContainer(::Actor& containerActor, ::Player& player);
82
83 MCNAPI ::ContainerComponent& operator=(::ContainerComponent&& other);
84
86
87 MCNAPI void rebuildContainer(
88 ::Actor& owner,
89 ::SharedTypes::Legacy::ContainerType type,
90 int size,
91 bool canBesiphonedFrom,
92 int,
93 bool isPrivate
94 );
95
96 MCNAPI void removeItemsOfType(::ItemStack const& item, int count);
97
98 MCNAPI void setCustomName(::std::string const& name);
99
100 MCNAPI bool setItem(int slot, ::ItemStack const& item);
101
102 MCNAPI void unpackLootTable(::Level& level, ::DimensionType dimensionId);
103 // NOLINTEND
104
105public:
106 // constructor thunks
107 // NOLINTBEGIN
108 MCNAPI void* $ctor(::ContainerComponent&& other);
109 // NOLINTEND
110
111public:
112 // destructor thunk
113 // NOLINTBEGIN
114 MCNAPI void $dtor();
115 // NOLINTEND
116
117public:
118 // virtual function thunks
119 // NOLINTBEGIN
120 MCNAPI void $containerContentChanged(int iSlot);
121
122 MCNAPI void $containerClosed(::Player& player);
123 // NOLINTEND
124
125public:
126 // vftables
127 // NOLINTBEGIN
129
130 MCNAPI static void** $vftableForContainerCloseListener();
131 // NOLINTEND
132};
Definition Actor.h:103
Definition AutomaticID.h:6
Definition BlockSource.h:67
Definition CompoundTag.h:13
Definition ContainerCloseListener.h:10
Definition ContainerComponent.h:28
MCAPI void readAdditionalSaveData(::Actor &, ::CompoundTag const &tag, ::DataLoadHelper &)
MCAPI ContainerComponent(::ContainerComponent &&other)
MCAPI void rebuildContainer(::Actor &owner, ::SharedTypes::Legacy::ContainerType type, int size, bool canBesiphonedFrom, int, bool isPrivate)
MCAPI void unpackLootTable(::Level &level, ::DimensionType dimensionId)
MCAPI void * $ctor(::ContainerComponent &&other)
MCAPI int countItemsOfType(::ItemStack const &item) const
MCAPI::ContainerComponent & operator=(::ContainerComponent &&other)
MCAPI void initFromDefinition(::Actor &actor, ::ContainerDescription const &desc)
MCAPI void addAdditionalSaveData(::CompoundTag &tag) const
MCAPI void $dtor()
MCAPI void $containerClosed(::Player &player)
MCAPI bool openContainer(::Actor &containerActor, ::Player &player)
MCAPI void $containerContentChanged(int iSlot)
MCAPI void setCustomName(::std::string const &name)
static MCAPI void ** $vftableForContainerContentChangeListener()
MCAPI bool _tryMoveInItem(::ItemStack &item, int slot, int face, int itemCount)
MCAPI bool addItem(::ItemActor &entity)
static MCAPI void ** $vftableForContainerCloseListener()
MCAPI bool setItem(int slot, ::ItemStack const &item)
MCAPI void dropContents(::BlockSource &region, ::Vec3 const &pos, bool randomizeDrop)
MCAPI bool canOpenContainer(::Actor const &containerActor, ::Player &player) const
MCAPI bool isEmpty() const
MCAPI void removeItemsOfType(::ItemStack const &item, int count)
Definition ContainerContentChangeListener.h:5
Definition DataLoadHelper.h:20
Definition Dimension.h:83
Definition FillingContainer.h:16
Definition ItemActor.h:27
Definition ItemStack.h:25
Definition Level.h:238
Definition Player.h:119
Definition Vec3.h:10
Definition ContainerDescription.h:14