LeviLamina
Loading...
Searching...
No Matches
BrushableBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/actor/RandomizableBlockActorContainer.h"
7
8// auto generated forward declare list
9// clang-format off
11class BlockPos;
12class BlockSource;
13class CompoundTag;
14class DataLoadHelper;
15class ExpiringTick;
16class HashedString;
17class ILevel;
18class ItemStack;
19class Player;
20class SaveContext;
21class WeakEntityRef;
22// clang-format on
23
25public:
26 // BrushableBlockActor inner types define
27 enum class BrushingState : int {
28 Ongoing = 0,
29 Completed = 1,
30 };
31
32 enum class Placement : int {
33 DesertWell = 0,
34 DesertPyramid = 1,
35 ColdOceanRuin = 2,
36 WarmOceanRuin = 3,
37 TrailRuinsCommon = 4,
38 TrailRuinsRare = 5,
39 Empty = 6,
40 };
41
42public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<8, 24, ::std::optional<::ExpiringTick>> mBrushReset;
46 ::ll::TypedStorage<8, 24, ::std::optional<::ExpiringTick>> mBrushCooldown;
47 ::ll::TypedStorage<8, 24, ::WeakEntityRef> mDisplayEntity;
48 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mItems;
49 ::ll::TypedStorage<8, 48, ::HashedString> mBlockId;
50 ::ll::TypedStorage<4, 4, uint> mBrushCount;
51 ::ll::TypedStorage<1, 1, uchar> mBrushDirection;
52 ::ll::TypedStorage<1, 1, bool> mLootTableUnpacked;
53 // NOLINTEND
54
55public:
56 // virtual functions
57 // NOLINTBEGIN
58 // vIndex: 0
59 virtual ~BrushableBlockActor() /*override*/;
60
61 // vIndex: 2
62 virtual void serverInitItemStackIds(
63 int containerSlot,
64 int count,
65 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
66 ) /*override*/;
67
68 // vIndex: 20
69 virtual int getContainerSize() const /*override*/;
70
71 // vIndex: 21
72 virtual int getMaxStackSize() const /*override*/;
73
74 // vIndex: 7
75 virtual ::ItemStack const& getItem(int slot) const /*override*/;
76
77 // vIndex: 12
78 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
79
80 // vIndex: 23
81 virtual void stopOpen(::Player& player) /*override*/;
82
83 // vIndex: 8
84 virtual void onChanged(::BlockSource& region) /*override*/;
85
86 // vIndex: 13
87 virtual void onRemoved(::BlockSource& region) /*override*/;
88
89 // vIndex: 1
90 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
91
92 // vIndex: 2
93 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
94
95 // vIndex: 43
96 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
97
98 // vIndex: 44
99 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
100 // NOLINTEND
101
102public:
103 // member functions
104 // NOLINTBEGIN
105 MCAPI
106 BrushableBlockActor(::HashedString const& name, ::BlockPos const& pos, ::BrushableBlockActor::Placement placement);
107
108 MCAPI void _brushingCompleted(::BlockSource& region);
109
110 MCAPI void _removeDisplayEntity(::BlockSource& region);
111
112 MCAPI ::BrushableBlockActor::BrushingState brush(::BlockSource& region, ::BlockPos const& pos, uchar face);
113
114 MCAPI void update(::BlockSource& region, ::BlockPos const& pos);
115 // NOLINTEND
116
117public:
118 // static functions
119 // NOLINTBEGIN
120 MCAPI static ::std::string getLootTableFromVariant(::BrushableBlockActor::Placement state);
121 // NOLINTEND
122
123public:
124 // constructor thunks
125 // NOLINTBEGIN
126 MCAPI void* $ctor(::HashedString const& name, ::BlockPos const& pos, ::BrushableBlockActor::Placement placement);
127 // NOLINTEND
128
129public:
130 // destructor thunk
131 // NOLINTBEGIN
132 MCAPI void $dtor();
133 // NOLINTEND
134
135public:
136 // virtual function thunks
137 // NOLINTBEGIN
138 MCAPI void $serverInitItemStackIds(
139 int containerSlot,
140 int count,
141 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
142 );
143
144 MCFOLD int $getContainerSize() const;
145
146 MCFOLD int $getMaxStackSize() const;
147
148 MCAPI ::ItemStack const& $getItem(int slot) const;
149
150 MCAPI void $setItem(int slot, ::ItemStack const& item);
151
152 MCFOLD void $stopOpen(::Player& player);
153
154 MCAPI void $onChanged(::BlockSource& region);
155
156 MCAPI void $onRemoved(::BlockSource& region);
157
158 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
159
160 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
161
162 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
163
164 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
165 // NOLINTEND
166
167public:
168 // vftables
169 // NOLINTBEGIN
170 MCAPI static void** $vftableForContainer();
171
172 MCAPI static void** $vftableForRandomizableBlockActorContainerBase();
173 // NOLINTEND
174};
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition BrushableBlockActor.h:24
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition ExpiringTick.h:5
Definition HashedString.h:5
Definition ILevel.h:203
Definition ItemStack.h:25
Definition Player.h:119
Definition RandomizableBlockActorContainer.h:16
Definition SaveContext.h:5
Definition WeakEntityRef.h:14