LeviLamina
Loading...
Searching...
No Matches
ActorHurtEvent.h
1
#pragma once
2
3
#include "ll/api/event/Cancellable.h"
4
#include "ll/api/event/entity/ActorEvent.h"
5
6
#include "mc/world/actor/ActorDamageSource.h"
7
8
namespace
ll::event::inline entity {
9
10
class
ActorHurtEvent
final :
public
Cancellable<ActorEvent> {
11
ActorDamageSource
const
& mSource;
12
float
& mDamage;
13
bool
& mKnock;
14
bool
& mIgnite;
15
16
public
:
17
constexpr
explicit
ActorHurtEvent
(
18
Actor& actor,
19
ActorDamageSource
const
& source,
20
float
& damage,
21
bool
& knock,
22
bool
& ignite
23
)
24
: Cancellable(actor),
25
mSource(source),
26
mDamage(damage),
27
mKnock(knock),
28
mIgnite(ignite) {}
29
30
LLAPI
void
serialize(CompoundTag&)
const override
;
31
LLAPI
void
deserialize(CompoundTag
const
&)
override
;
32
33
LLNDAPI ActorDamageSource
const
& source()
const
;
34
LLNDAPI
float
& damage()
const
;
35
LLNDAPI
bool
& knock()
const
;
36
LLNDAPI
bool
& ignite()
const
;
37
};
38
}
// namespace ll::event::inline entity
entity::ActorHurtEvent
Definition
ActorHurtEvent.h:10
src
ll
api
event
entity
ActorHurtEvent.h
Generated on Mon Dec 15 2025 02:53:42 for LeviLamina by
1.12.0