LeviLamina
Loading...
Searching...
No Matches
DecoratedPotBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/actor/DecoratedPotAnimation.h"
7#include "mc/world/level/block/actor/RandomizableBlockActorContainer.h"
8
9// auto generated forward declare list
10// clang-format off
12class BlockPos;
13class BlockSource;
14class CompoundTag;
15class DataLoadHelper;
16class ILevel;
17class ItemStack;
18class ItemStackBase;
19class Player;
20class SaveContext;
21// clang-format on
22
24public:
25 // DecoratedPotBlockActor inner types define
26 using SherdList = ::std::array<::std::string, 4>;
27
28 enum class PotFace : uint64 {
29 Back = 0,
30 Left = 1,
31 Right = 2,
32 Front = 3,
33 };
34
35public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 128, ::std::array<::std::string, 4>> mSherdItemNames;
39 ::ll::TypedStorage<8, 152, ::ItemStack> mContainedItem;
40 ::ll::TypedStorage<1, 1, ::DecoratedPotAnimation> mAnimation;
41 ::ll::TypedStorage<4, 4, int> mAnimationTick;
42 // NOLINTEND
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 // vIndex: 1
48 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
49
50 // vIndex: 2
51 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
52
53 // vIndex: 7
54 virtual void tick(::BlockSource& region) /*override*/;
55
56 // vIndex: 2
57 virtual void serverInitItemStackIds(
58 int containerSlot,
59 int,
60 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
61 ) /*override*/;
62
63 // vIndex: 20
64 virtual int getContainerSize() const /*override*/;
65
66 // vIndex: 21
67 virtual int getMaxStackSize() const /*override*/;
68
69 // vIndex: 7
70 virtual ::ItemStack const& getItem(int) const /*override*/;
71
72 // vIndex: 12
73 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
74
75 // vIndex: 43
76 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
77
78 // vIndex: 44
79 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
80
81 // vIndex: 0
82 virtual ~DecoratedPotBlockActor() /*override*/ = default;
83 // NOLINTEND
84
85public:
86 // member functions
87 // NOLINTBEGIN
88 MCAPI explicit DecoratedPotBlockActor(::BlockPos const& pos);
89
90 MCAPI void _onInsertFailFeedback(::BlockSource& region, ::Player& player);
91
92 MCAPI void _onInsertFeedback(::BlockSource& region, ::ItemStack const& newContainedItem, ::Player& player);
93
94 MCAPI void _setContainedItem(::ItemStack const& item);
95
96 MCAPI void tryAddItem(::Player& player);
97 // NOLINTEND
98
99public:
100 // static functions
101 // NOLINTBEGIN
102 MCAPI static ::std::optional<::std::array<::std::string, 4>> _tryGetSherdsFromItem(::ItemStackBase const& item);
103
104 MCAPI static void removeDefaultSherdsFromUserData(::ItemStackBase& itemInstance);
105
106 MCAPI static void
107 saveSherdsToTag(::CompoundTag& tag, ::std::array<::std::string, 4> const& sherds, bool forceSaveDefaultSherds);
108
109 MCAPI static ::std::optional<::std::array<::std::string, 4>> tryGetSherdsFromTag(::CompoundTag const& tag);
110 // NOLINTEND
111
112public:
113 // static variables
114 // NOLINTBEGIN
115 MCAPI static ::std::array<::std::string, 4> const& DEFAULT_SHERD_LIST();
116 // NOLINTEND
117
118public:
119 // constructor thunks
120 // NOLINTBEGIN
121 MCAPI void* $ctor(::BlockPos const& pos);
122 // NOLINTEND
123
124public:
125 // destructor thunk
126 // NOLINTBEGIN
127
128 // NOLINTEND
129
130public:
131 // virtual function thunks
132 // NOLINTBEGIN
133 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
134
135 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
136
137 MCAPI void $tick(::BlockSource& region);
138
139 MCAPI void
140 $serverInitItemStackIds(int containerSlot, int, ::std::function<void(int, ::ItemStack const&)> onNetIdChanged);
141
142 MCFOLD int $getContainerSize() const;
143
144 MCFOLD int $getMaxStackSize() const;
145
146 MCAPI ::ItemStack const& $getItem(int) const;
147
148 MCAPI void $setItem(int modelSlot, ::ItemStack const& item);
149
150 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
151
152 MCFOLD void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
153 // NOLINTEND
154
155public:
156 // vftables
157 // NOLINTBEGIN
158 MCAPI static void** $vftableForContainer();
159
160 MCAPI static void** $vftableForRandomizableBlockActorContainerBase();
161 // NOLINTEND
162};
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition DecoratedPotBlockActor.h:23
Definition ILevel.h:203
Definition ItemStackBase.h:35
Definition ItemStack.h:25
Definition Player.h:119
Definition RandomizableBlockActorContainer.h:16
Definition SaveContext.h:5