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 SaveContext;
20// clang-format on
21
22class CrafterBlockActor : public ::DispenserBlockActor {
23public:
24 // CrafterBlockActor inner types declare
25 // clang-format off
26 class LruCache;
27 // clang-format on
28
29 // CrafterBlockActor inner types define
30 class LruCache {
31 public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<8, 24, ::std::vector<uint64>> mRecencyOrderedIndexes;
35 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::CraftingContainer, ::std::vector<::ItemInstance>>>>
36 mCachedValues;
37 // NOLINTEND
38 };
39
40public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<4, 4, ::std::bitset<9>> mDisabledSlots;
44 ::ll::TypedStorage<8, 48, ::CrafterBlockActor::LruCache> mCraftedRecipesCache;
45 ::ll::TypedStorage<4, 4, int> mTicksLeftInCraftingState;
46 // NOLINTEND
47
48public:
49 // virtual functions
50 // NOLINTBEGIN
51 virtual ::std::string getName() const /*override*/;
52
53 virtual bool canPushInItem(int slot, int, ::ItemStack const& item) const /*override*/;
54
55 virtual bool isSlotDisabled(int slot) const /*override*/;
56
57 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
58
59 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
60
61 virtual void tick(::BlockSource& region) /*override*/;
62
63 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource& region) /*override*/;
64
65 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
66 // NOLINTEND
67
68public:
69 // member functions
70 // NOLINTBEGIN
71 MCAPI void onDisabledSlotToggleRequested(::BlockSource& region, int slot, bool shouldDisable);
72
73 MCAPI void setToCraftingVisualState(::BlockSource& region);
74
75 MCAPI bool tryMoveItemsIntoContainer(::BlockSource& region, ::std::vector<::ItemInstance>& items);
76 // NOLINTEND
77
78public:
79 // static functions
80 // NOLINTBEGIN
81 MCAPI static ::std::vector<::ItemInstance> getCraftableItem(::CraftingContainer& craftingGrid, ::Level& level);
82 // NOLINTEND
83
84public:
85 // virtual function thunks
86 // NOLINTBEGIN
87 MCAPI ::std::string $getName() const;
88
89 MCAPI bool $canPushInItem(int slot, int, ::ItemStack const& item) const;
90
91 MCAPI bool $isSlotDisabled(int slot) const;
92
93 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
94
95 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
96
97 MCAPI void $tick(::BlockSource& region);
98
99 MCAPI ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource& region);
100
101 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
102
103
104 // NOLINTEND
105
106public:
107 // vftables
108 // NOLINTBEGIN
110
112
113 MCNAPI static void** $vftable();
114
115 MCNAPI static void** $vftableForBlockActor();
116
118 // NOLINTEND
119};
Definition BlockActorDataPacket.h:19
Definition BlockSource.h:71
Definition CompoundTag.h:18
Definition CrafterBlockActor.h:30
Definition CrafterBlockActor.h:22
static MCAPI void ** $vftableForIVanillaMainBlockActorComponent()
static MCAPI void ** $vftableForBlockActor()
static MCAPI void ** $vftableForIVanillaRenderBlockActorComponent()
static MCAPI void ** $vftableForIVanillaTickBlockActorComponent()
static MCAPI void ** $vftable()
Definition CraftingContainer.h:14
Definition DataLoadHelper.h:20
Definition ILevel.h:220
Definition ItemInstance.h:15
Definition ItemStack.h:24
Definition Level.h:253
Definition SaveContext.h:5
STL namespace.