LeviLamina
Loading...
Searching...
No Matches
ShareableComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class Actor;
8class ItemActor;
9class ItemStack;
10class Level;
12// clang-format on
13
15public:
16 // member functions
17 // NOLINTBEGIN
18 MCAPI int getCountToPickUp(::Actor const& owner, ::ItemStack const& item) const;
19
20 MCAPI int getCountToPickUp(::Actor const& owner, ::ItemActor const& itemActor) const;
21
22 MCAPI int getSlotToSwap(::Actor const& owner, ::ItemActor const& itemActor) const;
23
24 MCAPI int hasSurplus(::Actor const& owner, ::ItemStack const& item, bool includeStackSizeofItem) const;
25
26 MCAPI int hasSurplus(
27 ::Actor const& owner,
28 ::ItemStack const& item,
29 ::ItemStack& resultStack,
30 bool includeStackSizeofItem
31 ) const;
32
33 MCAPI bool
34 itemBelongsInInventory(::Actor const& owner, ::ItemStack const& item, bool canPickupToHandOrEquipment) const;
35
36 MCAPI int wantsMore(::Actor const& owner, ::ItemStack const& item) const;
37
38 MCAPI bool willPickup(
39 ::Actor const& owner,
40 ::ItemStack const& item,
41 bool canPickupAnyItem,
42 bool canPickupToHandOrEquipment
43 ) const;
44 // NOLINTEND
45
46public:
47 // static functions
48 // NOLINTBEGIN
49 MCAPI static bool
50 _canPickupItem(::ItemStack const& item, ::ItemStack const& carriedItem, int maxAmount, bool singularPickupOnly);
51
52 MCAPI static bool _shouldReplaceItem(
53 ::ItemStack const& itemToReplace,
54 ::ItemStack const& newItem,
55 ::ShareableDefinition const& shareable,
56 bool canPickupAnyItem
57 );
58
59 MCAPI static bool _useLegacySurplusRules(::Level const& level);
60 // NOLINTEND
61};
Definition Actor.h:125
Definition ItemActor.h:31
Definition ItemStack.h:35
Definition Level.h:255
Definition ShareableComponent.h:14
Definition ShareableDefinition.h:14