LeviLamina
Loading...
Searching...
No Matches
InteractComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/shared_types/legacy/EquipmentSlot.h"
7
8// auto generated forward declare list
9// clang-format off
10class Actor;
12class BlockSource;
13class Interaction;
15class ItemStack;
16class Level;
17class LootTables;
18class Player;
19struct ItemSlotInfo;
20// clang-format on
21
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<2, 2, short> mCooldownCounter;
27 // NOLINTEND
28
29public:
30 // member functions
31 // NOLINTBEGIN
32 MCAPI bool
33 _runInteraction(::Actor& owner, ::Interaction const& desc, ::Player& player, ::ActorInteraction& interaction);
34
35 MCFOLD short getCooldownCounter() const;
36
37 MCAPI ::InteractionResult getInteraction(::Actor& owner, ::Player& player, ::ActorInteraction& interaction);
38
39 MCFOLD void setCooldownCounter(short counter);
40 // NOLINTEND
41
42public:
43 // static functions
44 // NOLINTBEGIN
45 MCAPI static void
46 _tryDropItem(::BlockSource& region, ::Actor& owner, ::ItemSlotInfo const& itemSlotInfo, float yOffset);
47
48 MCAPI static void _tryEquipItem(
49 ::Actor& owner,
50 ::Player& player,
51 ::ItemStack& usingItem,
52 ::ItemStack const& usedItemCopy,
53 ::ItemSlotInfo const& itemSlotInfo,
54 bool& useItemEventSent,
55 bool& postponedReplace
56 );
57
58 MCAPI static void _tryRepairItem(::Actor& owner, ::ItemSlotInfo const& itemSlotInfo, int amount);
59
60 MCAPI static void _trySendEquipmentSlot(::Actor& owner, ::SharedTypes::Legacy::EquipmentSlot equipmentSlot);
61
62 MCAPI static void _trySpawnItems(
63 ::Level& level,
64 ::Actor& owner,
65 ::LootTables& lootTables,
66 ::std::string const& lootTableName,
67 float yOffset
68 );
69 // NOLINTEND
70};
Definition ActorInteraction.h:8
Definition Actor.h:125
Definition BlockSource.h:73
Definition InteractComponent.h:22
Definition InteractionResult.h:5
Definition Interaction.h:18
Definition ItemStack.h:35
Definition Level.h:255
Definition LootTables.h:14
Definition Player.h:137
Definition ItemSlotInfo.h:5