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 getSlotToSwap(::Actor const& owner, ::ItemActor const& itemActor) const;
21
22 MCAPI int hasSurplus(
23 ::Actor const& owner,
24 ::ItemStack const& item,
25 ::ItemStack& resultStack,
26 bool includeStackSizeofItem
27 ) const;
28
29 MCAPI bool
30 itemBelongsInInventory(::Actor const& owner, ::ItemStack const& item, bool canPickupToHandOrEquipment) const;
31
32 MCAPI int wantsMore(::Actor const& owner, ::ItemStack const& item) const;
33
34 MCAPI bool willPickup(
35 ::Actor const& owner,
36 ::ItemStack const& item,
37 bool canPickupAnyItem,
38 bool canPickupToHandOrEquipment
39 ) const;
40 // NOLINTEND
41
42public:
43 // static functions
44 // NOLINTBEGIN
45 MCAPI static bool
46 _canPickupItem(::ItemStack const& item, ::ItemStack const& carriedItem, int maxAmount, bool singularPickupOnly);
47
48 MCAPI static bool _shouldReplaceItem(
49 ::ItemStack const& itemToReplace,
50 ::ItemStack const& newItem,
51 ::ShareableDefinition const& shareable,
52 bool canPickupAnyItem
53 );
54
55 MCAPI static bool _useLegacySurplusRules(::Level const& level);
56 // NOLINTEND
57};
Definition Actor.h:113
Definition ItemActor.h:30
Definition ItemStack.h:26
Definition Level.h:254
Definition ShareableComponent.h:14
Definition ShareableDefinition.h:14