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/deps/core/string/HashedString.h"
7#include "mc/deps/ecs/WeakEntityRef.h"
8#include "mc/world/actor/ai/util/ExpiringTick.h"
9#include "mc/world/level/block/actor/RandomizableBlockActorContainer.h"
10
11// auto generated forward declare list
12// clang-format off
14class BlockPos;
15class BlockSource;
16class CompoundTag;
17class DataLoadHelper;
18class ILevel;
19class ItemStack;
20class Player;
21class SaveContext;
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 // prevent constructor by default
58
59public:
60 // virtual functions
61 // NOLINTBEGIN
62 // vIndex: 0
63 virtual ~BrushableBlockActor() /*override*/;
64
65 // vIndex: 2
66 virtual void serverInitItemStackIds(
67 int containerSlot,
68 int count,
69 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
70 ) /*override*/;
71
72 // vIndex: 20
73 virtual int getContainerSize() const /*override*/;
74
75 // vIndex: 21
76 virtual int getMaxStackSize() const /*override*/;
77
78 // vIndex: 7
79 virtual ::ItemStack const& getItem(int slot) const /*override*/;
80
81 // vIndex: 12
82 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
83
84 // vIndex: 23
85 virtual void stopOpen(::Player& player) /*override*/;
86
87 // vIndex: 9
88 virtual void onChanged(::BlockSource& region) /*override*/;
89
90 // vIndex: 14
91 virtual void onRemoved(::BlockSource& region) /*override*/;
92
93 // vIndex: 1
94 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
95
96 // vIndex: 2
97 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
98
99 // vIndex: 44
100 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
101
102 // vIndex: 45
103 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
104 // NOLINTEND
105
106public:
107 // member functions
108 // NOLINTBEGIN
109 MCNAPI
110 BrushableBlockActor(::HashedString const& name, ::BlockPos const& pos, ::BrushableBlockActor::Placement placement);
111
112 MCNAPI void _brushingCompleted(::BlockSource& region);
113
115
116 MCNAPI ::BrushableBlockActor::BrushingState brush(::BlockSource& region, ::BlockPos const& pos, uchar face);
117
118 MCNAPI void update(::BlockSource& region, ::BlockPos const& pos);
119 // NOLINTEND
120
121public:
122 // static functions
123 // NOLINTBEGIN
124 MCNAPI static ::std::string getLootTableFromVariant(::BrushableBlockActor::Placement state);
125 // NOLINTEND
126
127public:
128 // constructor thunks
129 // NOLINTBEGIN
130 MCNAPI void* $ctor(::HashedString const& name, ::BlockPos const& pos, ::BrushableBlockActor::Placement placement);
131 // NOLINTEND
132
133public:
134 // destructor thunk
135 // NOLINTBEGIN
136 MCNAPI void $dtor();
137 // NOLINTEND
138
139public:
140 // virtual function thunks
141 // NOLINTBEGIN
143 int containerSlot,
144 int count,
145 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
146 );
147
148 MCNAPI int $getContainerSize() const;
149
150 MCNAPI int $getMaxStackSize() const;
151
152 MCNAPI ::ItemStack const& $getItem(int slot) const;
153
154 MCNAPI void $setItem(int modelSlot, ::ItemStack const& item);
155
156 MCNAPI void $stopOpen(::Player& player);
157
158 MCNAPI void $onChanged(::BlockSource& region);
159
160 MCNAPI void $onRemoved(::BlockSource& region);
161
162 MCNAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
163
164 MCNAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
165
166 MCNAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
167
168 MCNAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
169 // NOLINTEND
170
171public:
172 // vftables
173 // NOLINTBEGIN
174 MCNAPI static void** $vftableForContainer();
175
177 // NOLINTEND
178};
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition BrushableBlockActor.h:24
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI::BrushableBlockActor::BrushingState brush(::BlockSource &region, ::BlockPos const &pos, uchar face)
MCAPI int $getMaxStackSize() const
MCAPI void $_onUpdatePacket(::CompoundTag const &data, ::BlockSource &region)
MCAPI void update(::BlockSource &region, ::BlockPos const &pos)
MCAPI void $dtor()
MCAPI void $stopOpen(::Player &player)
MCAPI ::std::unique_ptr<::BlockActorDataPacket > $_getUpdatePacket(::BlockSource &)
MCAPI void _removeDisplayEntity(::BlockSource &region)
MCAPI BrushableBlockActor(::HashedString const &name, ::BlockPos const &pos, ::BrushableBlockActor::Placement placement)
MCAPI void * $ctor(::HashedString const &name, ::BlockPos const &pos, ::BrushableBlockActor::Placement placement)
static MCAPI void ** $vftableForContainer()
MCAPI void $load(::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
static MCAPI void ** $vftableForRandomizableBlockActorContainerBase()
MCAPI::ItemStack const & $getItem(int slot) const
MCAPI void $setItem(int modelSlot, ::ItemStack const &item)
static MCAPI ::std::string getLootTableFromVariant(::BrushableBlockActor::Placement state)
MCAPI void $onChanged(::BlockSource &region)
MCAPI void _brushingCompleted(::BlockSource &region)
MCAPI int $getContainerSize() const
MCAPI void $onRemoved(::BlockSource &region)
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition HashedString.h:5
Definition ILevel.h:205
Definition ItemStack.h:25
Definition Player.h:119
Definition RandomizableBlockActorContainer.h:16
Definition SaveContext.h:5