Skip to content
LeviMC
English
AutoLightDark
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/core/utility/pub_sub/Subscription.h"
7#include "mc/world/item/ItemStack.h"
8#include "mc/world/level/ServerSoundInstance.h"
9#include "mc/world/level/block/actor/RandomizableBlockActorContainer.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
15class BlockSource;
16class CompoundTag;
17class Container;
18class DataLoadHelper;
19class ILevel;
20class 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 ::ll::TypedStorage<8, 296, ::std::optional<::ServerSoundInstance>> mServerSoundInstance;
34 ::ll::TypedStorage<8, 16, ::Bedrock::PubSub::Subscription> mOnChunkDiscardedSubscription;
35 // NOLINTEND
36
37public:
38 // virtual functions
39 // NOLINTBEGIN
40 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
41
42 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
43
44 virtual void tick(::BlockSource& region) /*override*/;
45
46 virtual int getContainerSize() const /*override*/;
47
48 virtual int getMaxStackSize() const /*override*/;
49
50 virtual bool canPushInItem(int, int, ::ItemStack const& item) const /*override*/;
51
52 virtual bool canPullOutItem(int, int, ::ItemStack const&) const /*override*/;
53
54 virtual ::ItemStack const& getItem(int) const /*override*/;
55
56 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
57
58 virtual void startOpen(::Actor& actor) /*override*/;
59
60 virtual void stopOpen(::Actor& actor) /*override*/;
61
62 virtual ::Container* getContainer() /*override*/;
63
64 virtual ::Container const* getContainer() const /*override*/;
65
66 virtual void onChanged(::BlockSource& region) /*override*/;
67
68 virtual void serverInitItemStackIds(
69 int containerSlot,
70 int,
71 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
72 ) /*override*/;
73
74 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
75
76 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
77 // NOLINTEND
78
79public:
80 // member functions
81 // NOLINTBEGIN
82 MCAPI void _startRecordSound(::BlockSource& region, ::MusicDiscPlaybackInfo const& playback);
83
84 MCAPI void setRecord(::ItemStack const& record, bool startPlaying);
85
86 MCAPI void startPlayingRecord(::BlockSource& region);
87
88 MCAPI void stopPlayingRecord(::BlockSource& region);
89 // NOLINTEND
90
91public:
92 // virtual function thunks
93 // NOLINTBEGIN
94 MCNAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
95
96 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
97
98 MCNAPI void $tick(::BlockSource& region);
99
100 MCNAPI int $getContainerSize() const;
101
102 MCNAPI int $getMaxStackSize() const;
103
104 MCNAPI bool $canPushInItem(int, int, ::ItemStack const& item) const;
105
106 MCNAPI bool $canPullOutItem(int, int, ::ItemStack const&) const;
107
108 MCNAPI ::ItemStack const& $getItem(int) const;
109
110 MCNAPI void $setItem(int slot, ::ItemStack const& item);
111
112 MCNAPI void $startOpen(::Actor& actor);
113
114 MCNAPI void $stopOpen(::Actor& actor);
115
116 MCNAPI ::Container* $getContainer();
117
118 MCNAPI ::Container const* $getContainer() const;
119
120 MCNAPI void $onChanged(::BlockSource& region);
121
122 MCNAPI void
123 $serverInitItemStackIds(int containerSlot, int, ::std::function<void(int, ::ItemStack const&)> onNetIdChanged);
124
125 MCNAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
126
127 MCNAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
128
129
130 // NOLINTEND
131
132public:
133 // vftables
134 // NOLINTBEGIN
136
137 MCNAPI static void** $vftable();
138
140
141 MCNAPI static void** $vftableForBlockActor();
142
144 // NOLINTEND
145};
Definition Actor.h:116
Definition BlockActorDataPacket.h:19
Definition BlockSource.h:72
Definition CompoundTag.h:18
Definition Container.h:36
Definition DataLoadHelper.h:20
Definition ILevel.h:223
Definition ItemStack.h:26
Definition JukeboxBlockActor.h:24
MCAPI void $startOpen(::Actor &actor)
MCAPI void $setItem(int slot, ::ItemStack const &item)
MCAPI void $tick(::BlockSource &region)
MCAPI ::std::unique_ptr<::BlockActorDataPacket > $_getUpdatePacket(::BlockSource &)
static MCAPI void ** $vftableForBlockActor()
static MCAPI void ** $vftableForIVanillaTickBlockActorComponent()
MCAPI void $serverInitItemStackIds(int containerSlot, int, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI void $stopOpen(::Actor &actor)
MCAPI void $onChanged(::BlockSource &region)
MCAPI bool $canPushInItem(int, int, ::ItemStack const &item) const
static MCAPI void ** $vftableForIVanillaMainBlockActorComponent()
static MCAPI void ** $vftable()
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
static MCAPI void ** $vftableForIVanillaRenderBlockActorComponent()
MCAPI bool $canPullOutItem(int, int, ::ItemStack const &) const
MCAPI int $getContainerSize() const
MCAPI int $getMaxStackSize() const
MCAPI::Container * $getContainer()
MCAPI void $_onUpdatePacket(::CompoundTag const &data, ::BlockSource &region)
MCAPI::ItemStack const & $getItem(int) const
MCAPI::Container const * $getContainer() const
Definition SaveContext.h:5
Definition MusicDiscPlaybackInfo.h:5