Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
LeashableUtility.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/entity/utilities/leashable_utility/UnleashReason.h"
7#include "mc/platform/brstd/flat_set.h"
8#include "mc/platform/brstd/function_ref.h"
9#include "mc/world/item/HandSlot.h"
10
11// auto generated forward declare list
12// clang-format off
13class Actor;
14class Interaction;
16class Player;
17class Vec3;
18struct ActorUniqueID;
19struct LeashablePreset;
20// clang-format on
21
22namespace LeashableUtility {
23// functions
24// NOLINTBEGIN
25MCNAPI ::Interaction attemptCutInteraction(::Actor& owner, ::Player& player, ::HandSlot handSlot);
26
27MCNAPI bool canLeashBeStolen(::Actor& actor);
28
29MCNAPI bool canStayLeashedTo(::Actor const& actor, ::Actor const& leashHolder, float maxDistance);
30
31MCNAPI void forEachLeashedActor(::Actor const& leashHolder, ::brstd::function_ref<void(::Actor&)> callback);
32
33MCNAPI float getDistanceSquared(::Actor const& actor, ::Vec3 const& position);
34
35MCNAPI uint getLeashedActorCount(::Actor const& leashHolder);
36
37MCNAPI ::LeashablePreset const&
38getPreset(::Actor const& leashedActor, ::LeashableComponent const& leashableComponent, ::Actor const* leashHolder);
39
40MCNAPI bool isAboveHardDistance(::Actor const& actor);
41
42MCAPI void leash(::Actor& entityToLeash, ::Actor& leashHolder, bool emitGameEvent, bool executeEntityEvent);
43
44MCNAPI void onLeashHolderSet(::ActorUniqueID const& newLeashHolderID, ::Actor& actor);
45
46MCNAPI bool tryTransferLeashedActors(
47 ::brstd::flat_set<::ActorUniqueID, ::std::less<::ActorUniqueID>, ::std::vector<::ActorUniqueID>> const&
48 leashedActorIDs,
49 ::Actor& newLeashHolder
50);
51
52MCAPI void unleash(::Actor& entityToUnleash, ::LeashableUtility::UnleashReason unleashReason);
53// NOLINTEND
54
55} // namespace LeashableUtility
Definition Actor.h:116
Definition Interaction.h:9
Definition LeashableComponent.h:17
Definition Player.h:131
Definition Vec3.h:10
Definition ActorUniqueID.h:5
Definition LeashablePreset.h:9