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 Random;
21class SaveContext;
22// clang-format on
23
24class DispenserBlockActor : public ::RandomizableBlockActorContainer {
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 1368, ::ItemStack[9]> mItems;
29 // NOLINTEND
30
31public:
32 // prevent constructor by default
33 DispenserBlockActor();
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual int getContainerSize() const /*override*/;
39
40 virtual ::Container* getContainer() /*override*/;
41
42 virtual ::Container const* getContainer() const /*override*/;
43
44 virtual ::ItemStack const& getItem(int index) const /*override*/;
45
46 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
47
48 virtual int getMaxStackSize() const /*override*/;
49
50 virtual ::std::string getName() const /*override*/;
51
52 virtual void startOpen(::Actor& actor) /*override*/;
53
54 virtual void stopOpen(::Actor& actor) /*override*/;
55
56 virtual void load(::ILevel& level, ::CompoundTag const& base, ::DataLoadHelper& dataLoadHelper) /*override*/;
57
58 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
59
60 virtual void onMove() /*override*/;
61
62 virtual void serverInitItemStackIds(
63 int containerSlot,
64 int count,
65 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
66 ) /*override*/;
67
68 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource& region) /*override*/;
69
70 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
71
72 virtual ~DispenserBlockActor() /*override*/ = default;
73 // NOLINTEND
74
75public:
76 // member functions
77 // NOLINTBEGIN
78 MCAPI explicit DispenserBlockActor(::BlockPos pos);
79
80 MCAPI DispenserBlockActor(::BlockPos pos, ::BlockActorType type);
81
82 MCAPI int getRandomSlot(::Random& random);
83 // NOLINTEND
84
85public:
86 // constructor thunks
87 // NOLINTBEGIN
88 MCAPI void* $ctor(::BlockPos pos);
89
90 MCAPI void* $ctor(::BlockPos pos, ::BlockActorType type);
91 // NOLINTEND
92
93public:
94 // virtual function thunks
95 // NOLINTBEGIN
96 MCFOLD int $getContainerSize() const;
97
98 MCFOLD ::Container* $getContainer();
99
100 MCFOLD ::Container const* $getContainer() const;
101
102 MCAPI ::ItemStack const& $getItem(int index) const;
103
104 MCAPI void $setItem(int modelSlot, ::ItemStack const& item);
105
106 MCFOLD int $getMaxStackSize() const;
107
108 MCAPI ::std::string $getName() const;
109
110 MCFOLD void $startOpen(::Actor& actor);
111
112 MCFOLD void $stopOpen(::Actor& actor);
113
114 MCAPI void $load(::ILevel& level, ::CompoundTag const& base, ::DataLoadHelper& dataLoadHelper);
115
116 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
117
118 MCFOLD void $onMove();
119
120 MCAPI void $serverInitItemStackIds(
121 int containerSlot,
122 int count,
123 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
124 );
125
126 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource& region);
127
128 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
129
130
131 // NOLINTEND
132
133public:
134 // vftables
135 // NOLINTBEGIN
136 MCAPI static void** $vftableForContainer();
137
138 MCAPI static void** $vftableForRandomizableBlockActorContainerBase();
139 // NOLINTEND
140};
Definition Actor.h:105
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition CompoundTag.h:23
Definition Container.h:33
Definition DataLoadHelper.h:20
Definition ILevel.h:214
Definition ItemStack.h:26
Definition Random.h:10
Definition RandomizableBlockActorContainer.h:16
Definition SaveContext.h:5