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