LeviLamina
Loading...
Searching...
No Matches
JukeboxBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
7#include "mc/world/item/ItemStack.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 Level;
21class SaveContext;
22// clang-format on
23
24class JukeboxBlockActor : public ::RandomizableBlockActorContainer {
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 152, ::ItemStack> mRecord;
29 ::ll::TypedStorage<4, 4, int> mCount;
30 ::ll::TypedStorage<1, 1, bool> mRecordingFinished;
31 ::ll::TypedStorage<4, 4, int> mTicksPlaying;
32 ::ll::TypedStorage<1, 1, bool> mPostBlockChangeGameEvent;
33 // NOLINTEND
34
35public:
36 // prevent constructor by default
37 JukeboxBlockActor();
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
43
44 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
45
46 virtual void tick(::BlockSource& region) /*override*/;
47
48 virtual int getContainerSize() const /*override*/;
49
50 virtual int getMaxStackSize() const /*override*/;
51
52 virtual bool canPushInItem(int, int, ::ItemStack const& item) const /*override*/;
53
54 virtual bool canPullOutItem(int, int, ::ItemStack const&) const /*override*/;
55
56 virtual ::ItemStack const& getItem(int index) const /*override*/;
57
58 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
59
60 virtual void startOpen(::Actor&) /*override*/;
61
62 virtual void stopOpen(::Actor& actor) /*override*/;
63
64 virtual ::Container* getContainer() /*override*/;
65
66 virtual ::Container const* getContainer() const /*override*/;
67
68 virtual void onChanged(::BlockSource& region) /*override*/;
69
70 virtual void serverInitItemStackIds(
71 int containerSlot,
72 int,
73 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
74 ) /*override*/;
75
76 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
77
78 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
79
80 virtual ~JukeboxBlockActor() /*override*/ = default;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCAPI explicit JukeboxBlockActor(::BlockPos const& pos);
87
88 MCAPI void _onChanged(::BlockSource& region, ::SharedTypes::Legacy::LevelSoundEvent sound);
89
90 MCAPI void _spawnMusicParticles(::Level& level, float recordDuration);
91
92 MCAPI void setRecord(::ItemStack const& record, bool startPlaying);
93
94 MCAPI void startPlayingRecord(::BlockSource& region);
95
96 MCAPI void stopPlayingRecord(::BlockSource& region);
97 // NOLINTEND
98
99public:
100 // constructor thunks
101 // NOLINTBEGIN
102 MCAPI void* $ctor(::BlockPos const& pos);
103 // NOLINTEND
104
105public:
106 // virtual function thunks
107 // NOLINTBEGIN
108 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
109
110 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
111
112 MCAPI void $tick(::BlockSource& region);
113
114 MCFOLD int $getContainerSize() const;
115
116 MCFOLD int $getMaxStackSize() const;
117
118 MCAPI bool $canPushInItem(int, int, ::ItemStack const& item) const;
119
120 MCAPI bool $canPullOutItem(int, int, ::ItemStack const&) const;
121
122 MCAPI ::ItemStack const& $getItem(int index) const;
123
124 MCAPI void $setItem(int modelSlot, ::ItemStack const& item);
125
126 MCFOLD void $startOpen(::Actor&);
127
128 MCFOLD void $stopOpen(::Actor& actor);
129
130 MCFOLD ::Container* $getContainer();
131
132 MCFOLD ::Container const* $getContainer() const;
133
134 MCAPI void $onChanged(::BlockSource& region);
135
136 MCAPI void
137 $serverInitItemStackIds(int containerSlot, int, ::std::function<void(int, ::ItemStack const&)> onNetIdChanged);
138
139 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
140
141 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
142
143
144 // NOLINTEND
145
146public:
147 // vftables
148 // NOLINTBEGIN
149 MCAPI static void** $vftableForContainer();
150
151 MCAPI static void** $vftableForRandomizableBlockActorContainerBase();
152 // NOLINTEND
153};
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 Level.h:249
Definition RandomizableBlockActorContainer.h:16
Definition SaveContext.h:5