LeviLamina
Loading...
Searching...
No Matches
CrafterBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/actor/DispenserBlockActor.h"
7
8// auto generated forward declare list
9// clang-format off
11class BlockSource;
12class CompoundTag;
14class DataLoadHelper;
15class ILevel;
16class ItemInstance;
17class ItemStack;
18class Level;
19class Recipe;
20class SaveContext;
21// clang-format on
22
23class CrafterBlockActor : public ::DispenserBlockActor {
24public:
25 // CrafterBlockActor inner types declare
26 // clang-format off
27 class LruCache;
28 // clang-format on
29
30 // CrafterBlockActor inner types define
31 class LruCache {
32 public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 24, ::std::vector<uint64>> mRecencyOrderedIndexes;
36 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::CraftingContainer, ::std::vector<::ItemInstance>>>>
37 mCachedValues;
38 // NOLINTEND
39
40 public:
41 // member functions
42 // NOLINTBEGIN
43
44 // NOLINTEND
45
46 public:
47 // destructor thunk
48 // NOLINTBEGIN
49 MCAPI_S void $dtor();
50 // NOLINTEND
51 };
52
53public:
54 // member variables
55 // NOLINTBEGIN
56 ::ll::TypedStorage<4, 4, ::std::bitset<9>> mDisabledSlots;
57 ::ll::TypedStorage<8, 48, ::CrafterBlockActor::LruCache> mCraftedRecipesCache;
58 ::ll::TypedStorage<4, 4, int> mTicksLeftInCraftingState;
59 // NOLINTEND
60
61public:
62 // virtual functions
63 // NOLINTBEGIN
64 virtual ::std::string getName() const /*override*/;
65
66 virtual bool canPushInItem(int slot, int, ::ItemStack const& item) const /*override*/;
67
68 virtual bool isSlotDisabled(int slot) const /*override*/;
69
70 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
71
72 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
73
74 virtual void tick(::BlockSource& region) /*override*/;
75
76 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
77
78 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource&) /*override*/;
79
80 virtual ~CrafterBlockActor() /*override*/ = default;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCAPI bool tryMoveItemsIntoContainer(::BlockSource& region, ::std::vector<::ItemInstance>& items);
87 // NOLINTEND
88
89public:
90 // static functions
91 // NOLINTBEGIN
92 MCAPI static ::std::vector<::Recipe const*>
93 _getRecipesForCraftingGrid(::Level& level, ::CraftingContainer& craftingContainer);
94
95 MCAPI static ::std::vector<::ItemInstance> getCraftableItem(::CraftingContainer& craftingGrid, ::Level& level);
96 // NOLINTEND
97
98public:
99 // virtual function thunks
100 // NOLINTBEGIN
101 MCAPI ::std::string $getName() const;
102
103 MCAPI bool $canPushInItem(int slot, int, ::ItemStack const& item) const;
104
105 MCAPI bool $isSlotDisabled(int slot) const;
106
107 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
108
109 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
110
111 MCAPI void $tick(::BlockSource& region);
112
113 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
114
115 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource&);
116
117
118 // NOLINTEND
119
120public:
121 // vftables
122 // NOLINTBEGIN
124
125 MCNAPI static void** $vftableForContainer();
126 // NOLINTEND
127};
Definition BlockActorDataPacket.h:19
Definition BlockSource.h:68
Definition CompoundTag.h:23
Definition CrafterBlockActor.h:31
Definition CrafterBlockActor.h:23
static MCAPI void ** $vftableForRandomizableBlockActorContainerBase()
static MCAPI void ** $vftableForContainer()
Definition CraftingContainer.h:14
Definition DataLoadHelper.h:20
Definition ILevel.h:214
Definition ItemInstance.h:15
Definition ItemStack.h:26
Definition Level.h:249
Definition Recipe.h:31
Definition SaveContext.h:5
STL namespace.