Update partial tick
This commit is contained in:
parent
4f2978010b
commit
333238fde5
@ -39,7 +39,7 @@ abstract class AndroidSwitchableFeature(type: AndroidFeatureType<*>, android: Ma
|
|||||||
if (maxCooldown <= 0) return 0.0f
|
if (maxCooldown <= 0) return 0.0f
|
||||||
|
|
||||||
if (ply.level() is ClientLevel) {
|
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)
|
return (cooldown.toFloat() / maxCooldown.toFloat()).coerceIn(0.0f, 1.0f)
|
||||||
|
Loading…
Reference in New Issue
Block a user