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/item/ItemStack.h"
7#include "mc/world/level/block/actor/DecoratedPotAnimation.h"
8#include "mc/world/level/block/actor/RandomizableBlockActorContainer.h"
9
10// auto generated forward declare list
11// clang-format off
12class BlockActorDataPacket;
13class BlockPos;
14class BlockSource;
15class CompoundTag;
16class DataLoadHelper;
17class ILevel;
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 // prevent constructor by default
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 // vIndex: 1
52 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
53
54 // vIndex: 2
55 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
56
57 // vIndex: 9
58 virtual void tick(::BlockSource& region) /*override*/;
59
60 // vIndex: 2
61 virtual void serverInitItemStackIds(
62 int containerSlot,
63 int,
64 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
65 ) /*override*/;
66
67 // vIndex: 20
68 virtual int getContainerSize() const /*override*/;
69
70 // vIndex: 21
71 virtual int getMaxStackSize() const /*override*/;
72
73 // vIndex: 7
74 virtual ::ItemStack const& getItem(int) const /*override*/;
75
76 // vIndex: 12
77 virtual void setItem(int modelSlot, ::ItemStack const& item) /*override*/;
78
79 // vIndex: 41
80 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
81
82 // vIndex: 42
83 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
84
85 // vIndex: 0
86 virtual ~DecoratedPotBlockActor() /*override*/ = default;
87 // NOLINTEND
88
89public:
90 // member functions
91 // NOLINTBEGIN
92 MCAPI explicit DecoratedPotBlockActor(::BlockPos const& pos);
93
94 MCAPI void _onInsertFailFeedback(::BlockSource& region, ::Player& player);
95
96 MCAPI void _onInsertFeedback(::BlockSource& region, ::ItemStack const& newContainedItem, ::Player& player);
97
98 MCAPI void _resetSherdItemNames();
99
100 MCAPI void _setContainedItem(::ItemStack const& item);
101
102 MCAPI void tryAddItem(::Player& player);
103 // NOLINTEND
104
105public:
106 // static functions
107 // NOLINTBEGIN
108 MCAPI static ::std::optional<::std::array<::std::string, 4>> _tryGetSherdsFromItem(::ItemStackBase const& item);
109
110 MCAPI static void
111 saveSherdsToTag(::CompoundTag& tag, ::std::array<::std::string, 4> const& sherds, bool forceSaveDefaultSherds);
112
113 MCAPI static ::DecoratedPotBlockActor* tryGet(::BlockSource& region, ::BlockPos const& pos);
114
115 MCAPI static ::std::optional<::std::array<::std::string, 4>> tryGetSherdsFromTag(::CompoundTag const& tag);
116 // NOLINTEND
117
118public:
119 // static variables
120 // NOLINTBEGIN
121 MCAPI static ::std::array<::std::string, 4> const& DEFAULT_SHERD_LIST();
122 // NOLINTEND
123
124public:
125 // constructor thunks
126 // NOLINTBEGIN
127 MCAPI void* $ctor(::BlockPos const& pos);
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 MCFOLD ::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 MCNAPI static void** $vftableForContainer();
159
161 // NOLINTEND
162};
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition DecoratedPotBlockActor.h:23
static MCAPI void ** $vftableForRandomizableBlockActorContainerBase()
static MCAPI void ** $vftableForContainer()
Definition ILevel.h:207
Definition ItemStackBase.h:34
Definition ItemStack.h:23
Definition Player.h:123
Definition RandomizableBlockActorContainer.h:16
Definition SaveContext.h:5