Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ChiseledBookshelfBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Container.h"
7#include "mc/world/level/block/actor/VanillaBlockActor.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
13class BlockPos;
14class BlockSource;
15class CompoundTag;
16class DataLoadHelper;
17class ILevel;
18class ItemStack;
19class SaveContext;
20// clang-format on
21
22class ChiseledBookshelfBlockActor : public ::VanillaBlockActor, public ::Container {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
27 ::ll::TypedStorage<4, 4, uint> mLastInteractedSlot;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 ChiseledBookshelfBlockActor();
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual ::ItemStack const& getItem(int slot) const /*override*/;
38
39 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
40
41 virtual ::std::string getName() const /*override*/;
42
43 virtual int getMaxStackSize() const /*override*/;
44
45 virtual int getContainerSize() const /*override*/;
46
47 virtual void startOpen(::Actor&) /*override*/;
48
49 virtual void stopOpen(::Actor& actor) /*override*/;
50
51 virtual ::Container* getContainer() /*override*/;
52
53 virtual ::Container const* getContainer() const /*override*/;
54
55 virtual void serverInitItemStackIds(
56 int containerSlot,
57 int count,
58 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
59 ) /*override*/;
60
61 virtual bool isEmpty() const /*override*/;
62
63 virtual bool canPushInItem(int slot, int, ::ItemStack const& item) const /*override*/;
64
65 virtual bool canPullOutItem(int slot, int, ::ItemStack const&) const /*override*/;
66
67 virtual bool addItemToFirstEmptySlot(::ItemStack const& item) /*override*/;
68
69 virtual void onChanged(::BlockSource& region) /*override*/;
70
71 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
72
73 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
74
75 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
76
77 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
78 // NOLINTEND
79
80public:
81 // member functions
82 // NOLINTBEGIN
83 MCNAPI explicit ChiseledBookshelfBlockActor(::BlockPos const& pos);
84
85 MCNAPI void _setItemInternal(int slot, ::ItemStack const& item, bool isLoading);
86 // NOLINTEND
87
88public:
89 // static functions
90 // NOLINTBEGIN
91 MCNAPI static bool allowedItem(::ItemStack const& item);
92 // NOLINTEND
93
94public:
95 // constructor thunks
96 // NOLINTBEGIN
97 MCNAPI void* $ctor(::BlockPos const& pos);
98 // NOLINTEND
99
100public:
101 // virtual function thunks
102 // NOLINTBEGIN
103 MCNAPI ::ItemStack const& $getItem(int slot) const;
104
105 MCNAPI void $setItem(int slot, ::ItemStack const& item);
106
107 MCNAPI ::std::string $getName() const;
108
109 MCNAPI int $getMaxStackSize() const;
110
111 MCNAPI int $getContainerSize() const;
112
113 MCNAPI void $startOpen(::Actor&);
114
115 MCNAPI void $stopOpen(::Actor& actor);
116
117 MCNAPI ::Container* $getContainer();
118
119 MCNAPI ::Container const* $getContainer() const;
120
122 int containerSlot,
123 int count,
124 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
125 );
126
127 MCNAPI bool $isEmpty() const;
128
129 MCNAPI bool $canPushInItem(int slot, int, ::ItemStack const& item) const;
130
131 MCNAPI bool $canPullOutItem(int slot, int, ::ItemStack const&) const;
132
133 MCNAPI bool $addItemToFirstEmptySlot(::ItemStack const& item);
134
135 MCNAPI void $onChanged(::BlockSource& region);
136
137 MCNAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
138
139 MCNAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
140
141 MCNAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
142
143 MCNAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
144
145
146 // NOLINTEND
147};
Definition Actor.h:116
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:14
Definition BlockSource.h:72
MCAPI::ItemStack const & $getItem(int slot) const
MCAPI ::std::unique_ptr<::BlockActorDataPacket > $_getUpdatePacket(::BlockSource &)
MCAPI bool $isEmpty() const
MCAPI::std::string $getName() const
MCAPI ChiseledBookshelfBlockActor(::BlockPos const &pos)
MCAPI void $setItem(int slot, ::ItemStack const &item)
MCAPI void $stopOpen(::Actor &actor)
MCAPI void $_onUpdatePacket(::CompoundTag const &data, ::BlockSource &region)
MCAPI bool $canPushInItem(int slot, int, ::ItemStack const &item) const
MCAPI int $getMaxStackSize() const
MCAPI::Container * $getContainer()
MCAPI void $onChanged(::BlockSource &region)
MCAPI void _setItemInternal(int slot, ::ItemStack const &item, bool isLoading)
MCAPI int $getContainerSize() const
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI void * $ctor(::BlockPos const &pos)
MCAPI void $startOpen(::Actor &)
MCAPI bool $addItemToFirstEmptySlot(::ItemStack const &item)
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
MCAPI bool $canPullOutItem(int slot, int, ::ItemStack const &) const
static MCAPI bool allowedItem(::ItemStack const &item)
MCAPI void $load(::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
MCAPI::Container const * $getContainer() const
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
Definition ILevel.h:223
Definition ItemStack.h:26
Definition SaveContext.h:5