Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ChemistryTableBlockActor.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/world/Container.h"
8#include "mc/world/item/ItemStack.h"
9#include "mc/world/level/block/actor/VanillaBlockActor.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class BlockPos;
15class BlockSource;
16class CompoundTag;
18class DataLoadHelper;
19class ILevel;
20class LabTablePacket;
22class Player;
23class SaveContext;
24struct ActorUniqueID;
25// clang-format on
26
27class ChemistryTableBlockActor : public ::VanillaBlockActor, public ::Container {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ActorUniqueID>> mOpenedPlayer;
32 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LabTableReaction>> mCurReaction;
33 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CraftableCompounds>> mCraftableCompounds;
34 ::ll::TypedStorage<8, 1368, ::ItemStack[9]> mItems;
35 ::ll::TypedStorage<8, 152, ::ItemStack> mPendingReactionOutput;
36 ::ll::TypedStorage<1, 1, bool> mIsTableTypeCached;
37 ::ll::TypedStorage<8, 48, ::HashedString> mCachedTableType;
38 // NOLINTEND
39
40public:
41 // prevent constructor by default
42 ChemistryTableBlockActor();
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual ~ChemistryTableBlockActor() /*override*/ = default;
48
49 virtual ::Container* getContainer() /*override*/;
50
51 virtual ::Container const* getContainer() const /*override*/;
52
53 virtual ::ItemStack const& getItem(int slot) const /*override*/;
54
55 virtual void setItem(int slot, ::ItemStack const& item) /*override*/;
56
57 virtual int getMaxStackSize() const /*override*/;
58
59 virtual int getContainerSize() const /*override*/;
60
61 virtual void startOpen(::Actor&) /*override*/;
62
63 virtual void stopOpen(::Actor& actor) /*override*/;
64
65 virtual void onRemoved(::BlockSource& region) /*override*/;
66
67 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
68
69 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
70
71 virtual void tick(::BlockSource& region) /*override*/;
72
73 virtual void serverInitItemStackIds(
74 int containerSlot,
75 int count,
76 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
77 ) /*override*/;
78 // NOLINTEND
79
80public:
81 // member functions
82 // NOLINTBEGIN
83 MCNAPI explicit ChemistryTableBlockActor(::BlockPos const& pos);
84
85#ifdef LL_PLAT_C
86 MCNAPI ::HashedString const& _getType(::BlockSource& region);
87#endif
88
89#ifdef LL_PLAT_S
90 MCNAPI ::HashedString const& _getType(::BlockSource& region);
91#endif
92
93#ifdef LL_PLAT_C
94 MCNAPI void clientLabTablePacket(::LabTablePacket const& packet, ::BlockSource& region);
95#endif
96
97 MCNAPI void playerOpenLabTable(::Player& player);
98
99 MCNAPI void reset(::BlockSource& region);
100
101 MCNAPI void serverCombine(::BlockSource& region, ::std::vector<::ItemStack> const& consumedInput);
102
104 // NOLINTEND
105
106public:
107 // constructor thunks
108 // NOLINTBEGIN
109 MCNAPI void* $ctor(::BlockPos const& pos);
110 // NOLINTEND
111
112public:
113 // virtual function thunks
114 // NOLINTBEGIN
115 MCNAPI ::Container* $getContainer();
116
117 MCNAPI ::Container const* $getContainer() const;
118
119 MCNAPI ::ItemStack const& $getItem(int slot) const;
120
121 MCNAPI void $setItem(int slot, ::ItemStack const& item);
122
123 MCNAPI int $getMaxStackSize() const;
124
125 MCNAPI int $getContainerSize() const;
126
127 MCNAPI void $startOpen(::Actor&);
128
129 MCNAPI void $stopOpen(::Actor& actor);
130
131 MCNAPI void $onRemoved(::BlockSource& region);
132
133 MCNAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
134
135 MCNAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
136
137 MCNAPI void $tick(::BlockSource& region);
138
140 int containerSlot,
141 int count,
142 ::std::function<void(int, ::ItemStack const&)> onNetIdChanged
143 );
144
145
146 // NOLINTEND
147};
Definition Actor.h:116
Definition BlockPos.h:14
Definition BlockSource.h:72
MCAPI void * $ctor(::BlockPos const &pos)
MCAPI void $load(::ILevel &level, ::CompoundTag const &tag, ::DataLoadHelper &dataLoadHelper)
MCAPI void $tick(::BlockSource &region)
MCAPI bool $save(::CompoundTag &tag, ::SaveContext const &saveContext) const
MCAPI void $setItem(int slot, ::ItemStack const &item)
MCAPI void $startOpen(::Actor &)
MCAPI int $getContainerSize() const
MCAPI::Container * $getContainer()
MCAPI void serverCombine(::BlockSource &region, ::std::vector<::ItemStack > const &consumedInput)
MCAPI void serverLabTablePacket_DEPRECATED(::LabTablePacket const &packet, ::BlockSource &region)
MCAPI void $onRemoved(::BlockSource &region)
MCAPI int $getMaxStackSize() const
MCAPI void $stopOpen(::Actor &actor)
MCAPI::Container const * $getContainer() const
MCAPI void reset(::BlockSource &region)
MCAPI ChemistryTableBlockActor(::BlockPos const &pos)
MCAPI::ItemStack const & $getItem(int slot) const
MCAPI void $serverInitItemStackIds(int containerSlot, int count, ::std::function< void(int, ::ItemStack const &)> onNetIdChanged)
MCAPI void playerOpenLabTable(::Player &player)
Definition CompoundTag.h:18
Definition CraftableCompounds.h:16
Definition DataLoadHelper.h:20
Definition ILevel.h:223
Definition ItemStack.h:26
Definition LabTablePacket.h:19
Definition LabTableReaction.h:16
Definition Player.h:131
Definition SaveContext.h:5
Definition ActorUniqueID.h:5