Fix nanobots regeneration reset counters when damage received is zero

Fixes #189
This commit is contained in:
DBotThePony 2022-10-25 13:52:45 +07:00
parent 964065eca5
commit 5468a18280
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -41,8 +41,10 @@ class NanobotsRegenerationFeature(android: MatteryPlayerCapability) : AndroidFea
}
override fun onHurt(event: LivingHurtEvent) {
ticksPassed = 0
healTicks = 0
if (event.amount > 0f) {
ticksPassed = 0
healTicks = 0
}
}
override fun serializeNBT(): CompoundTag {