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#ifdef LL_PLAT_S
44 MCAPI ~LruCache();
45#endif
46 // NOLINTEND
47
48 public:
49 // destructor thunk
50 // NOLINTBEGIN
51#ifdef LL_PLAT_S
52 MCAPI void $dtor();
53#endif
54 // NOLINTEND
55 };
56
57public:
58 // member variables
59 // NOLINTBEGIN
60 ::ll::TypedStorage<4, 4, ::std::bitset<9>> mDisabledSlots;
61 ::ll::TypedStorage<8, 48, ::CrafterBlockActor::LruCache> mCraftedRecipesCache;
62 ::ll::TypedStorage<4, 4, int> mTicksLeftInCraftingState;
63 // NOLINTEND
64
65public:
66 // virtual functions
67 // NOLINTBEGIN
68 virtual ::std::string getName() const /*override*/;
69
70 virtual bool canPushInItem(int slot, int, ::ItemStack const& item) const /*override*/;
71
72 virtual bool isSlotDisabled(int slot) const /*override*/;
73
74 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
75
76 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
77
78 virtual void tick(::BlockSource& region) /*override*/;
79
80 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource& region) /*override*/;
81
82 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
83
84 virtual ~CrafterBlockActor() /*override*/ = default;
85 // NOLINTEND
86
87public:
88 // member functions
89 // NOLINTBEGIN
90 MCAPI bool tryMoveItemsIntoContainer(::BlockSource& region, ::std::vector<::ItemInstance>& items);
91 // NOLINTEND
92
93public:
94 // static functions
95 // NOLINTBEGIN
96 MCAPI static ::std::vector<::Recipe const*>
97 _getRecipesForCraftingGrid(::Level& level, ::CraftingContainer& craftingContainer);
98
99 MCAPI static ::std::vector<::ItemInstance> getCraftableItem(::CraftingContainer& craftingGrid, ::Level& level);
100 // NOLINTEND
101
102public:
103 // virtual function thunks
104 // NOLINTBEGIN
105 MCAPI ::std::string $getName() const;
106
107 MCAPI bool $canPushInItem(int slot, int, ::ItemStack const& item) const;
108
109 MCAPI bool $isSlotDisabled(int slot) const;
110
111 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
112
113 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
114
115 MCAPI void $tick(::BlockSource& region);
116
117 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource& region);
118
119 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
120
121
122 // NOLINTEND
123
124public:
125 // vftables
126 // NOLINTBEGIN
127 MCAPI static void** $vftableForRandomizableBlockActorContainerBase();
128
129 MCAPI static void** $vftableForContainer();
130 // NOLINTEND
131};
Definition BlockActorDataPacket.h:19
Definition BlockSource.h:71
Definition CompoundTag.h:23
Definition CrafterBlockActor.h:31
Definition CrafterBlockActor.h:23
Definition CraftingContainer.h:14
Definition DataLoadHelper.h:20
Definition ILevel.h:218
Definition ItemInstance.h:15
Definition ItemStack.h:26
Definition Level.h:250
Definition Recipe.h:31
Definition SaveContext.h:5
STL namespace.