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/world/item/ItemStack.h"
7#include "mc/world/level/ServerSoundInstance.h"
8#include "mc/world/level/block/actor/RandomizableBlockActorContainer.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
14class BlockSource;
15class CompoundTag;
16class Container;
17class DataLoadHelper;
18class ILevel;
20class SaveContext;
21// clang-format on
22
23class JukeboxBlockActor : public ::RandomizableBlockActorContainer {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 152, ::ItemStack> mRecord;
28 ::ll::TypedStorage<4, 4, int> mCount;
29 ::ll::TypedStorage<1, 1, bool> mRecordingFinished;
30 ::ll::TypedStorage<4, 4, int> mTicksPlaying;
31 ::ll::TypedStorage<1, 1, bool> mPostBlockChangeGameEvent;
32 ::ll::TypedStorage<8, 304, ::std::optional<::ServerSoundInstance>> mServerSoundInstance;
33 // NOLINTEND
34
35public:
36 // virtual functions
37 // NOLINTBEGIN
38 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
39
40 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
41
42 virtual void tick(::BlockSource& region) /*override*/;
43
44 virtual int getContainerSize() const /*override*/;
45
46 virtual int getMaxStackSize() const /*override*/;
47
48 virtual bool canPushInItem(int, int, ::ItemStack const& item) const /*override*/;
49
50 virtual bool canPullOutItem(int, int, ::ItemStack const&) const /*override*/;
51
52 virtual ::ItemStack const& getItem(int) const /*override*/;
53
54 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
55
56 virtual void startOpen(::Actor& actor) /*override*/;
57
58 virtual void stopOpen(::Actor& actor) /*override*/;
59
60 virtual ::Container* getContainer() /*override*/;
61
62 virtual ::Container const* getContainer() const /*override*/;
63
64 virtual void onChanged(::BlockSource& region) /*override*/;
65
66 virtual void serverInitItemStackIds(
67 int containerSlot,
68 int,
69 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
70 ) /*override*/;
71
72 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
73
74 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
75 // NOLINTEND
76
77public:
78 // member functions
79 // NOLINTBEGIN
80 MCAPI void _startRecordSound(::BlockSource& region, ::RecordItemComponent const& record);
81
82 MCAPI void setRecord(::ItemStack const& record, bool startPlaying);
83
84 MCAPI void startPlayingRecord(::BlockSource& region);
85
86 MCAPI void stopPlayingRecord(::BlockSource& region);
87 // NOLINTEND
88
89public:
90 // virtual function thunks
91 // NOLINTBEGIN
92 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
93
94 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
95
96 MCAPI void $tick(::BlockSource& region);
97
98 MCFOLD int $getContainerSize() const;
99
100 MCFOLD int $getMaxStackSize() const;
101
102 MCAPI bool $canPushInItem(int, int, ::ItemStack const& item) const;
103
104 MCAPI bool $canPullOutItem(int, int, ::ItemStack const&) const;
105
106#ifdef LL_PLAT_S
107 MCFOLD ::ItemStack const& $getItem(int) const;
108#else // LL_PLAT_C
109 MCAPI ::ItemStack const& $getItem(int) const;
110#endif
111
112 MCAPI void $setItem(int slot, ::ItemStack const& item);
113
114 MCFOLD void $startOpen(::Actor& actor);
115
116 MCFOLD void $stopOpen(::Actor& actor);
117
118 MCFOLD ::Container* $getContainer();
119
120 MCFOLD ::Container const* $getContainer() const;
121
122 MCAPI void $onChanged(::BlockSource& region);
123
124 MCAPI void
125 $serverInitItemStackIds(int containerSlot, int, ::std::function<void(int, ::ItemStack const&)> onNetIdChanged);
126
127 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
128
129 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
130
131
132 // NOLINTEND
133
134public:
135 // vftables
136 // NOLINTBEGIN
138
139 MCNAPI static void** $vftable();
140
142
143 MCNAPI static void** $vftableForBlockActor();
144
146 // NOLINTEND
147};
Definition Actor.h:113
Definition BlockActorDataPacket.h:19
Definition BlockSource.h:71
Definition CompoundTag.h:18
Definition Container.h:35
Definition DataLoadHelper.h:20
Definition ILevel.h:221
Definition ItemStack.h:26
Definition JukeboxBlockActor.h:23
static MCAPI void ** $vftableForBlockActor()
static MCAPI void ** $vftableForIVanillaTickBlockActorComponent()
static MCAPI void ** $vftableForIVanillaMainBlockActorComponent()
static MCAPI void ** $vftable()
static MCAPI void ** $vftableForIVanillaRenderBlockActorComponent()
Definition RecordItemComponent.h:19
Definition SaveContext.h:5