API reference / @jsprismarine/prismarine / entity/data/damageStages / DamageSensingSlot
Class: DamageSensingSlot
Defined in: packages/prismarine/src/entity/data/damageStages.ts:160
The sensing of the run in progress.
The sensor guard reads it, and the multiplier slot and the commit read the same answer, so a blow is sensed once. A death inside a commit can start another run, which replaces it, so the commit takes its copy before it does anything.
Constructors
Constructor
new DamageSensingSlot(
reads):DamageSensingSlot
Defined in: packages/prismarine/src/entity/data/damageStages.ts:163
Parameters
reads
Returns
DamageSensingSlot
Methods
clear()
clear():
void
Defined in: packages/prismarine/src/entity/data/damageStages.ts:190
Forgets the sensing, so the next run senses its own blow.
Returns
void
of()
of(
intent):DamageSensing|undefined
Defined in: packages/prismarine/src/entity/data/damageStages.ts:166
Senses a blow, or answers the sensing already taken for it.
Parameters
intent
Returns
DamageSensing | undefined