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
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: 8
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: 44
80 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
81
82 // vIndex: 45
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 MCNAPI explicit DecoratedPotBlockActor(::BlockPos const& pos);
93
94 MCNAPI void _onInsertFailFeedback(::BlockSource& region, ::Player& player);
95
96 MCNAPI void _onInsertFeedback(::BlockSource& region, ::ItemStack const& newContainedItem, ::Player& player);
97
98 MCNAPI void _setContainedItem(::ItemStack const& item);
99
100 MCNAPI void tryAddItem(::Player& player);
101 // NOLINTEND
102
103public:
104 // static functions
105 // NOLINTBEGIN
106 MCNAPI static ::std::optional<::std::array<::std::string, 4>> _tryGetSherdsFromItem(::ItemStackBase const& item);
107
108 MCNAPI static void removeDefaultSherdsFromUserData(::ItemStackBase& itemInstance);
109
110 MCNAPI static void
111 saveSherdsToTag(::CompoundTag& tag, ::std::array<::std::string, 4> const& sherds, bool forceSaveDefaultSherds);
112
113 MCNAPI static ::std::optional<::std::array<::std::string, 4>> tryGetSherdsFromTag(::CompoundTag const& tag);
114 // NOLINTEND
115
116public:
117 // static variables
118 // NOLINTBEGIN
119 MCNAPI static ::std::array<::std::string, 4> const& DEFAULT_SHERD_LIST();
120 // NOLINTEND
121
122public:
123 // constructor thunks
124 // NOLINTBEGIN
125 MCNAPI void* $ctor(::BlockPos const& pos);
126 // NOLINTEND
127
128public:
129 // virtual function thunks
130 // NOLINTBEGIN
131 MCNAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
132
133 MCNAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
134
135 MCNAPI void $tick(::BlockSource& region);
136
137 MCNAPI void
138 $serverInitItemStackIds(int containerSlot, int, ::std::function<void(int, ::ItemStack const&)> onNetIdChanged);
139
140 MCNAPI int $getContainerSize() const;
141
142 MCNAPI int $getMaxStackSize() const;
143
144 MCNAPI ::ItemStack const& $getItem(int) const;
145
146 MCNAPI void $setItem(int modelSlot, ::ItemStack const& item);
147
148 MCNAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
149
150 MCNAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
151 // NOLINTEND
152
153public:
154 // vftables
155 // NOLINTBEGIN
156 MCNAPI static void** $vftableForContainer();
157
159 // NOLINTEND
160};
Definition BlockActorDataPacket.h:19
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition DecoratedPotBlockActor.h:23
MCAPI void $serverInitItemStackIds(int containerSlot, int, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
static MCAPI ::std::array<::std::string, 4 > const & DEFAULT_SHERD_LIST()
static MCAPI void saveSherdsToTag(::CompoundTag &tag, ::std::array<::std::string, 4 > const &sherds, bool forceSaveDefaultSherds)
static MCAPI ::std::optional<::std::array<::std::string, 4 > > tryGetSherdsFromTag(::CompoundTag const &tag)
static MCAPI ::std::optional<::std::array<::std::string, 4 > > _tryGetSherdsFromItem(::ItemStackBase const &item)
MCAPI void $tick(::BlockSource &region)
MCAPI void _setContainedItem(::ItemStack const &item)
MCAPI void $setItem(int modelSlot, ::ItemStack const &item)
MCAPI void $_onUpdatePacket(::CompoundTag const &data, ::BlockSource &region)
MCAPI void * $ctor(::BlockPos const &pos)
MCAPI::ItemStack const & $getItem(int) const
MCAPI int $getMaxStackSize() const
MCAPI DecoratedPotBlockActor(::BlockPos const &pos)
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
MCAPI void _onInsertFeedback(::BlockSource &region, ::ItemStack const &newContainedItem, ::Player &player)
static MCAPI void ** $vftableForRandomizableBlockActorContainerBase()
static MCAPI void removeDefaultSherdsFromUserData(::ItemStackBase &itemInstance)
static MCAPI void ** $vftableForContainer()
MCAPI ::std::unique_ptr<::BlockActorDataPacket > $_getUpdatePacket(::BlockSource &)
MCAPI void $load(::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
MCAPI void tryAddItem(::Player &player)
MCAPI void _onInsertFailFeedback(::BlockSource &region, ::Player &player)
MCAPI int $getContainerSize() const
Definition ILevel.h:205
Definition ItemStackBase.h:35
Definition ItemStack.h:25
Definition Player.h:119
Definition RandomizableBlockActorContainer.h:16
Definition SaveContext.h:5