Update partial tick

This commit is contained in:
DBotThePony 2024-08-12 21:55:08 +07:00
parent 4f2978010b
commit 333238fde5
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -39,7 +39,7 @@ abstract class AndroidSwitchableFeature(type: AndroidFeatureType<*>, android: Ma
if (maxCooldown <= 0) return 0.0f
if (ply.level() is ClientLevel) {
return ((cooldown.toFloat() - minecraft.partialTick) / maxCooldown.toFloat()).coerceIn(0.0f, 1.0f)
return ((cooldown.toFloat() - minecraft.gameRenderer.mainCamera.partialTickTime) / maxCooldown.toFloat()).coerceIn(0.0f, 1.0f)
}
return (cooldown.toFloat() / maxCooldown.toFloat()).coerceIn(0.0f, 1.0f)