Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
StorageItemContainerModel.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/pub_sub/Publisher.h"
7#include "mc/world/containers/models/ContainerModel.h"
8
9// auto generated forward declare list
10// clang-format off
11class Container;
13class ItemStack;
17namespace Bedrock::PubSub::ThreadModel { struct MultiThreaded; }
18// clang-format on
19
20class StorageItemContainerModel : public ::ContainerModel {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 8, ::StorageItemComponent const*> mStorageItemComponent;
25 ::ll::TypedStorage<8, 8, ::StorageWeightLimitItemComponent const*> mStorageWeightLimitComponent;
26 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::Container>> mContainer;
27 ::ll::TypedStorage<
28 8,
29 128,
31 void(int, ::ItemStack const&, ::ItemStack const&),
33 0>>
34 mContainerChangedPublisher;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 StorageItemContainerModel();
40
41public:
42 // virtual functions
43 // NOLINTBEGIN
44 virtual ~StorageItemContainerModel() /*override*/ = default;
45
46 virtual void postInit() /*override*/;
47
48 virtual void containerContentChanged(int slot) /*override*/;
49
50 virtual bool isValid() /*override*/;
51
52 virtual ::ContainerWeakRef getContainerWeakRef() const /*override*/;
53
54 virtual int _getContainerOffset() const /*override*/;
55
56 virtual void _onItemChanged(int modelSlot, ::ItemStack const& oldItem, ::ItemStack const& newItem) /*override*/;
57
58 virtual ::Container* _getContainer() const /*override*/;
59 // NOLINTEND
60
61public:
62 // member functions
63 // NOLINTBEGIN
65 ::FullContainerName const& name,
66 ::std::shared_ptr<::Container> container,
67 bool isClientSide,
68 ::StorageItemComponent* storageItemComponent,
69 ::StorageWeightLimitItemComponent* storageWeightLimitItemComponent
70 );
71 // NOLINTEND
72
73public:
74 // constructor thunks
75 // NOLINTBEGIN
76 MCNAPI void* $ctor(
77 ::FullContainerName const& name,
78 ::std::shared_ptr<::Container> container,
79 bool isClientSide,
80 ::StorageItemComponent* storageItemComponent,
81 ::StorageWeightLimitItemComponent* storageWeightLimitItemComponent
82 );
83 // NOLINTEND
84
85public:
86 // virtual function thunks
87 // NOLINTBEGIN
88 MCNAPI void $postInit();
89
90 MCNAPI void $containerContentChanged(int slot);
91
92 MCNAPI bool $isValid();
93
94 MCNAPI ::ContainerWeakRef $getContainerWeakRef() const;
95
96 MCNAPI int $_getContainerOffset() const;
97
98 MCNAPI void $_onItemChanged(int modelSlot, ::ItemStack const& oldItem, ::ItemStack const& newItem);
99
100 MCNAPI ::Container* $_getContainer() const;
101
102
103 // NOLINTEND
104};
Definition Publisher.h:25
Definition ContainerWeakRef.h:17
Definition Container.h:36
Definition ItemStack.h:26
Definition StorageItemComponent.h:29
MCAPI void * $ctor(::FullContainerName const &name, ::std::shared_ptr<::Container > container, bool isClientSide, ::StorageItemComponent *storageItemComponent, ::StorageWeightLimitItemComponent *storageWeightLimitItemComponent)
MCAPI void $containerContentChanged(int slot)
MCAPI::Container * $_getContainer() const
MCAPI int $_getContainerOffset() const
MCAPI StorageItemContainerModel(::FullContainerName const &name, ::std::shared_ptr<::Container > container, bool isClientSide, ::StorageItemComponent *storageItemComponent, ::StorageWeightLimitItemComponent *storageWeightLimitItemComponent)
MCAPI void $_onItemChanged(int modelSlot, ::ItemStack const &oldItem, ::ItemStack const &newItem)
MCAPI::ContainerWeakRef $getContainerWeakRef() const
Definition StorageWeightLimitItemComponent.h:16
Definition FullContainerName.h:8